This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
327 lines (310 loc) · 7.15 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
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
version: "3.7"
services:
ldap:
environment:
LDAP_ADMIN_PASSWORD: ${LDAP_MANAGER_PASSWORD}
LDAP_ORGANISATION: ${LDAP_ORGANISATION}
LDAP_DOMAIN: ${LDAP_DOMAIN}
TZ: ${OS_TIMEZONE}
image: osixia/openldap:${VERSION_LDAP}
volumes:
- ldap_data:/var/lib/ldap
- ldap_conf:/etc/ldap/slapd.d
restart: always
healthcheck:
test: "ldapwhoami -xH ldapi:// || exit 1"
ldapadmin:
depends_on:
- ldap
image : osixia/phpldapadmin:${VERSION_LDAPADMIN}
ports:
- ${LDAPADMIN_PORT}:443
environment:
PHPLDAPADMIN_LDAP_HOSTS: ${LDAP_HOST}
TZ: ${OS_TIMEZONE}
restart: always
healthcheck:
test: "[ $$(pgrep -u www-data -c -f /usr/sbin/apache2) -gt 0 ] || exit 1"
smtp:
environment:
MAIL_RELAY_HOST: ${MAIL_RELAY_HOST}
MAIL_RELAY_PORT: ${MAIL_RELAY_PORT}
MAIL_RELAY_USER: ${MAIL_RELAY_USER}
MAIL_RELAY_PASS: ${MAIL_RELAY_PASS}
TZ: ${OS_TIMEZONE}
image: tecnativa/postfix-relay
restart: always
healthcheck:
test: "echo | openssl s_client -verify_quiet -connect localhost:${SMTP_PORT} -starttls smtp 2>/dev/null || exit 1"
passchg:
build:
context: ./service/ssp
args:
VERSION: ${VERSION_PASSCHG}
depends_on:
- ldap
- smtp
env_file:
- .env
environment:
MAIL_SMTP_HOST: smtp
LDAP_URL: ldap://${LDAP_HOST}
TZ: ${OS_TIMEZONE}
ports:
- ${PASSCHG_PORT}:80
restart: always
healthcheck:
test: "curl -sf localhost || exit 1"
interval: 5s
retries: 100
kvs:
environment:
TZ: ${OS_TIMEZONE}
image: redis:${VERSION_KVS}
restart: always
healthcheck:
test: "redis-cli ping"
dbms:
image: postgres:${VERSION_DBMS}
environment:
TZ: ${OS_TIMEZONE}
PGPORT: ${DB_PORT}
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: md5
POSTGRES_INITDB_ARGS: --auth-host=md5
restart: always
volumes:
- ./service/postgres/mount:/docker-entrypoint-initdb.d
- dbms_data:/var/lib/postgresql/data
healthcheck:
test: "pg_isready -d postgres -U postgres"
scm:
env_file:
- .env
build:
context: ./service/gitbucket
args:
VERSION: ${VERSION_SCM}
depends_on:
- ldap
- smtp
- dbms
- kvs
environment:
GITBUCKET_DB_URL: ${DB_JDBC_URL}/gitbucket
GITBUCKET_DB_USER: gitbucket
GITBUCKET_DB_PASSWORD: gitbucket
MAIL_SMTP_HOST: smtp
TZ: ${OS_TIMEZONE}
# ports:
# - 8081:8080
restart: always
volumes:
- scm_data:/etc/gitbucket
healthcheck:
test: "curl -sf localhost:8080/signin || exit 1"
interval: 5s
retries: 100
ci:
build:
context: ./service/jenkins
args:
VERSION: ${VERSION_CI}
depends_on:
- ldap
- smtp
env_file:
- .env
environment:
MAIL_SMTP_HOST: smtp
TZ: ${OS_TIMEZONE}
ports:
# - 8082:8080
- ${CI_SLAVE_AGENT_PORT}:50000
restart: always
volumes:
- ci_data:/var/jenkins_home
healthcheck:
test: "curl -sf localhost:8080/jenkins/ || exit 1"
interval: 5s
retries: 100
sca:
build:
context: ./service/sonarqube
args:
VERSION: ${VERSION_SCA}
depends_on:
- ldap
- dbms
env_file:
- .env
environment:
SONAR_JDBC_USERNAME: sonarqube
SONAR_JDBC_PASSWORD: sonarqube
SONAR_JDBC_URL: ${DB_JDBC_URL}/sonarqube
TZ: ${OS_TIMEZONE}
# ports:
# - 9000:9000
restart: always
volumes:
- sca_data:/opt/sonarqube/data
healthcheck:
test: "wget localhost:9000/sonarqube/ -O /dev/null -t 1 || exit 1"
interval: 5s
retries: 100
its:
build:
context: ./service/redmine
args:
VERSION: ${VERSION_ITS}
depends_on:
- dbms
- ldap
- smtp
env_file:
- .env
environment:
REDMINE_DB_POSTGRES: ${DB_HOST}
REDMINE_DB_PORT: ${DB_PORT}
REDMINE_DB_USERNAME: redmine
REDMINE_DB_PASSWORD: redmine
REDMINE_DB_DATABASE: redmine
RAILS_RELATIVE_URL_ROOT: /redmine
MAIL_SMTP_HOST: smtp
TZ: ${OS_TIMEZONE}
# ports:
# - 3000:3000
restart: always
volumes:
- its_data:/usr/src/redmine/files
healthcheck:
test: "wget localhost:3000/redmine -O /dev/null -t 1 || exit 1"
interval: 5s
retries: 100
arm:
image: sonatype/nexus3:${VERSION_ARM}
depends_on:
ldap:
condition: service_started
ci:
condition: service_healthy
environment:
TZ: ${OS_TIMEZONE}
ports:
- ${NEXUS_DOCKER_PORT}:${NEXUS_DOCKER_PORT}
volumes:
- arm_data:/nexus-data
entrypoint: >
bash -c
"echo -n ${LDAP_MANAGER_PASSWORD} > /nexus-data/admin.password &&
/opt/sonatype/nexus/bin/nexus run"
restart: always
healthcheck:
test: "curl -sf localhost:8081 || exit 1"
interval: 5s
retries: 100
proxy:
build:
context: ./service/nginx
args:
VERSION: ${VERSION_PROXY}
depends_on:
arm:
condition: service_healthy
ci:
condition: service_healthy
its:
condition: service_healthy
sca:
condition: service_healthy
scm:
condition: service_healthy
passchg:
condition: service_healthy
wiki:
condition: service_healthy
env_file:
- .env
ports:
- ${PROXY_PORT}:${PROXY_PORT}
restart: always
work:
build:
context: ./service/work
args:
VERSION: ${VERSION_WORK}
env_file:
- .env
environment:
TZ: ${OS_TIMEZONE}
volumes:
- ./service/work/mount:/mnt
- work_data:/tmp/init
restart: always
e2etest:
build:
context: ./e2etest
args:
VERSION: ${VERSION_PW}
env_file:
- .env
volumes:
- ./e2etest:/mnt
- /mnt/node_modules
ports:
- "9323:9323"
ipc: host
extra_hosts:
- wiki.localhost:127.0.0.1
restart: always
wiki:
env_file:
- .env
image: requarks/wiki:${VERSION_WIKI}
depends_on:
- ldap
- dbms
- search-engine
environment:
DB_TYPE: postgres
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_USER: wikijs
DB_PASS: wikijs
DB_NAME: wikijs
TZ: ${OS_TIMEZONE}
healthcheck:
test: "curl -sf localhost:3000 || exit 1"
interval: 5s
retries: 100
search-engine:
env_file:
- .env
image: docker.elastic.co/elasticsearch/elasticsearch:${VERSION_ES}
environment:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
volumes:
- search_engine_data:/usr/share/elasticsearch/data
entrypoint: >
bash -c "
{
if [ -z $(elasticsearch-plugin list) ]; then
elasticsearch-plugin install analysis-kuromoji
fi
} && docker-entrypoint.sh"
healthcheck:
test: "curl -sf localhost:9200 || exit 1"
interval: 5s
retries: 100
volumes:
ci_data:
dbms_data:
its_data:
ldap_conf:
ldap_data:
sca_data:
scm_data:
arm_data:
search_engine_data:
work_data: