-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcompose.yml
More file actions
179 lines (155 loc) · 6.21 KB
/
Copy pathcompose.yml
File metadata and controls
179 lines (155 loc) · 6.21 KB
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# https://docs.docker.com/compose/compose-file
volumes:
gitlab-etc:
gitlab-opt:
gitlab-log:
gitaly-etc:
gitaly-opt:
gitaly-log:
redis-etc:
redis-opt:
redis-log:
postgres-etc:
postgres-opt:
postgres-log:
services:
gitlab:
image: gitlab/gitlab-ee:18.10.8-ee.0
environment:
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template
GITLAB_OMNIBUS_CONFIG: |
gitlab_rails['time_zone'] = 'Europe/Berlin'
external_url 'http://gitlab.${DOMAIN:?You must supply DOMAIN}'
# Prevent conflict with host SSH port
gitlab_rails['gitlab_shell_ssh_port'] = 2222
# Configure remote gitaly
gitaly['enable'] = false
git_data_dirs({
'default' => { 'gitaly_address' => 'tcp://gitaly:8075' },
})
gitlab_rails['gitaly_token'] = "gitaly"
# Configure remote postgresql
postgresql['enable'] = false
gitlab_rails['db_adapter'] = 'postgresql'
gitlab_rails['db_encoding'] = 'utf8'
gitlab_rails['db_host'] = 'db'
gitlab_rails['db_port'] = '5432'
gitlab_rails['db_database'] = 'gitlab'
gitlab_rails['db_username'] = 'gitlab'
gitlab_rails['db_password'] = 'gitlab'
# Configure remote redis
redis['enable'] = false
gitlab_rails['redis_host'] = 'redis'
gitlab_rails['redis_port'] = 6379
gitlab_rails['redis_password'] = 'redis'
# https://docs.gitlab.com/ee/install/docker.html#devshm-mount-not-having-enough-space-in-docker-container
shm_size: 256m
volumes:
- /etc/localtime:/etc/localtime:ro
- gitlab-etc:/etc/gitlab
- gitlab-opt:/var/opt/gitlab
- gitlab-log:/var/log/gitlab
labels:
traefik.enable: "true"
traefik.http.services.www.loadbalancer.server.port: 80
traefik.http.routers.www.entrypoints: http
traefik.http.routers.www.rule: Host(`gitlab.${DOMAIN:?You must supply DOMAIN}`) || Host(`gitlab.${IP:?You must supply IP}.nip.io`)
traefik.http.routers.www.service: www
traefik.http.services.pages.loadbalancer.server.port: 8090
traefik.http.routers.pages.entrypoints: http
traefik.http.routers.pages.rule: Host(`.+\.gitlab\.${DOMAIN:?You must supply DOMAIN}`) || HostRegexp(`.+\.gitlab\.${IP:?You must supply IP}.nip.io`)
traefik.http.routers.pages.service: pages
traefik.tcp.services.ssh.loadbalancer.server.port: 2222
traefik.tcp.routers.ssh.entrypoints: ssh
traefik.tcp.routers.ssh.rule: HostSNI(`*`) || HostSNI(`*`)
traefik.tcp.routers.ssh.service: ssh
db:
image: gitlab/gitlab-ee:18.10.8-ee.0
environment:
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template
GITLAB_OMNIBUS_CONFIG: |
gitlab_rails['time_zone'] = 'Europe/Berlin'
# Disable services
sidekiq['enable'] = false
puma['enable'] = false
registry['enable'] = false
gitaly['enable'] = false
gitlab_workhorse['enable'] = false
nginx['enable'] = false
prometheus_monitoring['enable'] = false
redis['enable'] = false
postgresql['enable'] = true
postgresql['listen_address'] = '0.0.0.0'
postgresql['user'] = 'gitlab'
# password=gitlab
# username=gitlab
# echo -n '${password}${username}' | md5sum - | cut -d' ' -f1`
postgresql['sql_user_password'] = 'b7a289c0600988fe8e709dd2887e4d37'
postgresql['md5_auth_cidr_addresses'] = ['10.42.0.0/16']
postgresql['trust_auth_cidr_addresses'] = ['10.42.0.0/16']
## Configure gitlab_rails
gitlab_rails['auto_migrate'] = false
postgres_exporter['enable'] = true
volumes:
- /etc/localtime:/etc/localtime:ro
- postgres-etc:/etc/gitlab
- postgres-opt:/var/opt/gitlab
- postgres-log:/var/log/gitlab
redis:
image: gitlab/gitlab-ee:18.10.8-ee.0
environment:
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template
GITLAB_OMNIBUS_CONFIG: |
gitlab_rails['time_zone'] = 'Europe/Berlin'
# Disable services
alertmanager['enable'] = false
grafana['enable'] = false
prometheus['enable'] = false
redis_master_role['enable'] = true
redis['port'] = 6379
redis['bind'] = '0.0.0.0'
redis['password'] = 'redis'
gitlab_rails['redis_password'] = 'redis'
gitlab_rails['auto_migrate'] = false
redis_exporter['listen_address'] = '0.0.0.0:9121'
gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8','10.42.0.0/16']
volumes:
- /etc/localtime:/etc/localtime:ro
- redis-etc:/etc/gitlab
- redis-opt:/var/opt/gitlab
- redis-log:/var/log/gitlab
gitaly:
image: gitlab/gitlab-ee:18.10.8-ee.0
environment:
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template
GITLAB_OMNIBUS_CONFIG: |
gitlab_rails['time_zone'] = 'Europe/Berlin'
# Disable services
postgresql['enable'] = false
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
alertmanager['enable'] = false
grafana['enable'] = false
prometheus['enable'] = false
# Prevent database connections during 'gitlab-ctl reconfigure'
gitlab_rails['rake_cache_clear'] = false
gitlab_rails['auto_migrate'] = false
gitlab_rails['internal_api_url'] = 'http://gitlab'
gitlab_workhorse['auth_backend'] = 'http://gitlab'
gitaly['listen_addr'] = "0.0.0.0:8075"
gitaly['auth_token'] = "gitaly"
gitaly['storage'] = [
{ 'name' => 'default', 'path' => '/var/opt/gitlab/git-data/repositories' },
]
git_data_dirs({ "default" => { "path" => "/var/opt/gitlab/git-data" } })
# monitoring
gitaly['prometheus_listen_addr'] = "0.0.0.0:9236"
gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8','10.42.0.0/16']
volumes:
- /etc/localtime:/etc/localtime:ro
- gitaly-etc:/etc/gitlab
- gitaly-opt:/var/opt/gitlab
- gitaly-log:/var/log/gitlab