-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
44 lines (40 loc) · 932 Bytes
/
docker-compose.prod.yml
File metadata and controls
44 lines (40 loc) · 932 Bytes
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.7'
services:
web:
image: ${WEB_IMAGE}
command: gunicorn pythondjango.wsgi:application --bind 0.0.0.0:8000
volumes:
- static_volume:/static
expose:
- 8000
environment:
- SECRET_KEY=${SECRET_KEY}
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS}
- DB_ENGINE=${DB_ENGINE}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
depends_on:
- db
db:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
nginx:
restart: always
image: ${NGINX_IMAGE}
ports:
- 80:80
volumes:
- static_volume:/static
depends_on:
- web
volumes:
postgres_data:
static_volume: