I perused the repository (including the documentation), but there was no "installation" section or similar. I saw a Dockerfile, but when I build and run it, NGINX is stuck looking for a certificate file. I attempted to generate a cert and stick mount its directory, but I must be doing it wrong because NGINX can't find it. I was wondering if anyone else had been down this road already?
评论:
quiI:
villiger2:An alternative approach which might fit your needs.
Run
godoc -http=:6060
Navigate to
http://localhost:6060/pkg/
Tada! All the code in your $GOPATH (which includes stdlib) now has a web interface.
weberc2:This is really the correct answer, very useful because it also has the docs of your own code ;) !
thewhitetulip:I'm hoping I can get my own code on a private godoc.org since its feature set is much nicer than that of the godoc tool.
NeverUse-YouPromised:As far as I know, this is the only way we can run godoc :-D
divoxx:This worked for me only when I ran godoc as root.
weberc2:Probably because you were trying to bind to a low port, such as 80
ChristophBerger:Yeah, I should have mentioned that I specifically want GoDoc.org because it's got a more impressive user interface, and I want to use it in a demo for Go prototype to our Python organization. Probably not a big difference, but it seems worth the while to get a few additional oohs and ahhs.
weberc2:Did you try the steps for setting up a dev instance as described in the project's wiki?
This seems to provide a local running instance that's at least good enough for development purposes. (I never tried this myself but if I wanted to run a local godoc.org, this would be what I try first.)
lstokeworth:I gave it a brief shot, but I couldn't locate the dev_appserver.py file.
ChristophBerger:dev_appserver.py is part of the appengine sdk.
weberc2:
cd
'ing to the root of the SDK install dir and (if on a Unix-like system) doing afind . -name "dev_appserver.py" -print
should reveal if and where this script is contained in the SDK. If thefind
does not find anything then I have no other idea where this script could be hiding.
ChristophBerger:I'm not seeing an SDK directory. What SDK are you referring to?
EDIT: Another user mentioned that this belongs to the app engine sdk. I'll poke around that when I have more time.
sh41:I meant the Cloud SDK that the gddo wiki advises to download.
Re: app engine SDK - I thought this would be part of the Cloud SDK. If it has to be installed separately, then the gddo wiki page seems to miss that step.
weberc2:but there was no "installation" section or similar.
It's in the wiki:
https://github.com/golang/gddo/wiki/Development-Environment-Setup
I used to run a private gddo instance at my previous company for our internal code. I just ran it on internal network, and gave it GitHub credentials that had access to our private repos.
However, there have been many changes to gddo recently that tie it closely to Google App Engine and other stuff, making it harder to run it stand-alone.
Also, this might be somewhat relevant/helpful.
https://godoc.org/github.com/shurcooL/cmd/godoc_router
I used that to augment the private instance with the rest of godoc.org for all the public stuff. But, this was a few years ago, so it might be out of date.
LtArson:I saw that document, but I don't know where that dev_appserver.py file is supposed to come from. I was hoping I could easily spin up a docker container.
weberc2:Someone made a Docker image for it: https://github.com/Clever/godoc-docker
LtArson:Cool, I'll check this out. Not sure why you got downvoted.
Bummer--I just saw it only supports private Github repos. :(
smcquay:I think it supports public and private, but if not you can use the public godoc for public code and that for private code
I got this working for work. Just had to start up a redis and build the source (recursively?). I eventually got a gddo binary and handle a TLD reverse proxy myself.
