-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
36 lines (33 loc) · 1002 Bytes
/
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
version: "3.11"
services:
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 migrate --noinput && \
python manage.py collectstatic --noinput && \
python manage.py createsuperuser --user admin --email exchange@localhost --noinput > /dev/null; \
python manage.py loaddefaults; \
gunicorn --workers=2 --threads=2 -b 0.0.0.0 -p 8000 config.wsgi:application"
volumes:
- ./web:/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"
- "443:443"
volumes:
- ./web/staticfiles:/web/staticfiles