HELP: Does anyone know how to run a private instance of godoc.org?

agolangf · 2016-10-18 14:02:03 · 681 次点击    
这是一个分享于 2016-10-18 14:02:03 的资源,其中的信息可能已经有所发展或是发生改变。

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:

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.

villiger2:

This is really the correct answer, very useful because it also has the docs of your own code ;) !

weberc2:

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.

thewhitetulip:

As far as I know, this is the only way we can run godoc :-D

NeverUse-YouPromised:

This worked for me only when I ran godoc as root.

divoxx:

Probably because you were trying to bind to a low port, such as 80

weberc2:

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.

ChristophBerger:

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.)

weberc2:

I gave it a brief shot, but I couldn't locate the dev_appserver.py file.

lstokeworth:

dev_appserver.py is part of the appengine sdk.

ChristophBerger:

cd'ing to the root of the SDK install dir and (if on a Unix-like system) doing a find . -name "dev_appserver.py" -print should reveal if and where this script is contained in the SDK. If the find does not find anything then I have no other idea where this script could be hiding.

weberc2:

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.

ChristophBerger:

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.

sh41:

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.

weberc2:

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.

LtArson:

Someone made a Docker image for it: https://github.com/Clever/godoc-docker

weberc2:

Cool, I'll check this out. Not sure why you got downvoted.

Bummer--I just saw it only supports private Github repos. :(

LtArson:

I think it supports public and private, but if not you can use the public godoc for public code and that for private code

smcquay:

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.


入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

681 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传