-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (42 loc) · 953 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: '4.0'
x-restart-policy: &restart_policy
restart: unless-stopped
services:
db:
# << : *restart_policy
build:
dockerfile: db_Dockerfile
env_file:
- .env
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- POSTGRES_HOST_PORT=${DB_HOST_PORT}
ports:
- "${DB_HOST_PORT}:5432"
volumes:
- necrotopia_db_volume:/var/lib/postgresql/data
web:
# << : *restart_policy
build:
dockerfile: web_Dockerfile
command: gunicorn necrotopia_project.wsgi:application --bind 0.0.0.0:8000
volumes:
- static_volume:/usr/src/app/staticfiles
- media_volume:/usr/src/app/mediafiles
ports:
- 8000:8000
expose:
- 8000
env_file:
- .env
depends_on:
- db
volumes:
media_volume:
driver: local
static_volume:
driver: local
necrotopia_db_volume:
driver: local