forked from dlareau/puzzlehunt_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
89 lines (83 loc) · 2.03 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: '3'
services:
db:
image: postgres:12-alpine
restart: always
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- ./docker/volumes/db_data:/var/lib/postgresql/data
redis:
image: redis:5-alpine
restart: always
volumes:
- ./docker/volumes/redis_data:/data
app:
build:
context: .
args:
http_proxy:
https_proxy:
no_proxy:
image: django_puzzlehunt # Name image for use in huey
restart: always
volumes:
- .:/code # Enables live modification of django files
- static:/static
- media:/media
- ./docker/volumes/logs:/var/log/external
environment:
- DOMAIN
- DJANGO_SECRET_KEY
- DJANGO_ENABLE_DEBUG
- DJANGO_EMAIL_USER
- DJANGO_EMAIL_PASSWORD
- DJANGO_USE_SHIBBOLETH
- DJANGO_SETTINGS_MODULE=puzzlehunt_server.settings.env_settings
- DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@db/${DB_NAME}
- ENABLE_DEBUG_TOOLBAR
- SENTRY_DSN
depends_on:
- db
- redis
huey:
image: django_puzzlehunt # re-use above image
command: bash -c "python /code/manage.py migrate --no-input && python /code/manage.py run_huey --quiet"
restart: always
volumes:
- .:/code
- static:/static
- media:/media
- ./docker/volumes/logs:/var/log/external
environment:
- DJANGO_SECRET_KEY
- DJANGO_SETTINGS_MODULE=puzzlehunt_server.settings.env_settings
- DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@db/${DB_NAME}
- SENTRY_DSN
depends_on:
- app
web:
restart: always
build:
context: ./docker/
dockerfile: apacheDockerfile
args:
http_proxy:
https_proxy:
no_proxy:
DOMAIN: ${DOMAIN}
depends_on:
- app
volumes:
- static:/static
- media:/media
environment:
- DOMAIN
- SSL_DOMAINS
- CONTACT_EMAIL
tty: true
volumes:
static:
media: