-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
104 lines (104 loc) · 2.45 KB
/
docker-compose.yaml
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
services:
web:
build:
context: .
image: web
volumes:
- .:/app
ports:
- ${PORT:-8000}:${PORT:-8000}
# Let the init system handle signals for us.
# among other things this helps shutdown be fast
init: true
environment:
CTMS_DB_URL: postgresql://postgres@postgres/postgres
CTMS_SECRET_KEY: some-secret # used by integration tests # pragma: allowlist secret
env_file: .env
depends_on:
- postgres
healthcheck:
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/web/8000"]
interval: 3s
timeout: 1s
retries: 10
postgres:
image: postgres:12
ports:
- 5432:5432
environment:
POSTGRES_HOST_AUTH_METHOD: trust
LC_COLLATE: en_US.UTF8
LC_CTYPE: en_US.UTF8
PGUSER: postgres
healthcheck:
test: ["CMD", "pg_isready"]
interval: 1s
timeout: 5s
retries: 5
postgres-admin:
image: adminer
restart: always
depends_on:
postgres:
condition: service_healthy
ports:
- 8080:8080
basket:
profiles: [integration-test]
image: mozmeao/basket:2024-10-21
env_file:
- ./tests/integration/basket.env
command:
./bin/run-dev.sh
ports:
- 9000:8000
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
basket-worker:
condition: service_healthy
healthcheck:
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/basket/8000"]
interval: 3s
timeout: 1s
retries: 10
basket-worker:
profiles: [integration-test]
image: mozmeao/basket:2024-10-21
env_file:
- ./tests/integration/basket.env
command:
./bin/run-worker.sh
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
web:
condition: service_healthy
healthcheck:
test: rq info -R default | grep -q "queues"
interval: 3s
timeout: 1s
retries: 5
mysql:
profiles: [integration-test]
image: mariadb:11.2.3
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=basket
healthcheck:
test: mariadb --user=root --password="" --execute "SHOW DATABASES;"
interval: 3s
timeout: 1s
retries: 5
redis:
profiles: [integration-test]
image: redis
healthcheck:
test: redis-cli ping
interval: 3s
timeout: 1s
retries: 5