#SSH Clone Repo URL - Help

3 messages · Page 1 of 1 (latest)

hallow dock
#

I've been working on upgrading our Gitlab Instance. We are moving it to a new VM and I plan to utilize Docker Compose to maintain its configuration. Here are some goals I am after:

  • Use the compose.yaml file to hold all of Gitlab's configuration. I don't want to have to maintain multiple configs (i.e. config/gitlab.rb)
  • Connect to our lab's AD
  • Utilize a separate NGINX Reverse Proxy container to handle the requests.
  • Configure Gitlab Runner (never done this before and we have not created a CI/CD setup yet)

Right now, I am only focused on getting HTTP working (I'll worry about SSL certs and redirecting after I fix this issue). So I have the new instance up and running in a container, along side nginx-proxy-manager and gitlab-runner containers. I am able to login via AD, and I can access Gitlab with the desired URL http://gitlab.domain.local utilizing nginx to proxy. But for some reason, any project I create shows the container's ID as part of the "clone repo" vs the http://gitlab.domain.local? Attached a screenshot. All the research I've been doing trying to find a solution seems to offer different suggestions but none seem to work.

When I try using the option external_url 'http://gitlab.domain.local' in compose.yaml it breaks during startup, any idea why that would? Also, just something I noticed that the external_url option does not include the "=" character when all my other options do? Is that right?

I did make sure compose.yaml included the option gitlab_rails['gitlab_shell_ssh_port'] to correctly use the host's port 8022 vs 22 and that shows correctly in the clone repo.

#

Here is my running compose.yaml

gitlab:
   container_name: gitlab
   image: gitlab/gitlab-ce:latest
   restart: always
   ports:
      - '8080:80'
      - '8443:443'
      - '8022:22'
   environment:
      GITLAB_OMNIBUS_CONFIG: |
         gitlab_rails['gitlab_shell_ssh_port'] = 8022
         gitlab_rails['ldap_enabled'] = true
         gitlab_rails['ldap_servers'] = {
            'main' => {
               'label' => 'Active Directory',
               'hosts' =>  [[<redacted>, 389],
                            [<redacted>, 389]],
               'uid' => 'sAMAccountName',
               'base' => <redacted>,
               'encryption' => 'plain',
               'active_directory' => true,
               'user_filter' => <redacted>,
               'attributes' => {
                  'username' => ['uid', 'userid', 'sAMAccountName'],
                  'name' => 'cn',
                  'first_name' => 'givenName',
                  'last_name' => 'sn'
               },
               'lowercase_usernames' => true,
               'verify_certificates' => true,
               'bind_dn' => <redacted>,
               'password' => <redacted>
            }
         }
   volumes:
      - /srv/gitlab/config:/etc/gitlab
      - /srv/gitlab/logs:/var/log/gitlab
      - /srv/gitlab/data:/var/opt/gitlab
   shm_size: 4gb

gitlab-runner:
   container_name: gitlab-runner
   image: gitlab/gitlab-runner
   restart: always
   depends_on:
      - gitlab
   volumes:
      - /srv/gitlab-runner:/etc/gitlab-runner
      - /var/run/docker.sock:/var/run/docker.sock
#

I do want to add, when I check the project's "Settings > General > Advanced > Change path" it correctly shows the http://gitlab.domain.local/