Document "SOCAT_LINK" and its relevance with Kubernetes


#1

Gogs is easily deployed to Kubernetes (at least, on Google Cloud). However, Kubernetes differs from some other Docker management solutions in that it has a construct called a “pod”, in which several Docker containers will share the same network address space (I think that’s it? Anyway, 127.0.0.1).

There appears to be a mechanism to bind certain ports to all network adapters (0.0.0.0), however, when you have another application in the same pod as Gogs (in this case, NGINX acting as a reverse proxy) it binds the ports 80 and 443 in such a way NGINX cannot also bind them.

This behaviour is resolved by including the “SOCAT_LINK” environment variable, set to “false”. However, this is only referenced in a GitHub issue (https://github.com/gogits/gogs/issues/1815)

It might be nice to document deployment notes on Kubernetes, as it’s becoming pretty big pretty quickly, and this has tripped at least one other person up in the past.


#2

cc @0rax can you make a PR for this to Docker README?


#3

Will do. I will in the meantine I will create the branch to make SOCAT_LINK an opt-in option instead of an opt-out option as it is no longer relevant following #2015 & #2475.

EDIT: PR made https://github.com/gogits/gogs/pull/2965


#4

Check out some of the best Kubernetes books & tutorials for more help.