Gitlab has wrong url with docker

Hello,

I’m trying to deploy a gitlab community edition on a server.

This server is running a reverse proxy for other services.

I can access my gitlab instance on https://gitlab.domain.com, however inside, some urls redirects to the container ID domain (creating issue, link received in mails, …). The strange part is that many urls are going on the good domain. For example I can create a project from home page, as well as creating an issue when look in the project. However, I can’t create an issue from the home page with the button “New issue in PROJECT_NAME”.

I’ve set external_url and hostname in my docker-compose, restarted and reconfigured the docker container, but I couldn’t make it work.

This is my docker-compose file :

 gitlab:
    image: gitlab/gitlab-ce:16.9.1-ce.0
    container_name: gitlab
    restart: unless-stopped
    hostname: 'gitlab.domain.com'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'https://gitlab.domain.com'
        nginx['enable'] = true
        nginx['redirect_http_to_https'] = false
      VIRTUAL_HOST: gitlab.domain.com
    volumes:
      - ./gitlab/config:/etc/gitlab
      - ./gitlab/logs:/var/log/gitlab
      - ./gitlab/data:/var/opt/gitlab
    shm_size: '256m'
    depends_on:
      - reverse-proxy
    networks:
      - myNetwork

Hey :facepunch:
So this reverse proxy and then you have gitlab using its own nginx? Double proxying? Maybe put gitlab on http and then look into virtual host config on the reverse proxy?

The reverse proxy comes from jwilder and doesn’t seems to have a lot of configs. It mainly works out of the box, just by starting our containers with a virtual_host.

Having external_url on HTTP doesn’t change anything concerning the issue.

I wonder why it doesn’t take the hostname as string for URLs on some part of gitlab