-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
73 lines (69 loc) · 1.45 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
x-app:
&default-app
networks:
- webnet
env_file:
- .env
# restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "3s"
tty: true
services:
frontend:
<<: *default-app
container_name: wallet_frontend
image: wallet_frontend
build:
context: .
dockerfile: Dockerfile.frontend
target: runner
ports:
- 80:${FRONTEND_PORT}
- 9229:9229
depends_on:
backend:
condition: service_healthy
backend:
<<: *default-app
container_name: wallet_backend
image: wallet_backend
build:
context: .
dockerfile: Dockerfile.backend
target: runner
ports:
- ${BACKEND_PORT}:${BACKEND_PORT}
- 9228:9228
command: "yarn start:prod"
depends_on:
database:
condition: service_healthy
healthcheck:
test:
[
"CMD-SHELL",
"wget -nv --tries=1 --spider http://${BACKEND_HOSTNAME}:${BACKEND_PORT}/health"
]
interval: 30s
timeout: 10s
retries: 5
database:
<<: *default-app
container_name: wallet_database
image: wallet_database
build:
context: .
dockerfile: Dockerfile.backend
target: database
ports:
- 27018:${DATABASE_PORT}
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://${DATABASE_HOSTNAME}:${DATABASE_PORT}"
]
interval: 30s
timeout: 10s
retries: 5
networks:
webnet: