几周来,我一直在思考这是怎么一回事,但还没有得出结论。也许我想错了方向。
假设你有上百个网络应用程序来来去去。您需要像这样的nginx配置,例如gitlab:
location / {
proxy_pass http://gitlab;
}
由于gitlab是用docker service create创建的,nginx将能够在您的入口网络中通过它的群vip假dns名称来解决gitlab。
但是:只有在服务容器正在运行的情况下。否则,由于[emerg] 1#1: host not found in upstream "gitlab",nginx将不会启动。
现在,当您必须运
我使用这个手册从源安装了Gitlab
现在,GitLab在地址上工作。我想将主机名更改为192.168.1.1/gitlab。
I changed in file /home/git/gitlab/config/gitlab.yml
host: gitlab.example to host: 192.168.1.1/gitlab
in file /home/git/gitlab-shell/config.yml
gitlab_url: http://gitlab.example
to gitlab_url: http://192.168.1.1/gitlab
I use Apache2.