-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
60 lines (57 loc) · 1.24 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
# The base docker-compose file.
# During local development this file will be merged with
# docker-compose.override.yml, providing config only used
# in testing and development. During production it will be
# merged with docker-compose.prod.yml instead.
version: '3'
services:
db:
image: postgres:10.1-alpine
networks:
- db_network
volumes:
- postgres_data:/var/lib/postgresql/data/
backend:
build: backend
environment:
- DJANGO_ALLOWED_HOSTS
volumes:
- backend_static:/backend/static
- backend_media:/backend/media
networks:
- db_network
- nginx_network
depends_on:
- db
frontend:
build:
context: frontend
args:
- REACT_APP_BASE_URL=/api
environment:
- REACT_APP_BASE_URL=/api
networks:
- nginx_network
nginx:
image: nginx
environment:
- host=liquidator
ports:
- ${NGINX_PORT:-8000}:80
volumes:
- backend_static:/backend/static:ro
- backend_media:/backend/media:ro
depends_on:
- frontend
- backend
networks:
- nginx_network
networks:
db_network:
driver: bridge
nginx_network:
driver: bridge
volumes:
postgres_data:
backend_static:
backend_media: