-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (68 loc) · 1.56 KB
/
docker-compose.yml
File metadata and controls
70 lines (68 loc) · 1.56 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
version: '3'
services:
db:
image: postgres:13
volumes:
- ./database/postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=blog_db
- POSTGRES_USER=django_user
- POSTGRES_PASSWORD=django_password
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U django_user"]
interval: 5s
timeout: 5s
retries: 5
comments_db:
image: postgres:13
volumes:
- ./database/comments_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=comments_db
- POSTGRES_USER=comments_user
- POSTGRES_PASSWORD=comments_password
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U comments_user"]
interval: 5s
timeout: 5s
retries: 5
web:
build: ./Backend_DRF
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./Backend_DRF:/app
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
environment:
- DB_NAME=blog_db
- DB_USER=django_user
- DB_PASSWORD=django_password
- DB_HOST=db
- DB_PORT=5432
frontend:
build: ./Frontend_Nuxt
ports:
- "3000:3000"
depends_on:
db:
condition: service_healthy
comments:
build: ./Comments_Microservice
ports:
- "8001:8001"
depends_on:
comments_db:
condition: service_healthy
environment:
- DB_NAME=comments_db
- DB_USER=comments_user
- DB_PASSWORD=comments_password
- DB_HOST=comments_db
- DB_PORT=5432