-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
74 lines (68 loc) · 2.06 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
73
74
# This is the docker-compose.yml which can be used in development.
# The environment variables defined under the `web` service are used in `ActivityLeague/settings.py`
# and can be configured as your deployed instance requires.
# This configuration (and the rest of the project) is designed to be open-source friendly,
# and hence requires you to define sensitive information in a `secrets/` directory which
# can be accessed in the codebase via environment variables.
# See `docker-compose-production-example` for a configuration which can be used on a production server.
version: "3.9"
services:
db:
image: postgres
environment:
POSTGRES_DB: postgres
POSTGRES_USER_FILE: /run/secrets/db_user
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
volumes:
- postgres_data:/var/lib/postgresql/data/
ports:
- "5432:5432"
secrets:
- db_user
- db_password
web:
build: .
ports:
- "8000:8000"
volumes:
- .:/code
depends_on:
- db
environment:
DB_USER_FILE: /run/secrets/db_user
DB_PASSWORD_FILE: /run/secrets/db_password
DEBUG: "True"
EMAIL_HOST_FILE: /run/secrets/email_host
EMAIL_HOST_PASSWORD_FILE: /run/secrets/email_host_password
EMAIL_HOST_USER_FILE: /run/secrets/email_host_user
GOOGLE_CLIENT_ID_FILE: /run/secrets/google_client_id
GOOGLE_SECRET_FILE: /run/secrets/google_secret
SECRET_KEY_FILE: /run/secrets/secret_key
secrets:
- db_user
- db_password
- email_host
- email_host_password
- email_host_user
- google_client_id
- google_secret
- secret_key
volumes:
postgres_data:
secrets:
db_user:
file: ./secrets/DB_USER
db_password:
file: ./secrets/DB_PASSWORD
email_host:
file: ./secrets/EMAIL_HOST
email_host_password:
file: ./secrets/EMAIL_HOST_PASSWORD
email_host_user:
file: ./secrets/EMAIL_HOST_USER
google_client_id:
file: ./secrets/GOOGLE_CLIENT_ID
google_secret:
file: ./secrets/GOOGLE_SECRET
secret_key:
file: ./secrets/SECRET_KEY