mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-09-15 22:29:08 +02:00
Merge pull request #2843 from alexbelgium/agent/fix-birdnet-pi-abc-systemctl-sudo
Fix birdnet-pi standalone Docker health-check (WebUI port 8081)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
## 2026.07.22 (22-07-2026)
|
||||
- Fix: health-check the WebUI port (8081) instead of port 80, so the standalone Docker container no longer reports "unhealthy" when ssl=false
|
||||
- Fix: health-check now probes https when ssl is enabled, and no longer silently reports "healthy" regardless of the actual result (the previous check's `&>` redirection is a bash-ism that dash, the image's /bin/sh, parses as background + no-op, discarding curl's exit status)
|
||||
## 2026.07.10-1 (10-07-2026)
|
||||
- Fix standalone (no-Supervisor) mode: strip `sudo` from BirdNET-Pi scripts at build time (the previous hook ran before the repo was cloned, so `sudo` remained and broke service/WebUI actions run by non-sudoers users such as `caddy`/`abc`)
|
||||
- Ensure `/run/php` exists before starting PHP-FPM so the WebUI starts even when `/run` is a fresh tmpfs
|
||||
|
||||
@@ -237,11 +237,19 @@ RUN \
|
||||
mv /etc/nginx/nginx.conf.new /etc/nginx/nginx.conf; \
|
||||
fi
|
||||
|
||||
ENV HEALTH_PORT="80" \
|
||||
# Health-check the actual WebUI port. In standalone Docker (no Supervisor) nginx
|
||||
# is disabled and Caddy serves the UI on 8081; nothing listens on port 80 when
|
||||
# ssl=false, which made the container report "unhealthy" even though it worked.
|
||||
# Select https when ssl is enabled (92-ssl.sh switches Caddy to https://:8081),
|
||||
# and use -k since the probe hits 127.0.0.1 rather than the cert's real name.
|
||||
# Note: the shell form's CMD runs under /bin/sh (dash here, not bash), so this
|
||||
# avoids "&>" (a bash-only redirection dash parses as background + no-op,
|
||||
# which silently discarded curl's exit status and made the check always pass).
|
||||
ENV HEALTH_PORT="8081" \
|
||||
HEALTH_URL=""
|
||||
HEALTHCHECK \
|
||||
--interval=5s \
|
||||
--retries=5 \
|
||||
--start-period=30s \
|
||||
--timeout=25s \
|
||||
CMD curl -A "HealthCheck: Docker/1.0" -s -f "http://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" &>/dev/null || exit 1
|
||||
CMD scheme=http; case "${ssl:-false}" in true|TRUE|True|1|yes|YES|Yes|on|ON|On) scheme=https ;; esac; curl -A "HealthCheck: Docker/1.0" -s -k -f "${scheme}://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" >/dev/null 2>&1 || exit 1
|
||||
|
||||
@@ -116,5 +116,5 @@ tmpfs: true
|
||||
udev: true
|
||||
url: https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi
|
||||
usb: true
|
||||
version: 2026.07.10.1
|
||||
version: 2026.07.22
|
||||
video: true
|
||||
|
||||
Reference in New Issue
Block a user