-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
48 lines (45 loc) · 975 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
37
38
39
40
41
42
43
44
45
46
47
version: '3.3'
services:
db:
image: postgres
restart: always
container_name: db
env_file:
- db.env.dev
volumes:
- pgdata:/var/lib/postgresql/data
web:
restart: always
container_name: web
build: ./web
image: web
expose:
- "8000"
volumes:
- ./web:/web
- static:/static
- media:/media
stdin_open: true
tty: true
depends_on:
- db
env_file:
- ./web.env.dev
command: bash -c "python manage.py collectstatic --noinput && python manage.py makemigrations --noinput && python manage.py migrate --noinput && python web/manage.py makemigrations && /usr/local/bin/gunicorn ace.wsgi:application -w 2 -b :8000"
nginx:
restart: always
build: ./nginx/
container_name: nginx
image: nginx
ports:
- "80:80"
- "443:443"
volumes:
- static:/static
- media:/media
links:
- web:web
volumes:
static:
media:
pgdata: