Files
docker-compose/gitlab/docker-compose.yml
2025-03-18 11:29:42 +01:00

70 lines
2.8 KiB
YAML

version: '3.6'
services:
web:
image: '${DOCKER_REGISTRY:-}gitlab/gitlab-ce:latest'
container_name: gitlab
restart: unless-stopped
network_mode: bridge
environment:
TZ: "Europe/Bratislava"
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.sectorq.eu'
nginx['listen_port'] = 80
nginx['listen_https'] = false
web_server['username'] = 'git'
gitlab_rails['time_zone'] = 'Europe/Bratislava'
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 authentik1
idp_cert_fingerprint: 'f7:fd:49:03:b3:38:52:b3:23:f5:43:c4:8d:08:65:32:e0:5a:7b:0e',
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'
}
]
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'
- '/etc/localtime:/etc/localtime:ro'
shm_size: '4gb'
labels:
- com.centurylinklabs.watchtower.enable=true
- homepage.group=Infrastructure
- homepage.name=Gitlab
- homepage.weight=1
- homepage.icon=gitlab.png
- homepage.href=https://gitlab.sectorq.eu
- homepage.description=Version control
- homepage.server=my-docker
- homepage.container=gitlab
- homepage.widget.type=gitlab
- homepage.widget.url=https://gitlab.sectorq.eu
- homepage.widget.key=glpat-BuMKcaDqeD-Wx3dW4TM9
- homepage.widget.user_id=2