-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
134 lines (120 loc) · 3.63 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
version: '3.8'
services:
postgresql:
image: postgres:14.1-alpine
restart: unless-stopped
environment:
- POSTGRES_USER=gitlab
- POSTGRES_PASSWORD=password
- POSTGRES_DB=gitlabhq_production
volumes:
- /var/lib/gitlab/postgresql/:/var/lib/postgresql/
healthcheck:
test: ['CMD', 'pg_isready']
interval: 10s
start_period: 30s
gitlab:
image: sameersbn/gitlab:14.5.2
restart: unless-stopped
ports:
- "9922:22"
healthcheck:
test: ["CMD", "/usr/local/sbin/healthcheck"]
interval: 5m
timeout: 10s
retries: 3
start_period: 5m
env_file: gitlab.env
environment:
- VIRTUAL_HOST=gitlab.example.com
# - LETSENCRYPT_HOST=gitlab.example.com
- DEBUG=false
- TZ=Europe/Paris
- USERMAP_UID=1010
- USERMAP_GID=1010
- DB_ADAPTER=postgresql
- DB_HOST=postgresql
- DB_NAME=gitlabhq_production
- DB_USER=gitlab
- DB_PASS=password
- REDIS_HOST=redis
- REDIS_PORT=6379
- GITLAB_TIMEZONE=Paris
- GITLAB_HOST=gitlab.example.com
- GITLAB_PORT=10080
- GITLAB_SSH_PORT=22
- GITLAB_RELATIVE_URL_ROOT=
- GITLAB_NOTIFY_ON_BROKEN_BUILDS=true
- GITLAB_NOTIFY_PUSHER=false
- GITLAB_BACKUP_SCHEDULE=daily
- GITLAB_BACKUP_TIME=01:00
- GITLAB_BACKUP_EXPIRY=604800
- GITLAB_BACKUP_DIR=/home/git/data/backups
- SMTP_ENABLED=true
- SMTP_DOMAIN=gitlab.example.com
- SMTP_HOST=postfix
- SMTP_PORT=25
- SMTP_USER=user
- SMTP_PASS=password
- SMTP_STARTTLS=true
- SMTP_AUTHENTICATION=login
- IMAP_ENABLED=false
- IMAP_HOST=imap.gmail.com
- IMAP_PORT=993
- IMAP_PASS=password
- IMAP_SSL=true
- IMAP_STARTTLS=false
- GITLAB_REGISTRY_ENABLED=true
- GITLAB_REGISTRY_HOST=registry.example.com
- GITLAB_REGISTRY_PORT=443
- GITLAB_REGISTRY_API_URL=http://registry:5000
- GITLAB_REGISTRY_KEY_PATH=/certs/registry.key
volumes:
- /var/lib/gitlab/data/:/home/git/data
- /home/git/.ssh/authorized_keys_proxy:/home/git/data/.ssh/authorized_keys_proxy
- ./certs:/certs
depends_on:
postgresql:
condition: service_healthy
redis:
condition: service_healthy
postfix:
condition: service_started
registry:
condition: service_started
redis:
image: sameersbn/redis:latest
restart: unless-stopped
volumes:
- /var/lib/gitlab/redis/:/var/lib/redis
healthcheck:
test: ["CMD", "redis-cli","ping"]
postfix:
image: marvambass/versatile-postfix:latest
restart: unless-stopped
volumes:
- ./dkim:/etc/postfix/dkim/
- ./maildirs:/var/mail
environment:
- DKIM_SELECTOR=gitlab
command: gitlab.example.com user:password
registry:
image: registry
restart: unless-stopped
volumes:
- /var/lib/gitlab/registry/:/registry
- ./certs:/certs
environment:
- VIRTUAL_HOST=registry.example.com
- REGISTRY_LOG_LEVEL=info
- REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/registry
- REGISTRY_AUTH_TOKEN_REALM=https://gitlab.example.com/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