-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
88 lines (82 loc) · 1.67 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: "3.9"
networks:
backend_tier:
driver: bridge
name: snd-net
app_tier:
driver: bridge
name: app-net
services:
db:
container_name: db
image: postgres
restart: always
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "snd-data"
networks:
- backend_tier
ports:
- "5432:5432"
healthcheck:
test: "pg_isready -h localhost -U postgres"
interval: 10s
retries: 5
start_period: 10s
migrate:
image: migrate/migrate
container_name: migrate
command:
[
"-path=/migrations/",
"-database",
"postgres://postgres:postgres@db:5432/snd-data?sslmode=disable",
"up",
]
volumes:
- ./monoBackend/services/monolith/migrations/:/migrations
networks:
- backend_tier
links:
- db
depends_on:
db:
condition: service_healthy
rest_server:
container_name: rest_server
build:
context: ./monoBackend
dockerfile: ./services/monolith/build/Dockerfile
args:
APP_PORT: 5000
env_file: ./monoBackend/configs/.env
environment:
DB_HOST: db
APP_PORT: 5000
APP_HOST: rest_server
networks:
- backend_tier
- app_tier
ports:
- "5000:5000"
depends_on:
migrate:
condition: service_completed_successfully
links:
- db:db
front:
container_name: front
build:
context: ./frontend
dockerfile: build/Dockerfile
volumes:
- ./frontend:/front
networks:
- app_tier
ports:
- "7000:7000"
depends_on:
- rest_server
links:
- rest_server