-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.test.yaml
More file actions
93 lines (89 loc) · 2.26 KB
/
compose.test.yaml
File metadata and controls
93 lines (89 loc) · 2.26 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
services:
proxy:
build: ./proxy
container_name: test-school-secretary-proxy
ports:
- 8080:80
env_file:
- ./proxy/.env
depends_on:
api:
condition: service_healthy
app:
condition: service_healthy
networks:
- public
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://localhost:80/healthcheck || exit 1",
]
interval: 10s
timeout: 10s
retries: 20
start_period: 30s
app:
build:
context: ./app
dockerfile: Dockerfile.test
container_name: test-school-secretary-app
environment:
- NODE_ENV=test
env_file:
- ./app/.env
depends_on:
api:
condition: service_healthy
networks:
- public
restart: unless-stopped
healthcheck:
test:
[
"CMD-SHELL",
"curl -sf http://localhost:3000/healthcheck || exit 1",
]
interval: 10s
timeout: 10s
retries: 10
start_period: 30s
api:
build:
context: ./api
dockerfile: Dockerfile.test
container_name: test-school-secretary-api
env_file:
- ./api/.env
depends_on:
db:
condition: service_healthy
networks:
- public
- private
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "python /api/healthcheck.py"]
interval: 10s
timeout: 10s
retries: 5
start_period: 30s
db:
build: ./db
container_name: test-school-secretary-db
env_file:
- ./db/.env
networks:
- private
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 10s
retries: 5
start_period: 20s
networks:
public:
driver: bridge
private:
driver: bridge