-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
73 lines (58 loc) · 1.39 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: '3.8'
#As much as I don't like it, it seems that the best way to manage ports in nginx is to hardcode them.
services:
web:
build: seattlecontratunes/
#command: python seattlecontratunes/manage.py runserver 0.0.0.0:${PORT}
command: gunicorn seattlecontratunes.wsgi:application --preload --bind 0.0.0.0:8000
expose:
- 8000:8000
env_file:
- .env
depends_on:
- db
secrets:
- DJANGO_SECRET_KEY
- EMAIL_HOST
- EMAIL_HOST_USER
- EMAIL_HOST_PASSWORD
volumes:
- static_volume:/staticfiles
nginx:
build: ./nginx
ports:
- 80:80
volumes:
- static_volume:/staticfiles
depends_on:
- web
db:
image: postgres:15
ports:
- 5432:5432
volumes:
- postgres_data:/var/lib/postgresql/data
env_file:
- .env
#secrets:
# - SQL_PASSWORD
# - SQL_USER
# - SQL_HOST
volumes:
postgres_data:
static_volume:
secrets:
DJANGO_SECRET_KEY:
file: ./run/secrets/DJANGO_SECRET_KEY.txt
EMAIL_HOST:
file: ./run/secrets/EMAIL_HOST.txt
EMAIL_HOST_USER:
file: ./run/secrets/EMAIL_HOST_USER.txt
EMAIL_HOST_PASSWORD:
file: ./run/secrets/EMAIL_HOST_PASSWORD.txt
SQL_HOST:
file: ./run/secrets/SQL_HOST.txt
SQL_USER:
file: ./run/secrets/SQL_USER.txt
SQL_PASSWORD:
file: ./run/secrets/SQL_PASSWORD.txt