-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
75 lines (69 loc) · 1.39 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
version: '3.7'
services:
db:
container_name: db
image: postgres:13.1
environment:
POSTGRES_PASSWORD: postgres
networks:
- main
backend:
container_name: backend
build: ./backend
command: /start.sh
environment:
- SECRET_KEY=secret-key-for-development
- DEBUG=True
- STATIC_ROOT=static
- POSTGRES_NAME=postgres
- POSTGRES_USERNAME=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_SERVICE_HOST=db
- ADMIN_USER=admin
- ADMIN_PASSWORD=admin
volumes:
- '.:/code'
- 'django-static:/code/backend/static'
ports:
- 8000:8000
networks:
- main
depends_on:
- db
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: Dockerfile
stdin_open: true
tty: true
volumes:
- ./frontend:/app
- /app/node_modules
- django-static:/usr/src/app/static
ports:
- 3000:3000
networks:
- main
environment:
- CHOKIDIR_USEPOLLING=true
nginx:
container_name: nginx
build:
context: .
dockerfile: nginx/Dockerfile
ports:
- 80:80
depends_on:
- backend
- frontend
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- django-static:/usr/src/app/static
networks:
- main
networks:
main:
driver: bridge
volumes:
django-static: