forked from sfimediafutures/DEMO_personalisation-reranker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
99 lines (88 loc) · 2.13 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: '3'
services:
web:
container_name: VISREC-BACKEND
build:
context: ./backend
ports:
- "8000:8000"
volumes:
- ./backend/web:/web
- ./backend/data:/data
- ./backend/static:/static
environment:
- DB_HOST=db
- DB_NAME=web
- DB_USER=postgres
- DB_PASS=supersecretpassword
- TMDB_KEY=${TMDB_KEY}
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
- DJANGO_DEBUG=${DJANGO_DEBUG}
networks:
- django_network
depends_on:
- db
command: >
sh -c "
python3 manage.py wait_for_db &&
python3 manage.py makemigrations handler &&
python3 manage.py makemigrations &&
python3 manage.py migrate &&
python3 manage.py collectstatic --no-input &&
python3 manage.py runserver 0.0.0.0:8000"
# gunicorn web.wsgi --bind 0.0.0.0:8000
db:
container_name: VISREC-DB
image: postgres:latest
environment:
- POSTGRES_DB=web
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=supersecretpassword
ports:
- "5432:5432"
networks:
- django_network
redis:
container_name: VISREC-REDIS
image: redis:alpine
networks:
- django_network
# celery:
# container_name: CELERY
# restart: always
# build:
# context: ./backend
# command: celery -A web.celery worker -l INFO
# volumes:
# - ./backend/web:/web
# - ./backend/data:/data
# environment:
# - DB_HOST=db
# - DB_NAME=web
# - DB_USER=postgres
# - DB_PASS=supersecretpassword
# - TMDB_KEY=${TMDB_KEY}
# - DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
# - DJANGO_DEBUG=${DJANGO_DEBUG}
# networks:
# - django_network
# depends_on:
# - db
# - redis
# - web
nginx:
container_name: VISREC-NGINX
image: nginx
volumes:
- ./backend/static:/static
- ./frontend/dist:/var/www/html
- ./backend/nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- 80:80
networks:
- django_network
depends_on:
- web
networks:
django_network:
driver: bridge