-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
129 lines (123 loc) · 4.46 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#
# Docker-compose for woo-publications stack.
#
# 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.
#
# One API key is pre-populated to authenticate API calls. It has all permissions. Use
# it with the HTTP request header:
#
# Authorization: Token insecure-ea1a8d297e3b2d3313b8a30b18959c3
#
# Before deploying to production, please review the environment configuration reference:
# https://gpp-publicatiebank.readthedocs.io/en/latest/installation/config.html
services:
db:
image: postgis/postgis:${PG_VERSION:-16-master}
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./docker/init-db.sql:/docker-entrypoint-initdb.d/init_db.sql
- ./docker/open-zaak/db/0001-init-open-zaak-db.sql:/docker-entrypoint-initdb.d/0001-init-open-zaak-db.sql
- ./docker/open-zaak/db/0002-extensions.sh:/docker-entrypoint-initdb.d/0002-extensions.sh
- db:/var/lib/postgresql/data
redis:
image: redis:7
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis-data:/data
openzaak-web:
image: openzaak/open-zaak:${OPENZAAK_VERSION:-latest}
environment: &openzaak_web_env
- DJANGO_SETTINGS_MODULE=openzaak.conf.patched_settings
- SECRET_KEY=${SECRET_KEY:-django-insecure-^#9nzgn*@-@0szv+$$)6th!i+$$ks^+bt@&ejcgzqt==7af(a(u3}
- ALLOWED_HOSTS=openzaak-web,openzaak.docker.internal,localhost
- DB_NAME=openzaak
- DB_USER=openzaak
- DB_HOST=db
- IS_HTTPS=no
- CACHE_DEFAULT=redis:6379/1
- CACHE_AXES=redis:6379/1
- SUBPATH=${SUBPATH:-/}
- OPENZAAK_SUPERUSER_USERNAME=admin
- DJANGO_SUPERUSER_PASSWORD=admin
- OPENZAAK_SUPERUSER_EMAIL=admin@localhost
- DISABLE_2FA=true
- CELERY_BROKER_URL=redis://redis:6379/2
- CELERY_RESULT_BACKEND=redis://redis:6379/2
- NOTIFICATIONS_DISABLED=true
- SENDFILE_BACKEND=django_sendfile.backends.simple
- JWT_EXPIRY=99999999999 # Roughly 3170 years. This is required for tests with time frozen to work
- DOCUMENTEN_UPLOAD_CHUNK_SIZE=100
- CELERY_WORKER_CONCURRENCY=${CELERY_WORKER_CONCURRENCY:-2}
volumes: &openzaak_web_volumes
# mount fixtures dir to automatically populate the DB
- ./docker/open-zaak/fixtures/:/app/fixtures
- ./docker/open-zaak/patched_settings.py:/app/src/openzaak/conf/patched_settings.py
- oz-media:/app/media # Shared media volume to get access to saved OAS files
- oz-private-media:/app/private-media
depends_on:
- db
- redis
- openzaak-celery
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- 8001:8000
openzaak-celery:
image: openzaak/open-zaak:${OPENZAAK_VERSION:-1.14.0}
environment: *openzaak_web_env
volumes: *openzaak_web_volumes
command: /celery_worker.sh
depends_on:
- db
- redis
web: &web_build
build:
context: .
args:
RELEASE: ${RELEASE:-latest}
image: ghcr.io/gpp-woo/gpp-publicatiebank:${RELEASE:-latest}
environment: &web_env
- DJANGO_SETTINGS_MODULE=woo_publications.conf.docker
- SECRET_KEY=${SECRET_KEY:-django-insecure-fgggi4*bl2wdg&@0&)t7ewy5-2!b3l4lhx4_+^zpw%x2i28v8}
- DB_NAME=woo_publications
- DB_USER=woo_publications
- DB_HOST=db
- CACHE_DEFAULT=redis:6379/0
- CACHE_AXES=redis:6379/0
- ODRC_SUPERUSER_USERNAME=admin
- ODRC_SUPERUSER_EMAIL=admin@host.docker.internal
- DISABLE_2FA=true
- DJANGO_SUPERUSER_PASSWORD=admin
- ALLOWED_HOSTS=*
# Environment labeling
- SHOW_ENVIRONMENT=yes
- ENVIRONMENT_LABEL=docker-compose
- ENVIRONMENT_BACKGROUND_COLOR=#1d63ed
- ENVIRONMENT_FOREGROUND_COLOR=white
volumes: &web_volumes
- ./docker/fixtures/:/app/fixtures
- media:/app/media
- log:/app/log
extra_hosts:
- "host.docker.internal:host-gateway"
# required because Open Zaak otherwise treats our /catalogi/api/v1/ endpoints as
# internal
- "openzaak.docker.internal:host-gateway"
ports:
- 8000:8000
depends_on:
- db
- redis
volumes:
db:
redis-data:
oz-media:
oz-private-media:
log:
media: