-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self hosted #16
Comments
Hey Alex, Indeed it should not be hard, and I wouldn't having a flag to make this a runtime option, as long as we can keep both cases clean. No specific guidelines, other than the common ones for Go code in general. |
Thanks for the quick reply, you can already see some changes at alexkappa/gopkg. I'll verify it a bit further and submit a PR. I would like to hear your thoughts on another issue if you have the time. When self hosting, the github username may become unnecessary, since it's already under a custom domain. For example -Alex |
We can have a flag to alter between two modes:
We cannot have a mix of both at once, because that'd be ambiguous. |
Thanks for cooking this, Alex. I'm trying to think about the consequences in terms of people understanding that although this looks a lot like a common gopkg.in, it actually follows slightly different rules which conflict with what's documented. I still want to support your use case, though. Can you please detail it a little better? For example, a few questions: a. Do you just want to support the repositories of a single user on a different domain, or multiple users? b. Is that a private domain and service, or is going to be publicly visible? Also, there's a small problem with the approach which I did not anticipate above: there's still ambiguity of user name vs. repository name. Imagine for example someone accesses go.alexkappa.com/jam.. is jam a project or a user? Depending on the answer to (a) above, there's an easy solution. |
Seems like the intent is just to support a single user... I was thinking of doing this, too. For example, pointing natefinch.com/lumberjack.v2 to github.com/natefinch/lumberjack (v2 branch) However, you're right that it might be confusing that people will expect it to work like gopkg.in, but it'll have different behavior. Maybe something as simple as a disclaimer at the top, like "This site redirects go get from to repos under github.com//." |
I would say single user on a custom domain. Think of it as vanity plates :). It might help out in the future with private repos too. We could deploy
Supporting multiple users doesn't make much sense in a self deployment scenario imo. I mean, would someone prefer -Alex |
If supporting multiple users, it could just be the default behaviour, which amounts to using gopkg.in as is on a different domain. If I were using this, it would be for a single organization or user. As in:
Ideally, I would want to configure the mount point and the organization/user it points to:
or based on http://golang.org/s/go14subrepo:
or if I prefer:
I don't think it makes sense to only host one project. Something like All this said, I'm pretty happy hosting it on gopkg.in. |
I like @slimsag's suggestion of making gopkg into a pkg where things like the GoPkg.in homepage are part of the cmd. That would provide a lot of flexibility. Stripe provides another reason for running self-hosted:
|
If I did the work to split gopkg into a package itself (importable via |
Although this is a very old issue, you could potentially tackle it by using template tags - e.g.:
I'd be happy to do the legwork on this if the design is agreeable. |
Hi @niemeyer,
This is not an issue, more of a question really. Is there any plan to add support for self hosted deployments. It would be really cool if we can use this tool internally. I was reading through the code, and I suppose to do such a thing would be quite doable, for the most part it's about replacing "gopkg.in" with a variable (perhaps flag) and other such values which are now hard coded.
Would you be accepting pull requests for these additions? Do you have any guidelines or recommendations for contributing?
Thanks,
Alex
The text was updated successfully, but these errors were encountered: