-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
61 lines (55 loc) · 1.58 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
# 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
# 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=archiefbeheercomponent.conf.docker
- SECRET_KEY=${SECRET_KEY:-145cqii@)+z$b&9dcmdctpm+&be1#9zslxm+x)0+u*^qf!qz(6}
- CACHE_DEFAULT=redis:6379/0
- CACHE_AXES=redis:6379/0
- CACHE_OAS=redis:6379/1
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
ports:
- 8000:8000
depends_on:
- db
- redis
redis:
image: redis
celery:
build: .
environment: *web_env
command: /celery_worker.sh
depends_on:
- db
- redis
nginx:
image: nginx
volumes:
- ./default.conf:/etc/nginx/conf.d/default.conf
ports:
- "9000:80"
depends_on:
- web
# See: src/archiefbeheercomponent/conf/docker.py
# Optional containers below:
# elasticsearch:
# # NOTE: No persistance storage configured.
# # See: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
# image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
# container_name: elasticsearch
# environment:
# - discovery.type=single-node
# - cluster.routing.allocation.disk.threshold_enabled=false
# ports:
# - 9200:9200