-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
400 lines (368 loc) · 10.7 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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
services:
#########################
# BMO Containers
#########################
bmo.test:
platform: linux/x86_64
image: mozillabteam/bmo:latest
command: demo
volumes:
- bmo-data-dir:/app/data
environment: &bmo_env
BMO_db_host: bmo.db
BMO_db_name: bugs
BMO_db_pass: bugs
BMO_db_user: bugs
BMO_inbound_proxies: "*"
BMO_memcached_namespace: bugzilla
BMO_memcached_servers: memcached:11211
BMO_urlbase: http://bmo.test/
BUGZILLA_ALLOW_INSECURE_HTTP: 1
BZ_ANSWERS_FILE: /app/conf/checksetup_answers_suite.txt
CONDUIT_USER_API_KEY: zQ5TSBzq7tTZMtKYq9K1ZqJMjifKx3cPL7pIGk9Q
CONDUIT_USER_LOGIN: [email protected]
CONDUIT_USER_PASSWORD: password123456789!
HTTP_BACKEND: simple
HTTPD_MaxClients: 1
HTTPD_MaxRequestsPerChild: 4000
HTTPD_MaxSpareServers: 1
HTTPD_MinSpareServers: 1
HTTPD_ServerLimit: 1
HTTPD_StartServers: 1
LOCALCONFIG_ENV: 1
LOG4PERL_CONFIG_FILE: log4perl-suite.conf
LOGGING_PORT: 5880
PHABRICATOR_API_KEY: api-qdaethogwpld3wmn2cnhbh57wkux
PHABRICATOR_APP_ID: 66365490f364fbafba439619f0f31b7a4a0d73528c485520adf3b295f934acda
PHABRICATOR_AUTH_CALLBACK_URL: http://phabricator.test/auth/login/bmo:bmo.test/
PHABRICATOR_BOT_API_KEY: 8G4ly8JkxbypZgh5XrdiHWExVEjPq5S3HvMBll1K
PHABRICATOR_BOT_LOGIN: [email protected]
PHABRICATOR_BOT_PASSWORD: password123456789!
PHABRICATOR_OAUTH_ID: 6iaYNVorOeYQaQ5vkwyC
PHABRICATOR_OAUTH_SECRET: QNzdU5eRuhlHotvkh8KBgtR3yqxMG3czKfNks1qt
PORT: 80
healthcheck:
test: ["CMD", "curl", "-sfk", "http://localhost", "-o/dev/null" ]
depends_on:
bmo.db:
condition: service_healthy
memcached:
condition: service_started
tinyproxy:
condition: service_started
bmo.feed:
platform: linux/x86_64
image: mozillabteam/bmo:latest
command:
- perl
- extensions/PhabBugz/bin/phabbugz_feed.pl
- start
- '-d'
- '-f'
volumes:
- bmo-data-dir:/app/data
environment: *bmo_env
restart: on-failure
depends_on:
- phabricator.test
- bmo.db
- memcached
bmo.pushd:
platform: linux/x86_64
image: mozillabteam/bmo:latest
command:
- perl
- extensions/Push/bin/bugzilla-pushd.pl
- start
- '-d'
- '-f'
volumes:
- bmo-data-dir:/app/data
environment: *bmo_env
restart: on-failure
depends_on:
- phabricator.test
- bmo.db
- memcached
bmo.db:
platform: linux/x86_64
image: mysql:8
volumes:
- bmo-mysql-db:/var/lib/mysql
- ./docker/bmo/mysql:/etc/mysql/conf.d
tmpfs:
- /tmp
logging:
driver: "none"
environment:
MYSQL_DATABASE: bugs
MYSQL_USER: bugs
MYSQL_PASSWORD: bugs
MYSQL_ALLOW_EMPTY_PASSWORD: 1
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-ubugs", "-pbugs"]
timeout: 180s
memcached:
image: memcached:latest
#########################
# Lando Containers
#########################
lando-ui:
platform: linux/x86_64
image: mozilla/landoui:latest
environment:
DEBUG: 1
ENV: localdev
HOST: 0.0.0.0
LANDO_API_OIDC_IDENTIFIER: http://lando-api.test
LANDO_API_URL: http://lando-api.test
PORT: 9000
SECRET_KEY: secret_key_change_me
SENTRY_DSN:
SESSION_COOKIE_DOMAIN: lando-ui.test
SESSION_COOKIE_NAME: lando-ui.test
SESSION_COOKIE_SECURE: 0
TREESTATUS_URL: http://treestatus.test
USE_HTTPS: 0
UWSGI_HTTP: :9000
UWSGI_SOCKET: :9001
VERSION_PATH: /version.json
lando-api: &api_template
platform: linux/x86_64
image: mozilla/landoapi:latest
environment: &api_environment
OIDC_IDENTIFIER: http://lando-api.test
LOCALDEV_MOCK_AUTH0_USER: inject_valid # [default / inject_invalid]
DATABASE_URL: postgresql://postgres:[email protected]/postgres
ENV: localdev
HOST_URL: http://lando-api.test
LANDO_UI_URL: http://lando-ui.test
PINGBACK_ENABLED: y
PINGBACK_HOST_URL: http://lando-api.test
PHABRICATOR_URL: http://phabricator.test
PHABRICATOR_UNPRIVILEGED_API_KEY: api-lefsv24henzsbzpw337bhizawuyh
TRANSPLANT_URL: http://transplant-api.test/
TRANSPLANT_USERNAME: autoland
TRANSPLANT_PASSWORD: autoland
TRANSPLANT_API_KEY: autoland
SENTRY_DSN:
UWSGI_HTTP: :9000
UWSGI_SOCKET: :9001
depends_on:
- lando-api.db
treestatus:
<<: *api_template
environment:
<<: *api_environment
HOST_URL: http://treestatus.test
# Define the treestatus module as a clone of `lando-api` except for the
# `TREESTATUS_APP` environment variable, so the Treestatus API endpoints
# are loaded.
TREESTATUS_APP: 1
lando-api.db:
platform: linux/x86_64
image: postgres:14
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
volumes:
- lando-postgres-db:/var/lib/postgresql/data
lando-api.landing-worker:
platform: linux/x86_64
build:
context: ../lando-api/
dockerfile: ./Dockerfile
image: suite_lando-api
command: ["landing-worker"]
environment:
- ENV=localdev
- DATABASE_URL=postgresql://postgres:[email protected]/postgres
- SENTRY_DSN=
- CELERY_BROKER_URL=redis://redis.queue/0
- OIDC_IDENTIFIER=https://lando-api.test
- LANDO_UI_URL=https://lando.test
- REPO_CLONES_PATH=/repos
- REPOS_TO_LAND=first-repo
volumes:
- ../lando-api:/app
- ../lando-api/migrations:/migrations
# Prevent writing python cache to the host.
- caches_cache:/app/.cache/
depends_on:
- lando-api.db
- redis.queue
redis.queue:
platform: linux/x86_64
image: redis:3.2-alpine
###############################
# Phabricator Containers
###############################
phabricator:
platform: linux/x86_64
image: mozillaconduit/phabricator:latest
entrypoint: /app/entrypoint.sh
command: dev_start
environment:
MYSQL_HOST: phab.db
MYSQL_PORT: 3306
MYSQL_USER: root
MYSQL_PASS: password
PHABRICATOR_URI: http://phabricator.test/
PHABRICATOR_CDN_URI: http://phabricator.test/
BUGZILLA_URL: http://bmo.test
BUGZILLA_AUTOMATION_USER: [email protected]
BUGZILLA_AUTOMATION_API_KEY: 8G4ly8JkxbypZgh5XrdiHWExVEjPq5S3HvMBll1K
volumes:
- phabricator-nginx:/app/nginx
restart: on-failure
depends_on:
phab.db:
condition: service_healthy
phab.db:
platform: linux/x86_64
image: mysql:5.7
volumes:
- phabricator-mysql-db:/var/lib/mysql
- ./docker/phabricator/mysql:/etc/mysql/conf.d:ro
- ./docker/phabricator/demo.sql.gz:/docker-entrypoint-initdb.d/demo.sql.gz
environment:
- MYSQL_ROOT_PASSWORD=password
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-ppassword"]
interval: 10s
timeout: 120s
retries: 13
restart: on-failure
###############################
# Transplant services
###############################
autoland.treestatus:
platform: linux/x86_64
image: mozilla/autolandtreestatus:latest
restart: always
autoland.hg-init:
platform: linux/x86_64
image: mozilla/autolandhg:latest
environment:
ARCCONFIG: y
PHABRICATOR_URI: http://phabricator.test
command: init
volumes:
- autoland-hg:/repos
autoland.hg:
platform: linux/x86_64
image: mozilla/autolandhg:latest
command: start
restart: always
environment:
SSH_PUBLIC_KEY: "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHWpDYI3qzSxV8tbjH8C4z3ef6QU2yBKGTHTFf6OrPrqDIO++ixfr4LW3yGmW4Q3CRJcx8KZ6hnx2FPnDOCsrqw="
volumes:
- autoland-hg:/repos
depends_on:
- autoland.hg-init
###########################
# LOCAL-DEV
# Provide an ability to run all CLI developer needs:
# * CVS push/pull to autoland.hg
# * moz-phab to phabricator.test
###########################
local-dev:
platform: linux/x86_64
build:
context: docker/local-dev
dockerfile: ./Dockerfile
environment:
HTTP_ALLOWED: 1
volumes:
- local-dev:/home/phab
depends_on:
- tinyproxy
- phabricator.test
- bmo.test
- bmo.feed
- bmo.pushd
- autoland.hg.test
###########################
# Proxy containers
###########################
tinyproxy:
platform: linux/x86_64
build:
context: docker/tinyproxy
dockerfile: ./Dockerfile
ports:
- "1080:1080"
phabricator.test:
platform: linux/x86_64
image: nginx:alpine
volumes:
- ./docker/phabricator/site.conf:/etc/nginx/conf.d/default.conf:ro
- phabricator-nginx:/app/nginx
restart: on-failure
healthcheck:
test: ["CMD", "curl", "-sfk", "http://localhost", "-H", "Host: phabricator.test", "-o/dev/null"]
depends_on:
- phabricator
- tinyproxy
lando-ui.test:
platform: linux/x86_64
image: nginx:alpine
container_name: lando-ui.test
volumes:
- ./docker/landoui/site.conf:/etc/nginx/conf.d/default.conf:ro
restart: on-failure
depends_on:
- lando-ui
- tinyproxy
lando-api.test: &api_proxy
platform: linux/x86_64
image: nginx:alpine
container_name: lando-api.test
volumes:
- ./docker/landoapi/site.conf:/etc/nginx/conf.d/default.conf:ro
restart: on-failure
depends_on:
- lando-api
- tinyproxy
treestatus.test:
platform: linux/x86_64
<<: *api_proxy
volumes:
- ./docker/landoapi/treestatus_site.conf:/etc/nginx/conf.d/default.conf:ro
container_name: treestatus.test
depends_on:
- treestatus
- tinyproxy
autoland.hg.test:
platform: linux/x86_64
image: nginx:alpine
container_name: hg.test
volumes:
- ./docker/autoland-hg/site.conf:/etc/nginx/conf.d/default.conf:ro
- autoland-hg:/repos
restart: on-failure
depends_on:
- autoland.hg
- tinyproxy
product-details.test:
platform: linux/x86_64
image: nginx:alpine
container_name: product-details.test
volumes:
- ./docker/product-details/site.conf:/etc/nginx/conf.d/default.conf:ro
- ./docker/product-details/1.0:/www/data/1.0
restart: on-failure
depends_on:
- tinyproxy
volumes:
phabricator-nginx:
phabricator-mysql-db:
lando-postgres-db:
local-dev:
bmo-mysql-db:
bmo-data-dir:
autoland-hg:
caches_cache: