-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
63 lines (58 loc) · 1.26 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
version: '3'
services:
backend:
build: ./backend
container_name: backend
env_file:
- .env
depends_on:
- db
volumes:
- ./backend:/var/ounass/backend
- ./backend/static:/var/ounass/backend/static
- ./backend/media:/var/ounass/backend/media
networks:
- nginx_network
- postgresql_network
frontend:
build: ./frontend
container_name: frontend
command: [ "npm", "start" ]
volumes:
- ./frontend/:/var/ounass/frontend
ports:
- "3000:3000"
depends_on:
- backend
networks:
- nginx_network
nginx:
build: ./nginx
container_name: nginx
ports:
- "80:80"
volumes:
- ./nginx:/etc/nginx/conf.d
- ./logs/nginx:/var/ounass/log/nginx
- ./backend/static:/var/ounass/backend/static
- ./backend/media:/var/ounass/backend/media
- ./frontend:/var/ounass/frontend
depends_on:
- backend
- frontend
networks:
- nginx_network
db:
image: postgres:13.0-alpine
container_name: postgresql
env_file:
- .env
networks:
- postgresql_network
volumes:
- ./postgres/data:/var/lib/postgresql/data
networks:
nginx_network:
driver: bridge
postgresql_network:
driver: bridge