infrastructure/ansible/roles/gitlab/files/docker-compose.yml

62 lines
1.9 KiB
YAML
Raw Normal View History

2020-08-29 23:56:14 +01:00
version: "2.3"
services:
gitlab:
image: gitlab/gitlab-ce:latest
hostname: gitlab.theorangeone.net
environment:
TZ: Europe/London
GITLAB_OMNIBUS_CONFIG: |
{% filter indent(width=8) %}
{%- include "gitlab.rb" %}
{% endfilter %}
volumes:
2020-08-30 10:19:57 +01:00
- /mnt/tank/app-data/gitlab/config:/etc/gitlab
- /mnt/tank/app-data/gitlab/data:/var/opt/gitlab
- /mnt/tank/app-data/gitlab/pages:/mnt/pages
2020-08-29 23:56:14 +01:00
tmpfs:
- /var/log/gitlab
restart: unless-stopped
depends_on:
- db
- redis
2020-08-30 11:22:15 +01:00
ports:
2020-08-30 21:08:04 +01:00
- "{{ wireguard.clients.intersect.ip }}:8022:22"
2020-08-29 23:56:14 +01:00
labels:
- traefik.enable=true
- traefik.http.routers.gitlab.rule=Host(`git.theorangeone.net`) || Host(`git.0rng.one`)
2020-08-29 23:56:14 +01:00
- traefik.http.routers.gitlab.tls.certresolver=le
- traefik.http.services.gitlab-gitlab.loadbalancer.server.port=80
- traefik.http.services.gitlab-gitlab.loadbalancer.server.scheme=http
- traefik.http.routers.gitlab.middlewares=compress@file
db:
image: postgres:12-alpine
restart: unless-stopped
volumes:
2020-08-30 10:19:57 +01:00
- /mnt/tank/dbs/postgres/gitlab:/var/lib/postgresql/data
2020-08-29 23:56:14 +01:00
environment:
- POSTGRES_PASSWORD=gitlab
- POSTGRES_USER=gitlab
- POSTGRES_DB=gitlabhq_production
redis:
image: redis:6-alpine
restart: unless-stopped
volumes:
2020-08-30 10:19:57 +01:00
- /mnt/tank/dbs/redis/gitlab:/data
lsyncd:
image: theorangeone/lsyncd:latest
environment:
- PUID=998
- PGID=998
restart: unless-stopped
volumes:
- /mnt/tank/app-data/gitlab/pages:/mnt/pages:ro
- /mnt/tank/app-data/gitlab/lsyncd/lsyncd.lua:/config/lsyncd.lua:ro
- /mnt/tank/app-data/gitlab/lsyncd/id_ed25519.pub:/config/.ssh/id_ed25519.pub
- /mnt/tank/app-data/gitlab/lsyncd/id_ed25519:/config/.ssh/id_ed25519
- /mnt/tank/app-data/gitlab/lsyncd/known_hosts:/config/.ssh/known_hosts