Thank you very much for your answer. You are right of course it makes it easier if I write the configuration here
Here is my setup GitHub - Psycho0verload/traefik-crowdsec-stack
The only difference to the manual is that IPv6 is still included.
In my traefik.yml
the network is defined:
And here is the configuration I use in the docker-compose.yml. At the top of the log it was Gitlab. So here is the configuration of Gitlab:
version: "3.9"
services:
gitlab-ce:
configs:
- source: gitlab
target: /omnibus_config.rb
container_name: ${SERVICE_GITLAB_CE_CONTAINER_NAME:-gitlab-ce}
depends_on:
gitlab-postgres:
condition: service_healthy
environment:
GITLAB_OMNIBUS_CONFIG: "from_file('/omnibus_config.rb')"
hostname: ${SERVICE_GITLAB_CE_HOSTNAME}
image: gitlab/gitlab-ce:${SERVICE_GITLAB_CE_VERSION:-latest}
labels:
traefik.docker.network: proxy
traefik.enable: "true"
traefik.http.routers.gitlab-ce.entrypoints: websecure
traefik.http.routers.gitlab-ce.rule: Host(${SERVICE_GITLAB_CE_TRAEFIK_HOST})
traefik.http.routers.gitlab-ce.service: gitlab-ce
traefik.http.routers.gitlab-ce.tls: "true"
traefik.http.routers.gitlab-ce.tls.certresolver: http_resolver
traefik.http.services.gitlab-ce.loadbalancer.server.port: "80"
traefik.tcp.routers.gitlab-ssh.entrypoints: git-ssh
traefik.tcp.routers.gitlab-ssh.rule: HostSNI(`*`)
traefik.tcp.routers.gitlab-ssh.service: gitlab-ssh
traefik.tcp.services.gitlab-ssh.loadbalancer.server.port: "22"
networks:
gitlab:
ipv4_address: ${SERVICE_GITLAB_CE_NETWORK_IPV4}
ipv6_address: ${SERVICE_GITLAB_CE_NETWORK_IPV6}
proxy: null
restart: unless-stopped
secrets:
- gitlab_root_password
- postgres_password
shm_size: '256m'
volumes:
- ./data/config:/etc/gitlab
- ./data/data:/var/opt/gitlab
# - ./data/backup:/opt/gitlab/embedded/bin/gitaly-backup
- /var/log/gitlab:/var/log/gitlab
gitlab-postgres:
container_name: ${SERVICE_GITLAB_DATABASE_CONTAINER_NAME:-gitlab-database}
environment:
DEBUG: "false"
POSTGRES_USER: gitlab
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_DB: gitlab
hostname: ${SERVICE_GITLAB_DATABASE_HOSTNAME:-gitlab-database}
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
image: postgres:${SERVICE_GITLAB_DATABASE_VERSION:-15}
networks:
gitlab:
ipv4_address: ${SERVICE_GITLAB_DATABASE_NETWORK_IPV4}
ipv6_address: ${SERVICE_GITLAB_DATABASE_NETWORK_IPV6}
restart: unless-stopped
secrets:
- postgres_password
volumes:
- ./data/database:/var/lib/postgresql/data
gitlab-registry:
container_name: ${SERVICE_GITLAB_REGISTRY_CONTAINER_NAME:-gitlab-registry}
environment:
REGISTRY_AUTH_TOKEN_ISSUER: "gitlab-issuer"
REGISTRY_AUTH_TOKEN_REALM: https://git.domain.de/jwt/auth
REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE: /certs/gitlab-registry.crt
REGISTRY_AUTH_TOKEN_SERVICE: container_registry
REGISTRY_LOG_LEVEL: debug
REGISTRY_STORAGE_DELETE_ENABLED: "true"
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /registry
hostname: ${SERVICE_GITLAB_REGISTRY_HOSTNAMENAME:-gitlab-registry}
image: registry:latest
labels:
traefik.docker.network: proxy
traefik.enable: "true"
traefik.http.routers.gitlab-registry.entrypoints: websecure
traefik.http.routers.gitlab-registry.rule: Host(`registry.domain.de`)
traefik.http.routers.gitlab-registry.service: gitlab-registry
traefik.http.routers.gitlab-registry.tls: "true"
traefik.http.routers.gitlab-registry.tls.certresolver: http_resolver
traefik.http.services.gitlab-registry.loadbalancer.server.port: "5000"
networks:
gitlab:
ipv4_address: ${SERVICE_GITLAB_REGISTRY_NETWORK_IPV4}
ipv6_address: ${SERVICE_GITLAB_REGISTRY_NETWORK_IPV6}
proxy: null
restart: unless-stopped
volumes:
- ./data/registry/data:/registry
- ./data/registry/certs:/certs
networks:
proxy:
external: true
gitlab:
name: ${NETWORK_GITLAB_NAME}
driver: bridge
ipam:
config:
- subnet: ${NETWORK_GITLAB_IPV4_SUBNET}
- subnet: ${NETWORK_GITLAB_IPV6_SUBNET}
attachable: true
enable_ipv6: true
secrets:
gitlab_root_password:
file: ${SECRETSDIR}/gitlab/root
postgres_password:
file: ${SECRETSDIR}/postgres/gitlab/password
configs:
gitlab:
file: ./gitlab.rb
With the configuration also no network is created which I have not defined
NETWORK ID NAME DRIVER SCOPE
64bc500e4b5d bridge bridge local
7800d82b9e1e crowdsec bridge local
713e1539ec48 gitlab bridge local
00d272097fa4 host host local
29e8b564e5c3 none null local
2c6bba012786 proxy bridge local