-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
95 lines (89 loc) · 2.05 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
services:
nginx:
container_name: nginx
image: nginx:stable-alpine-perl
restart: on-failure:3
ports:
- $NGINX_PORT:$NGINX_PORT
networks:
- nginx-connection
volumes:
- ./conf/:/etc/nginx/conf.d/
blue:
container_name: blue
image: habitpay/backend:v0.9.1
restart: on-failure:3
healthcheck:
test: "wget --quiet --spider localhost:$$BACKEND_PORT/actuator/health || exit 1"
start_period: 40s
interval: 1m
timeout: 5s
retries: 5
env_file:
- ../env/.env.backend.prod
- ../env/.env.db.prod
networks:
- nginx-connection
- db-connection
depends_on:
postgres:
condition: service_healthy
green:
container_name: green
image: habitpay/backend:v0.9.1
restart: on-failure:3
healthcheck:
test: "wget --quiet --spider localhost:$$BACKEND_PORT/actuator/health || exit 1"
start_period: 40s
interval: 1m
timeout: 5s
retries: 5
env_file:
- ../env/.env.backend.prod
- ../env/.env.db.prod
networks:
- nginx-connection
- db-connection
depends_on:
postgres:
condition: service_healthy
postgres:
container_name: postgres
image: postgres:16.2-alpine3.18
restart: on-failure:3
networks:
- db-connection
healthcheck:
test: pg_isready -h 127.0.0.1 -d $$POSTGRES_DB -U $$POSTGRES_USER
start_period: 5s
interval: 5s
timeout: 5s
retries: 55
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
TZ: "Asia/Seoul"
env_file:
- ../env/.env.db.prod
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
restart: on-failure:3
volumes:
- pgadmin-data:/var/lib/pgadmin
env_file:
- ../env/.env.pgadmin
networks:
- nginx-connection
- db-connection
depends_on:
postgres:
condition: service_healthy
volumes:
postgres-data:
pgadmin-data:
networks:
nginx-connection:
driver: bridge
db-connection:
driver: bridge