forked from asilnikov/docker_homework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
46 lines (46 loc) · 996 Bytes
/
docker-compose.yaml
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
version: '2.4'
networks:
front-back:
ipam:
config:
- subnet: 192.168.214.0/24
back-db:
ipam:
config:
- subnet: 192.168.200.0/24
volumes:
db_vol:
driver: local
services:
database:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile_db
restart: "unless-stopped"
networks:
- back-db
volumes:
- db_vol:/var/lib/postgresql/data
backend:
build:
context: ./lib_catalog/.
dockerfile: ./dockerfiles/Dockerfile_back
command: sh -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
restart: "unless-stopped"
depends_on:
- database
networks:
front-back:
ipv4_address: 192.168.214.214
back-db:
frontend:
build:
context: ./frontend/.
dockerfile: ./dockerfiles/Dockerfile_front
restart: "unless-stopped"
ports:
- "3000:3000"
depends_on:
- backend
networks:
- front-back