mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-22 12:53:32 +02:00
fix: suppress healthcheck log spam in filebrowser quantum addon
Add a dedicated nginx health endpoint on 127.0.0.1:3001 with access_log off that returns 200 at /health. Update HEALTHCHECK to verify both that the filebrowser process is running (pgrep) and nginx is serving (curl to health endpoint), avoiding direct HTTP requests to filebrowser that caused log spam every 5 seconds.
This commit is contained in:
committed by
GitHub
parent
3d5f7a2bdf
commit
042c44f012
@@ -131,11 +131,11 @@ RUN \
|
||||
mv /etc/nginx/nginx.conf.new /etc/nginx/nginx.conf; \
|
||||
fi
|
||||
|
||||
ENV HEALTH_PORT="8080" \
|
||||
HEALTH_URL=""
|
||||
ENV HEALTH_PORT="3001" \
|
||||
HEALTH_URL="/health"
|
||||
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 || curl -k --fail "https://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" &>/dev/null || exit 1
|
||||
CMD pgrep -x filebrowser &>/dev/null || exit 1; curl -A "HealthCheck: Docker/1.0" -s -f "http://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" &>/dev/null || exit 1
|
||||
|
||||
8
filebrowser_quantum/rootfs/etc/nginx/servers/health.conf
Normal file
8
filebrowser_quantum/rootfs/etc/nginx/servers/health.conf
Normal file
@@ -0,0 +1,8 @@
|
||||
server {
|
||||
listen 127.0.0.1:3001;
|
||||
access_log off;
|
||||
|
||||
location /health {
|
||||
return 200 'OK';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user