sameersbn / sameersbn/docker-gitlab
Gitlab url is not correct if I use Nginx proxy with custom https port
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 8.1k
- Forks
- 2.1k
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 7
Description
Here is my docker-compose file content (I have skipped some configs since they are not relevant):
version: '2'
services:
gitlab:
restart: unless-stopped
image: sameersbn/gitlab:17.3.3
container_name: gitlab
ports:
- "20080:80"
- "20443:443"
- "10022:22"
environment:
- GITLAB_HTTPS=true
- SSL_SELF_SIGNED=false
- NGINX_X_FORWARDED_PROTO=https
- GITLAB_HOST=gitlab.example.com
- GITLAB_PORT=10443
- GITLAB_SSH_PORT=10022
- GITLAB_RELATIVE_URL_ROOT=
And I use Nginx Proxy Manager to proxy gitlab, here is my config:
Proxy host name: gitlab.example.com
Scheme: http
Forward Hostname / IP: 192.168.1.105(my gitlab container's IP)
Forward Port: 20080
SSL Certificate: enabled
HTTP/2 Support: enabled
When I turn on the proxy, I can visit gitlab through https://gitlab.example.com:10443, but in gitlab's frontend page, it shows the incorrect url, for example, the Admin page button's url is https://gitlab.example.com, and every time I try to login into Gitlab, it redirect me to https://gitlab.example.com/users/sign_in, instead of https://gitlab.example.com:10443/users/sign_in, that's quite annoying.
Is there any problem with my config?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied docker-compose settings and the Nginx Proxy Manager proxy configuration, focusing on how the external HTTPS port 10443 is communicated to GitLab. Reproduce the redirect and inspect the generated frontend URLs; done means login and Admin links retain https://gitlab.example.com:10443.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, nginx
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100