You need to sign in or sign up before continuing.
Documentation does not mention the port changes when external_url is used
When external_url "http://gitlab.example.com:8929"
is used, the docker command also has to change to --publish 8929:8929
because nginx binds on that port instead. If not, a CONNECTION_REFUSED
will follow as the endpoint is not available.
For instance:
docker run --detach \
--restart always \
--name gitlab \
--hostname baobao.local \
--publish 2443:443 \
--publish 2080:2080 \
--publish 2022:22 \
--volume /srv/gitlab/config:/etc/gitlab:Z \
--volume /srv/gitlab/logs:/var/log/gitlab:Z \
--volume /srv/gitlab/data:/var/opt/gitlab:Z \
gitlab/gitlab-ce:latest
will work when the:
external_url 'http://baobao.local:2080'
The documentation in question is: https://docs.gitlab.com/omnibus/docker/#expose-gitlab-on-different-ports
Personally, I believe the container should NOT run nginx with a changed port; since when 8080
is used, nginx will actually conflict with Unicorn.
Edited by Gerard Braad