Skip to content

Commit

Permalink
Development (#361)
Browse files Browse the repository at this point in the history
* bugfix websocket timeout
  • Loading branch information
xirixiz authored Apr 20, 2024
1 parent fb176cd commit d5678e5
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ concurrency:
env:
DOCKER_TARGET_REPO: xirixiz/dsmr-reader-docker
DOCKERFILE: Dockerfile
DOCKER_TARGET_RELEASE: 2024.04.02
DOCKER_TARGET_RELEASE: 2024.04.03

jobs:
################################################
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Windows image file caches
Thumbs.db
ehthumbs.db
dsmr_dev

# Folder config file
Desktop.ini
Expand Down Expand Up @@ -45,4 +46,4 @@ Temporary Items

# Ansible
*.retry
ansible.log
ansible.log
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
init-docker-entrypoint
svc-nginx
init-docker-entrypoint
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
init-docker-entrypoint
svc-nginx
init-docker-entrypoint
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
init-docker-entrypoint
init-docker-entrypoint
svc-dsmr-backend-log
3 changes: 2 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/svc-nginx/dependencies
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
init-docker-entrypoint
init-docker-entrypoint
svc-dsmr-webinterface
19 changes: 15 additions & 4 deletions rootfs/etc/s6-overlay/s6-rc.d/svc-nginx/run
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@
# shellcheck shell=bash

if [[ "${DSMRREADER_OPERATION_MODE}" = standalone || "${DSMRREADER_OPERATION_MODE}" = api_server ]]; then
echo "Starting DSMR Reader - nginx..."
cd /app || exit
# s6-setuidgid app
/usr/sbin/nginx -g 'daemon off;'
for i in {1..10}; do
if [ -e "/tmp/gunicorn--dsmr_webinterface.socket" ]; then
echo "Starting DSMR Reader - nginx..."
sleep 2
cd /app || exit
/usr/sbin/nginx -g 'daemon off;'
else
sleep 1
printf "\\rTesting webservice socket connectivity: %s second(s) of 10 seconds..." "$i"
if [[ $i == 10 ]]; then
echo "Webinterface socket couldn't be verified! Please verify the webinterface log files. Exiting..."
exit 1
fi
fi
done
else
sleep infinity
fi

0 comments on commit d5678e5

Please sign in to comment.