-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
141 lines (136 loc) · 4.48 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
130
131
132
133
134
135
136
137
138
139
140
141
services:
odpc:
environment:
- POSTGRES_HOST=postgres-db
- POSTGRES_DB=ODPC
- POSTGRES_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=localdev
- ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
- ODRC_BASE_URL=http://odrc/
- ODRC_API_KEY=insecure-ea1a8d297e3b2d3313b8a30b18959c3
- OIDC_ADMIN_ROLE=odpc-admin
image: ${DOCKER_REGISTRY-}odpc
build:
context: .
dockerfile: ODPC.Server/Dockerfile
ports:
- "62230:8080"
depends_on:
- postgres-db
postgres-db:
image: postgis/postgis:${PG_VERSION:-16-master}
volumes:
- postgres-db:/var/lib/postgresql/data
- ./docker/odrc/db/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
environment:
- POSTGRES_PASSWORD=localdev
restart: always
ports:
- "5432"
redis:
image: redis:7
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis-data:/data
openzaak-web:
image: openzaak/open-zaak:${OPENZAAK_VERSION:-1.14.0}
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=postgres
- DB_PASSWORD=localdev
- DB_HOST=postgres-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
- JWT_EXPIRY=99999999999 # Roughly 3170 years. This is required for tests with time frozen to work
- 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:
- postgres-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:
- postgres-db
- redis
odrc-django: &odrc_build
image: maykinmedia/woo-publications:${ODRC_VERSION:-latest}
pull_policy: always
environment: &odrc_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=postgres
- DB_HOST=postgres-db
- DB_PASSWORD=localdev
- CACHE_DEFAULT=redis:6379/0
- CACHE_AXES=redis:6379/0
- ODRC_SUPERUSER_USERNAME=admin
- 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
- DEBUG=True
volumes: &odrc_volumes
- ./docker/odrc/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:
- postgres-db
- redis
# we need a reverse proxy for odrc because django doesn't support chunked requests
odrc:
image: nginx:stable-alpine
restart: always
ports:
- 8002:80
volumes:
- ./docker/nginx:/etc/nginx/conf.d/
depends_on:
- odrc-django
volumes:
postgres-db:
redis-data:
oz-media:
oz-private-media:
log:
media: