version: '3.6' services: web: image: 'gitlab/gitlab-ce:latest' container_name: gitlab restart: always network_mode: bridge environment: GITLAB_OMNIBUS_CONFIG: | external_url 'https://gitlab.sectorq.eu' nginx['listen_port'] = 80 nginx['listen_https'] = false gitlab_rails['omniauth_enabled'] = true gitlab_rails['omniauth_allow_single_sign_on'] = ['saml'] gitlab_rails['omniauth_sync_email_from_provider'] = 'saml' gitlab_rails['omniauth_sync_profile_from_provider'] = ['saml'] gitlab_rails['omniauth_sync_profile_attributes'] = ['email'] gitlab_rails['omniauth_auto_sign_in_with_provider'] = 'saml' gitlab_rails['omniauth_block_auto_created_users'] = false gitlab_rails['omniauth_auto_link_saml_user'] = true gitlab_rails['omniauth_providers'] = [ { name: 'saml', args: { assertion_consumer_service_url: 'https://gitlab.sectorq.eu/users/auth/saml/callback', # Shown when navigating to certificates in authentik idp_cert_fingerprint: '1b:af:1e:f8:3f:b1:57:e6:b0:62:f6:59:25:48:1e:9c:c3:9b:36:9e', idp_sso_target_url: 'https://auth.sectorq.eu/application/saml/gitlab/sso/binding/redirect/', issuer: 'https://gitlab.sectorq.eu', name_identifier_format: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent', attribute_statements: { email: ['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'], first_name: ['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name'], nickname: ['http://schemas.goauthentik.io/2021/02/saml/username'] } }, label: 'authentik' } ] # gitlab_rails['ldap_enabled'] = true # gitlab_rails['ldap_servers'] = { # 'main' => { # 'label' => 'LDAP', # 'host' => '192.168.77.106', # 'port' => 1389, # 'uid' => 'sAMAccountName', # 'base' => 'dc=sectorq,dc=eu' # 'bind_dn' => 'CN=admin,DC=sectorq,DC=eu', # 'password' => '$LDAP_ADMIN_PASSWORD', # 'encryption' => 'plain', # 'verify_certificates' => false, # 'timeout' => 10, # 'active_directory' => false, # 'user_filter' => '(memberOf=cn=gitlab,ou=group,dc=sectorq,dc=eu)', # 'base' => 'ou=people,dc=sectorq,dc=eu', # 'lowercase_usernames' => 'false', # 'retry_empty_result_with_codes' => [80], # 'allow_username_or_email_login' => false, # 'block_auto_created_users' => false # } # } hostname: 'gitlab.sectorq.eu' ports: - '8780:80' - '8743:443' - '8722:22' volumes: - '/share/docker_data/gitlab/config:/etc/gitlab' - '/share/docker_data/gitlab/logs:/var/log/gitlab' - '/share/docker_data/gitlab/data:/var/opt/gitlab' shm_size: '2gb' labels: com.centurylinklabs.watchtower.enable: true