Does anyone have an example docker-compose.yml file that also enabled container registry. I have tried to follow different documentations without success and would apricate to have an example to base my docker-compose.yml file on
This is what I have so far:
web:
image: ‘gitlab/gitlab-ce:latest’
restart: always
hostname: ‘gitlab.example.se’
environment:
GITLAB_REGISTRY_ENABLED: “true”
GITLAB_REGISTRY_HOST: registry.example.se
GITLAB_REGISTRY_PORT: 443
GITLAB_REGISTRY_API_URL: http://registry:5000
GITLAB_REGISTRY_KEY_PATH: /certs/registry.key
GITLAB_OMNIBUS_CONFIG: |
external_url ‘https://gitlab.example.se’
gitlab_rails[‘gitlab_shell_ssh_port’] = 3622
gitlab_rails[‘smtp_enable’] = true
gitlab_rails[‘smtp_address’] = “smtp.gmail.com”
gitlab_rails[‘smtp_port’] = 587
gitlab_rails[‘smtp_user_name’] = “no-reply@example.se”
gitlab_rails[‘smtp_password’] = “XXXXX”
gitlab_rails[‘smtp_domain’] = “smtp.gmail.com”
gitlab_rails[‘smtp_authentication’] = “login”
gitlab_rails[‘smtp_enable_starttls_auto’] = true
gitlab_rails[‘smtp_tls’] = false
gitlab_rails[‘smtp_openssl_verify_mode’] = ‘peer’
registry_external_url = ‘https://registry.example.se’
registry_nginx[‘ssl_certificate’] = “/srv/gitlab/certs/registry.pem”
registry_nginx[‘ssl_certificate_key’] = “/srv/gitlab/certs/registry.key”
ports:
- ‘3003:443’
- ‘2224:22’
volumes:
- ‘/srv/gitlab/config:/etc/gitlab’
- ‘/srv/gitlab/logs:/var/log/gitlab’
- ‘/srv/gitlab/data:/var/opt/gitlab’
- ‘/srv/gitlab/certs:/certs’
registry:
image: registry
restart: always
expose:
- 5000
ports:
- “5000:5000”
volumes:
- /srv/gitlab/registry:/registry
- /srv/gitlab/certs:/certs
environment:
- REGISTRY_LOG_LEVEL=info
- REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/registry
- REGISTRY_AUTH_TOKEN_REALM=https://gitlab.example.se/jwt/auth
- REGISTRY_AUTH_TOKEN_SERVICE=container_registry
- REGISTRY_AUTH_TOKEN_ISSUER=gitlab-issuer
- REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE=/certs/registry.crt
- REGISTRY_STORAGE_DELETE_ENABLED=true
- REGISTRY_HTTP_SECRET=registry