-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (84 loc) · 1.87 KB
/
Copy pathdocker-compose.yml
File metadata and controls
89 lines (84 loc) · 1.87 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
services:
db:
build:
context: services/postgres
dockerfile: build/Dockerfile
environment:
- POSTGRES_PASSWORD=${SQL_PASSWORD}
- POSTGRES_USER=${SQL_USER}
volumes:
- postgres-db:/var/lib/postgresql/data
expose:
- "5432"
networks:
- django_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${SQL_USER}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
django:
build:
context: ./services/django
dockerfile: build/Dockerfile.${DOCKERFILE_EXT}
env_file:
- .env
volumes:
- ./services/django:/code
- ./services/django/core/mediafiles:/code/core/mediafiles
expose:
- "8000"
networks:
- transcendence
- django_network
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/hello"]
interval: 10s
timeout: 5s
retries: 5
frontend:
build:
context: ./services/frontend
dockerfile: build/Dockerfile
volumes:
- /frontend/node_modules
- ./services/frontend/core:/frontend/
expose:
- "8080"
networks:
- transcendence
- django_network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 10s
timeout: 5s
retries: 5
nginx:
build:
context: ./services/nginx
dockerfile: build/Dockerfile
volumes:
- ./services/nginx/core/config:/etc/nginx/conf.d
- ./services/django:/code
ports:
- "443:443"
- "80:80"
networks:
- transcendence
depends_on:
django:
condition: service_healthy
frontend:
condition: service_healthy
restart: on-failure
networks:
transcendence:
driver: bridge
django_network:
driver: bridge
volumes:
postgres-db: