-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
56 lines (53 loc) · 1.46 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
50
51
52
53
54
55
56
version: '3'
services:
nginx:
build: ./nginx
image: ${AWS_ECR_NGINX_REPO_URI}:latest
volumes:
- global_static:/usr/src/django/global_static
ports:
- "80:80"
- "443:443"
depends_on:
- web
web:
build: ./django
image: ${AWS_ECR_WEB_REPO_URI}:latest
# command: gunicorn django_server.wsgi:application --bind 0.0.0.0:8000
volumes:
# - ./django/:/usr/src/django/
- global_static:/usr/src/django/global_static
# expose:
# - 8000
# env_file:
# - web.configs
environment:
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY} # secret
- DATABASE=postgres
- SQL_ENGINE=django.db.backends.postgresql
- SQL_DATABASE=${SQL_DATABASE} # secret
- SQL_USER=${SQL_USER} # secret
- SQL_PASSWORD=${SQL_PASSWORD} # secret
- SQL_HOST=${SQL_HOST} # secret
- SQL_PORT=5432
- EMAIL_HOST=${EMAIL_HOST} # secret
- EMAIL_HOST_USER=${EMAIL_HOST_USER} # secret
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD} # secret
- EMAIL_PORT=${EMAIL_PORT} # secret
- ADMINS=${ADMINS} # secret
depends_on:
- db
db:
image: postgres:10.5-alpine
# env_file:
# - db.configs
environment:
POSTGRES_DB: ${SQL_DATABASE}
POSTGRES_USER: ${SQL_USER}
POSTGRES_PASSWORD: ${SQL_PASSWORD}
POSTGRES_DATA: /var/lib/postgresql/data/
volumes:
- postgres_data:/var/lib/postgresql/data/
volumes:
postgres_data:
global_static: