-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
51 lines (49 loc) · 1.09 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
version: '3'
volumes:
postgres_volume:
services:
chat-server:
image: chat-server:${APP_IMAGE_TAG}
container_name: chat-server
env_file:
- ${ENV}.env
ports:
- "${GRPC_PORT}:${GRPC_PORT}"
networks:
- service-network
depends_on:
db-chat:
condition: service_healthy
migrator-chat:
condition: service_completed_successfully
db-chat:
image: postgres:${POSTGRES_IMAGE_TAG}
container_name: db-chat
env_file:
- ${ENV}.env
ports:
- "${POSTGRES_PORT_LOCAL}:5432"
networks:
- service-network
volumes:
- postgres_volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 5s
retries: 5
migrator-chat:
image: migrator-chat:${MIGRATOR_IMAGE_TAG}
container_name: migrator-chat
restart: on-failure
environment:
DB_HOST: db-chat
networks:
- service-network
depends_on:
db-chat:
condition: service_healthy
networks:
service-network:
name: service-net
external: true