-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (72 loc) · 1.42 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
version: "3.9"
services:
db:
image: postgres:12
restart: unless-stopped
ports:
- 5432:5432
volumes:
- db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=vivid_db
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
networks:
- vivid-network
backend:
container_name: django
build:
context: backend
dockerfile: Dockerfile
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- static:/app/backend/static
ports:
- 8000:8000
environment:
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- DB_HOST=db
networks:
- vivid-network
links:
- db
depends_on:
- db
webapp:
container_name: nextjs
build:
context: frontend
dockerfile: Dockerfile
networks:
- vivid-network
command:
"npm start"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- node-modules:/app/webapp/node_modules
links:
- backend
nginx:
container_name: nginx
image: nginx
build:
context: devops/nginx
dockerfile: Dockerfile
volumes:
- static:/app/backend/static
ports:
- 8080:8080
links:
- backend
- webapp
networks:
- vivid-network
command: [nginx-debug, '-g', 'daemon off;']
volumes:
db:
node-modules:
static:
networks:
vivid-network: