This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (66 loc) · 1.73 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
version: '3.8'
services:
db:
restart: always
build: ./postgres
container_name: chronicles_postgres
env_file:
- postgres/database.env
expose:
- 5432
volumes:
- database:/var/lib/postgresql/data/
networks:
- chronicles_network
redis:
restart: always
build: ./redis
container_name: chronicles_redis
expose:
- 6379
networks:
- chronicles_network
web:
restart: always
build:
context: ./code
container_name: chronicles_web
command: sh -c "python manage.py collectstatic --no-input && python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
volumes:
- ./code/:/code/
- ./static/:/static/
- ./media/:/media/
expose:
- 8000
depends_on:
- db
- redis
networks:
- chronicles_network
frontend:
container_name: chronicles_frontend
build: ./frontend
volumes:
- frontend_build:/frontend/build/
networks:
- chronicles_network
nginx:
build: ./nginx
container_name: chronicles_nginx
ports:
- "54330:80"
volumes:
- ./static/:/static/
- ./media/:/media/
- ./nginx/configuration/:/etc/nginx/conf.d/
- frontend_build:/var/www/frontend/
depends_on:
- web
- frontend
networks:
- chronicles_network
volumes:
database:
frontend_build:
networks:
chronicles_network: