-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
67 lines (61 loc) · 1.53 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
# Inspired by https://docs.docker.com/compose/django/
version: '3'
services:
db:
# NOTE: No persistance storage configured.
# See: https://hub.docker.com/_/postgres/
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
# NOTE: this works for bitnami, not sure if this works for regular
# postgres image
volumes:
- ./docker-init-db.sql:/docker-entrypoint-initdb.d/init_db.sql
web:
build: .
environment: &web_env
- DJANGO_SETTINGS_MODULE=sdg.conf.docker
- SECRET_KEY=${SECRET_KEY:-n0zyvjjcogd$hmoy5xruh%k!0c5d-t+(#w6^o-#al5diww&j2@}
- DB_NAME=sdg
- DB_USER=sdg
- DB_HOST=db
- CACHE_DEFAULT=redis:6379/0
- CACHE_AXES=redis:6379/0
- TWO_FACTOR_PATCH_ADMIN=no
- TWO_FACTOR_FORCE_OTP_ADMIN=no
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- CELERY_LOGLEVEL=DEBUG
- SUBPATH=${SUBPATH:-/}
ports:
- 8000:8000
depends_on:
- db
redis:
# NOTE: No persistance storage configured.
# See: https://hub.docker.com/_/redis/
image: redis
ports:
- 6379:6379
celery:
build: .
environment: *web_env
command: /celery_worker.sh
depends_on:
- db
- redis
celerybeat:
build: .
environment: *web_env
command: /celery_beat.sh
depends_on:
- db
- redis
nginx:
image: nginx
volumes:
- ./default.conf:/etc/nginx/conf.d/default.conf
ports:
- "9000:80"
depends_on:
- web