trustai-uk/gitlab-compose.yml

38 lines
1.2 KiB
YAML

version: '3'
services:
gitlab:
image: gitlab/gitlab-ce:13.5.5-ce.0
#ports:
# - "2222:22"
volumes:
- ./gitlab/config:/etc/gitlab
- ./gitlab/logs:/var/log/gitlab
- ./gitlab/data:/var/opt/gitlab
networks:
- traefik-public
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.trustai.uk'
nginx['listen_port'] = 80
letsencrypt['enable'] = false
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitlab.rule=Host(`gitlab.trustai.uk`)"
- "traefik.http.routers.gitlab.entrypoints=web"
- "traefik.http.services.gitlab.loadbalancer.server.port=80"
# TLS
- "traefik.http.routers.gitlabs.rule=Host(`gitlab.trustai.uk`)"
- "traefik.http.routers.gitlabs.entrypoints=websecure"
- "traefik.http.routers.gitlabs.tls.certresolver=myhttpchallenge"
# Redirect
- "traefik.http.routers.gitlab.middlewares=https_redirect"
- "traefik.http.middlewares.https_redirect.redirectscheme.scheme=https"
gitlab-runner:
image: gitlab/gitlab-runner:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
traefik-public:
external: true