Skip to content

Commit 3d6b803

Browse files
authored
Merge pull request #190 from maykinmedia/feature/refactor-settings
🔧 [open-zaak/open-zaak#1629] Refactor settings module
2 parents 31aea05 + b545b5e commit 3d6b803

13 files changed

+71
-607
lines changed

CHANGELOG.rst

+23-4
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,38 @@
22
Change history
33
==============
44

5+
2.1.0
6+
=====
7+
8+
*??? ???, 2024*
9+
10+
New features:
11+
12+
* Add support for mounting Open Klant on a ``SUBPATH``
13+
* Elastic APM service name can now be configured with ``ELASTIC_APM_SERVICE_NAME`` envvar
14+
15+
.. warning::
16+
17+
The service name for Elastic APM is now configurable via the ``ELASTIC_APM_SERVICE_NAME`` environment variable.
18+
The default value changed from ``Open Klant - <ENVIRONMENT>`` to ``openklant - <ENVIRONMENT>``
19+
20+
Bugfixes/QoL:
21+
* Settings module was refactored to use generic settings provided by Open API Framework
22+
23+
524
2.0.0
625
=====
726

827
*March 15, 2024*
928

1029
*VNG officially retired the Klanten and Contactmomenten API, which never had an
11-
official release. These API's are replaced by the Klantinteractie API. In
12-
cooperation with several municipalities and VNG, Open Klant will implement the
30+
official release. These API's are replaced by the Klantinteractie API. In
31+
cooperation with several municipalities and VNG, Open Klant will implement the
1332
new API specification and might introduce backwards incompatible changes. Since
14-
Open Klant never had an official 1.0 release, we will continue versioning on
33+
Open Klant never had an official 1.0 release, we will continue versioning on
1534
the 0.x.x-scheme.*
1635

17-
* Initial release of Open Klant featuring the first iteration of the
36+
* Initial release of Open Klant featuring the first iteration of the
1837
Klantinteracties API.
1938

2039
1.0.0

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM python:3.11-slim-bookworm AS build
33

44
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
55
pkg-config \
6+
git \
67
build-essential \
78
libpq-dev \
89
&& rm -rf /var/lib/apt/lists/*

bin/docker_start.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ uwsgi_port=${UWSGI_PORT:-8000}
1313
uwsgi_processes=${UWSGI_PROCESSES:-4}
1414
uwsgi_threads=${UWSGI_THREADS:-1}
1515

16+
mountpoint=${SUBPATH:-/}
17+
1618
until pg_isready; do
1719
>&2 echo "Waiting for database connection..."
1820
sleep 1
@@ -26,10 +28,11 @@ python src/manage.py migrate
2628

2729
# Start server
2830
>&2 echo "Starting server"
29-
exec uwsgi \
31+
uwsgi \
3032
--http :$uwsgi_port \
3133
--http-keepalive \
32-
--module openklant.wsgi \
34+
--manage-script-name \
35+
--mount $mountpoint=openklant.wsgi:application \
3336
--static-map /static=/app/static \
3437
--static-map /media=/app/media \
3538
--chdir src \

docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ services:
2626
- ALLOWED_HOSTS=*
2727
- CACHE_DEFAULT=redis:6379/0
2828
- CACHE_AXES=redis:6379/0
29-
- SECRET_KEY=${SECRET_KEY:-django-insecure-$8s@b*ds4t84-q_2#c0j0506@!l2q6r5_pq5e!vm^_9c*#^66b}
29+
- SUBPATH=${SUBPATH:-/}
30+
- SECRET_KEY=${SECRET_KEY:-django-insecure-f8s@b*ds4t84-q_2#c0j0506@!l2q6r5_pq5e!vm^_9c*#^66b}
3031
- CELERY_BROKER_URL=redis://redis:6379/0
3132
- CELERY_RESULT_BACKEND=redis://redis:6379/0
3233
ports:

requirements/base.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
open-api-framework
2-
django-log-outgoing-requests

requirements/base.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.10
2+
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
55
# ./bin/compile_dependencies.sh
@@ -14,8 +14,6 @@ asgiref==3.8.1
1414
# django-cors-headers
1515
asn1crypto==1.5.1
1616
# via webauthn
17-
async-timeout==4.0.3
18-
# via redis
1917
attrs==23.2.0
2018
# via
2119
# glom
@@ -89,6 +87,7 @@ django==4.2.11
8987
# django-relativedelta
9088
# django-rest-framework-condition
9189
# django-sendfile2
90+
# django-setup-configuration
9291
# django-simple-certmanager
9392
# django-solo
9493
# django-two-factor-auth
@@ -122,7 +121,7 @@ django-jsonform==2.22.0
122121
# mozilla-django-oidc-db
123122
# open-api-framework
124123
django-log-outgoing-requests==0.6.1
125-
# via -r requirements/base.in
124+
# via open-api-framework
126125
django-markup==1.8.1
127126
# via open-api-framework
128127
django-ordered-model==3.7.4
@@ -141,6 +140,8 @@ django-rest-framework-condition==0.1.1
141140
# via commonground-api-common
142141
django-sendfile2==0.7.1
143142
# via django-privates
143+
django-setup-configuration==0.1.0
144+
# via open-api-framework
144145
django-simple-certmanager==2.0.0
145146
# via zgw-consumers
146147
django-solo==2.2.0
@@ -226,7 +227,7 @@ mozilla-django-oidc-db==0.15.0
226227
# via open-api-framework
227228
notifications-api-common==0.2.2
228229
# via commonground-api-common
229-
open-api-framework==0.2.0
230+
open-api-framework==0.4.2
230231
# via -r requirements/base.in
231232
orderedmultidict==1.0.1
232233
# via furl
@@ -310,7 +311,6 @@ tornado==6.4
310311
# via flower
311312
typing-extensions==4.11.0
312313
# via
313-
# asgiref
314314
# qrcode
315315
# zgw-consumers
316316
tzdata==2024.1

requirements/ci.txt

+9-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.10
2+
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
55
# ./bin/compile_dependencies.sh
@@ -29,11 +29,6 @@ asn1crypto==1.5.1
2929
# webauthn
3030
astroid==3.1.0
3131
# via pylint
32-
async-timeout==4.0.3
33-
# via
34-
# -c requirements/base.txt
35-
# -r requirements/base.txt
36-
# redis
3732
attrs==23.2.0
3833
# via
3934
# -c requirements/base.txt
@@ -167,6 +162,7 @@ django==4.2.11
167162
# django-relativedelta
168163
# django-rest-framework-condition
169164
# django-sendfile2
165+
# django-setup-configuration
170166
# django-simple-certmanager
171167
# django-solo
172168
# django-two-factor-auth
@@ -222,6 +218,7 @@ django-log-outgoing-requests==0.6.1
222218
# via
223219
# -c requirements/base.txt
224220
# -r requirements/base.txt
221+
# open-api-framework
225222
django-markup==1.8.1
226223
# via
227224
# -c requirements/base.txt
@@ -267,6 +264,11 @@ django-sendfile2==0.7.1
267264
# -c requirements/base.txt
268265
# -r requirements/base.txt
269266
# django-privates
267+
django-setup-configuration==0.1.0
268+
# via
269+
# -c requirements/base.txt
270+
# -r requirements/base.txt
271+
# open-api-framework
270272
django-simple-certmanager==2.0.0
271273
# via
272274
# -c requirements/base.txt
@@ -477,7 +479,7 @@ notifications-api-common==0.2.2
477479
# -c requirements/base.txt
478480
# -r requirements/base.txt
479481
# commonground-api-common
480-
open-api-framework==0.2.0
482+
open-api-framework==0.4.2
481483
# via
482484
# -c requirements/base.txt
483485
# -r requirements/base.txt
@@ -683,11 +685,6 @@ sqlparse==0.5.0
683685
# django
684686
tblib==3.0.0
685687
# via -r requirements/test-tools.in
686-
tomli==2.0.1
687-
# via
688-
# black
689-
# pylint
690-
# sphinx
691688
tomlkit==0.12.4
692689
# via pylint
693690
tornado==6.4
@@ -699,9 +696,6 @@ typing-extensions==4.11.0
699696
# via
700697
# -c requirements/base.txt
701698
# -r requirements/base.txt
702-
# asgiref
703-
# astroid
704-
# black
705699
# qrcode
706700
# zgw-consumers
707701
tzdata==2024.1

requirements/dev.txt

+9-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.10
2+
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
55
# ./bin/compile_dependencies.sh
@@ -35,11 +35,6 @@ astroid==3.1.0
3535
# -c requirements/ci.txt
3636
# -r requirements/ci.txt
3737
# pylint
38-
async-timeout==4.0.3
39-
# via
40-
# -c requirements/ci.txt
41-
# -r requirements/ci.txt
42-
# redis
4338
attrs==23.2.0
4439
# via
4540
# -c requirements/ci.txt
@@ -194,6 +189,7 @@ django==4.2.11
194189
# django-relativedelta
195190
# django-rest-framework-condition
196191
# django-sendfile2
192+
# django-setup-configuration
197193
# django-simple-certmanager
198194
# django-solo
199195
# django-two-factor-auth
@@ -253,6 +249,7 @@ django-log-outgoing-requests==0.6.1
253249
# via
254250
# -c requirements/ci.txt
255251
# -r requirements/ci.txt
252+
# open-api-framework
256253
django-markup==1.8.1
257254
# via
258255
# -c requirements/ci.txt
@@ -298,6 +295,11 @@ django-sendfile2==0.7.1
298295
# -c requirements/ci.txt
299296
# -r requirements/ci.txt
300297
# django-privates
298+
django-setup-configuration==0.1.0
299+
# via
300+
# -c requirements/ci.txt
301+
# -r requirements/ci.txt
302+
# open-api-framework
301303
django-simple-certmanager==2.0.0
302304
# via
303305
# -c requirements/ci.txt
@@ -537,7 +539,7 @@ notifications-api-common==0.2.2
537539
# -c requirements/ci.txt
538540
# -r requirements/ci.txt
539541
# commonground-api-common
540-
open-api-framework==0.2.0
542+
open-api-framework==0.4.2
541543
# via
542544
# -c requirements/ci.txt
543545
# -r requirements/ci.txt
@@ -812,16 +814,6 @@ tblib==3.0.0
812814
# via
813815
# -c requirements/ci.txt
814816
# -r requirements/ci.txt
815-
tomli==2.0.1
816-
# via
817-
# -c requirements/ci.txt
818-
# -r requirements/ci.txt
819-
# black
820-
# build
821-
# pip-tools
822-
# pylint
823-
# pyproject-hooks
824-
# sphinx
825817
tomlkit==0.12.4
826818
# via
827819
# -c requirements/ci.txt
@@ -836,9 +828,6 @@ typing-extensions==4.11.0
836828
# via
837829
# -c requirements/ci.txt
838830
# -r requirements/ci.txt
839-
# asgiref
840-
# astroid
841-
# black
842831
# qrcode
843832
# zgw-consumers
844833
tzdata==2024.1

0 commit comments

Comments
 (0)