-
Notifications
You must be signed in to change notification settings - Fork 21
/
docker-compose.yml
54 lines (49 loc) · 1.31 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
version: "3.8"
services:
redis:
restart: always
container_name: redis
image: redis:latest
web:
restart: always
container_name: web
build: ./web/
command: >
sh -c "while ! python manage.py sqlflush > /dev/null 2>&1; do sleep 1; done && \
python manage.py makemigrations --noinput && \
python manage.py migrate --noinput && \
python manage.py migrate --run-syncdb --noinput && \
python manage.py collectstatic --noinput && \
python manage.py createsuperuser --user admin --email exchange@localhost --noinput > /dev/null; \
daphne -b 0.0.0.0 -p 8000 config.routing:application"
volumes:
- ./web:/web
celery:
restart: always
container_name: celery
build: ./web/
command: celery -A config worker -l info -c 4
volumes:
- ./web:/web
depends_on:
- db
- redis
- web
db:
restart: always
container_name: db
image: postgres:latest
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
volumes:
- ./postgre:/var/lib/postgresql/data
nginx:
restart: always
build: ./nginx/
container_name: nginx
ports:
- "80:80"
volumes:
- ./web/staticfiles:/web/staticfiles