-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
115 lines (107 loc) · 3.29 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#
# DISCLAIMER: THIS IS FOR DEVELOPMENT PURPOSES ONLY AND NOT SUITABLE FOR PRODUCTION.
#
# You can use this docker-compose to spin up a local stack for demo/try-out
# purposes, or to get some insight in the various components involved (e.g. to build
# your Helm charts from). Note that various environment variables are UNSAFE and merely
# specified so that you can get up and running with the least amount of friction.
services:
db:
# NOTE: No persistence storage configured.
# See: https://hub.docker.com/_/postgres/
image: postgis/postgis:14-3.4
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_USER=openarchiefbeheer
- POSTGRES_PASSWORD=openarchiefbeheer
networks:
- open-archiefbeheer-dev
redis:
# NOTE: No persistence storage configured.
image: redis:6
command: [ "redis-server", "--appendonly", "yes" ]
networks:
- open-archiefbeheer-dev
web:
build: .
environment: &web_env
- ALLOWED_HOSTS=localhost
- DJANGO_SETTINGS_MODULE=openarchiefbeheer.conf.docker
- SECRET_KEY=${SECRET_KEY:-django-insecure-!bkx+tx18&lvp(@_9)9ut(y(keqho*zhz1&^sqqgq9*i=__w(}
- DB_NAME=openarchiefbeheer
- DB_USER=openarchiefbeheer
- DB_HOST=db
- CACHE_DEFAULT=redis:6379/0
- CACHE_AXES=redis:6379/0
- CORS_ALLOWED_ORIGINS=http://localhost:9000,http://localhost:8000
- CSRF_TRUSTED_ORIGINS=http://localhost:9000,http://localhost:8000
- CSRF_COOKIE_SAMESITE=Lax
- CSRF_COOKIE_SECURE=False
- SESSION_COOKIE_SAMESITE=Lax
- SESSION_COOKIE_SECURE=False
- TWO_FACTOR_FORCE_OTP_ADMIN=False
- TWO_FACTOR_PATCH_ADMIN=False
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- CELERY_LOGLEVEL=DEBUG
- REACT_APP_API_URL=http://localhost:8000
- REACT_APP_API_PATH=/api/v1
- REACT_APP_ZAAK_URL_TEMPLATE=https://www.example.com/zaken/{identificatie}
ports:
- 8000:8000
depends_on:
- db
- redis
networks:
- open-archiefbeheer-dev
# TODO: the configuration does not result in properly working OIDC
# The backchannel needs a hostname resolvable in the docker network but the
# frontchannel needs a hostname resolvable on the host.
web-init:
build: .
environment: *web_env
command: /setup_configuration.sh
volumes:
- ./backend/src/openarchiefbeheer/config/setup-configuration/fixtures:/app/setup_configuration
depends_on:
- db
- redis
networks:
- open-archiefbeheer-dev
celery:
build: .
command: /celery_worker.sh
environment: *web_env
healthcheck:
test: [ "CMD", "python", "/app/bin/check_celery_worker_liveness.py" ]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
depends_on:
- db
- redis
networks:
- open-archiefbeheer-dev
celery-beat:
build: .
command: /celery_beat.sh
environment: *web_env
depends_on:
- db
- redis
networks:
- open-archiefbeheer-dev
nginx:
image: nginx
volumes:
- ./docker-nginx-default.conf:/etc/nginx/conf.d/default.conf
ports:
- '9000:80'
depends_on:
- web
networks:
- open-archiefbeheer-dev
networks:
open-archiefbeheer-dev:
name: open-archiefbeheer-dev