Skip to content

Commit

Permalink
fix pre_release
Browse files Browse the repository at this point in the history
  • Loading branch information
Bram van Dartel committed Apr 4, 2024
1 parent ec98b6b commit da4ccb3
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 12 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/docker-compose.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions rootfs/app/cleandb.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/command/with-contenv bash
# shellcheck shell=bash

if [[ "${DJANGO_DATABASE_ENGINE}" == *"postgres"* ]]; then
if [[ $1 = "-v" ]]; then
Expand Down
5 changes: 3 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/docker-entrypoint/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/command/with-contenv bash
# shellcheck shell=bash

#---------------------------------------------------------------------------------------------------------------------------
# VARIABLES
Expand All @@ -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 "
Expand Down
4 changes: 2 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-backend/run
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-datalogger/run
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-remote-datalogger/run
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/svc-dsmr-webinterface/run
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions rootfs/etc/s6-overlay/s6-rc.d/svc-nginx/run
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit da4ccb3

Please sign in to comment.