-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
44 lines (39 loc) · 925 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
version: "3.9"
services:
postgres_db:
image: postgres:latest
container_name: postgres_db
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data/
pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin
depends_on:
- postgres_db
ports:
- "5051:5050"
dj_backend:
build: .
ports:
- "8000:8000"
command: bash -c "python manage.py migrate --noinput && python manage.py collectstatic --noinput && exec gunicorn core.wsgi:application -b 0.0.0.0:8000 -w 4"
volumes:
- .:/app/
depends_on:
- postgres_db
environment:
- DJANGO_SETTINGS_MODULE=core.settings.production
- DEBUG=False
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- dj_backend
volumes:
postgres_data: