From da4ccb3ade1166547f881e01e42b308a0ee3c8d4 Mon Sep 17 00:00:00 2001 From: Bram van Dartel Date: Thu, 4 Apr 2024 08:01:37 +0200 Subject: [PATCH] fix pre_release --- CHANGELOG | 6 +++++- examples/docker-compose.example.yaml | 2 +- rootfs/app/cleandb.sh | 1 + rootfs/etc/s6-overlay/s6-rc.d/docker-entrypoint/run | 5 +++-- rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-backend/run | 4 ++-- rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-datalogger/run | 3 ++- .../etc/s6-overlay/s6-rc.d/svc-dsmr-remote-datalogger/run | 3 ++- rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-webinterface/run | 3 ++- rootfs/etc/s6-overlay/s6-rc.d/svc-nginx/run | 6 +++--- 9 files changed, 21 insertions(+), 12 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f234002..460d3c9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ +2024.04.04 +- Upgrade alpine to 3.19 +- Upgrade postgresql to 16.x + 2024.02.21 - Upgrade to DSMR 5.11.0 -- Upgrade alpine to 3.19 +- Upgrade alpine to 3.17 - Upgrade postgresql to 15.x 2023.11.01 diff --git a/examples/docker-compose.example.yaml b/examples/docker-compose.example.yaml index ef8e056..7ee3bdb 100755 --- a/examples/docker-compose.example.yaml +++ b/examples/docker-compose.example.yaml @@ -4,7 +4,7 @@ services: dsmrdb: # When using Postgres, release 13.x, 14.x and 15.x are supported only # due to the limited availability of client packages, especially for arm32v7 - image: postgres:15-alpine + image: postgres:16-alpine container_name: dsmrdb restart: always volumes: diff --git a/rootfs/app/cleandb.sh b/rootfs/app/cleandb.sh index af70131..cd8bbdc 100755 --- a/rootfs/app/cleandb.sh +++ b/rootfs/app/cleandb.sh @@ -1,4 +1,5 @@ #!/command/with-contenv bash +# shellcheck shell=bash if [[ "${DJANGO_DATABASE_ENGINE}" == *"postgres"* ]]; then if [[ $1 = "-v" ]]; then diff --git a/rootfs/etc/s6-overlay/s6-rc.d/docker-entrypoint/run b/rootfs/etc/s6-overlay/s6-rc.d/docker-entrypoint/run index 7c1cfed..cf0d26b 100755 --- a/rootfs/etc/s6-overlay/s6-rc.d/docker-entrypoint/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/docker-entrypoint/run @@ -1,4 +1,5 @@ #!/command/with-contenv bash +# shellcheck shell=bash #--------------------------------------------------------------------------------------------------------------------------- # VARIABLES @@ -20,8 +21,8 @@ function _pre_reqs() { DUID=${DUID:-803} DGID=${DGID:-803} - groupmod -o -g "${DGID}" app 2>&1 >/dev/null - usermod -o -u "${DUID}" app 2>&1 >/dev/null + groupmod -o -g "${DGID}" app >/dev/null 2>&1 + usermod -o -u "${DUID}" app >/dev/null 2>&1 cat /etc/s6-overlay/s6-rc.d/docker-entrypoint/branding echo " diff --git a/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-backend/run b/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-backend/run index b48cc7b..9672ea9 100755 --- a/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-backend/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-backend/run @@ -1,10 +1,10 @@ #!/command/with-contenv bash +# shellcheck shell=bash if [[ "${DSMRREADER_OPERATION_MODE}" = standalone || "${DSMRREADER_OPERATION_MODE}" = api_server ]]; then echo "Starting DSMR Reader - backend..." cd /app || exit - exec s6-setuidgid app /usr/local/bin/python3 -u /app/manage.py dsmr_backend - # exec s6-notifyoncheck -d -n 300 -w 1000 s6-setuidgid app /usr/local/bin/python3 -u /app/manage.py dsmr_backend + exec s6-notifyoncheck -d -n 300 -w 1000 s6-setuidgid app /usr/local/bin/python3 -u /app/manage.py dsmr_backend else sleep infinity fi diff --git a/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-datalogger/run b/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-datalogger/run index 8b857e6..0e9907d 100755 --- a/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-datalogger/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-datalogger/run @@ -1,9 +1,10 @@ #!/command/with-contenv bash +# shellcheck shell=bash if [[ "${DSMRREADER_OPERATION_MODE}" = standalone ]]; then echo "Starting DSMR Reader - datalogger..." cd /app || exit - exec s6-setuidgid app /usr/local/bin/python3 -u /app/manage.py dsmr_datalogger + exec s6-notifyoncheck -d -n 300 -w 1000 s6-setuidgid app /usr/local/bin/python3 -u /app/manage.py dsmr_datalogger else sleep infinity fi diff --git a/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-remote-datalogger/run b/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-remote-datalogger/run index 2326390..a2593c6 100755 --- a/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-remote-datalogger/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-remote-datalogger/run @@ -1,9 +1,10 @@ #!/command/with-contenv bash +# shellcheck shell=bash if [[ "${DSMRREADER_OPERATION_MODE}" = api_client ]]; then echo "Starting DSMR Reader - remote datalogger (api_client)..." cd /app || exit - exec s6-setuidgid app /usr/local/bin/python3 -u /app/dsmr_datalogger_api_client.py + exec s6-notifyoncheck -d -n 300 -w 1000 s6-setuidgid app /usr/local/bin/python3 -u /app/dsmr_datalogger_api_client.py else sleep infinity fi diff --git a/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-webinterface/run b/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-webinterface/run index f849e58..018c451 100755 --- a/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-webinterface/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-webinterface/run @@ -1,9 +1,10 @@ #!/command/with-contenv bash +# shellcheck shell=bash if [[ "${DSMRREADER_OPERATION_MODE}" = standalone || "${DSMRREADER_OPERATION_MODE}" = api_server ]]; then echo "Starting DSMR Reader - webinterface..." cd /app || exit - exec s6-setuidgid app /usr/local/bin/gunicorn dsmrreader.wsgi --timeout 60 --max-requests 500 --bind unix:/tmp/gunicorn--dsmr_webinterface.socket + exec s6-notifyoncheck -d -n 300 -w 1000 s6-setuidgid app /usr/local/bin/gunicorn dsmrreader.wsgi --timeout 60 --max-requests 500 --bind unix:/tmp/gunicorn--dsmr_webinterface.socket else sleep infinity fi diff --git a/rootfs/etc/s6-overlay/s6-rc.d/svc-nginx/run b/rootfs/etc/s6-overlay/s6-rc.d/svc-nginx/run index 7d5062c..0305a7c 100755 --- a/rootfs/etc/s6-overlay/s6-rc.d/svc-nginx/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/svc-nginx/run @@ -1,10 +1,10 @@ -# shellcheck disable=SC1008 -#!/command/with-contenv bash +#!/usr/bin/with-contenv bash +# shellcheck shell=bash if [[ "${DSMRREADER_OPERATION_MODE}" = standalone || "${DSMRREADER_OPERATION_MODE}" = api_server ]]; then echo "Starting DSMR Reader - nginx..." cd /app || exit - exec /usr/sbin/nginx -g 'daemon off;' + exec s6-notifyoncheck -d -n 300 -w 1000 s6-setuidgid app /usr/sbin/nginx -g "daemon off;" else sleep infinity fi