-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yml
49 lines (45 loc) · 1 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
version: '3'
services:
db:
image: postgres:12
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
volumes:
- 'postgres_data:/var/lib/postgresql/data/'
env_file:
./.db.env
web:
build: ./
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
command: >-
bash -c "python3 manage.py makemigrations && python3 manage.py migrate
--run-syncdb && python3 manage.py collectstatic --no-input &&
gunicorn glug_website.wsgi:application --workers 3 --bind 0.0.0.0:8000"
volumes:
- ./media:/app/backend/media:rw
- ./static:/app/backend/static:rw
ports:
- 8000:8000
env_file:
- ./.env
depends_on:
- db
volumes:
postgres_data:
# web-media:
# driver_opts:
# o: bind
# type: none
# device: ${LOC}/media
# web-static:
# driver_opts:
# o: bind
# type: none
# device: ${LOC}/static