mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-17 16:07:40 +01:00
fix: Docker healthcheck fails with HTTPS enabled
The healthcheck was hardcoded to use HTTP, which fails when HTTPS_ENABLED=true. Now uses a script that detects the protocol and uses --no-check-certificate for self-signed certs. Related to #922
This commit is contained in:
@@ -347,9 +347,12 @@ ENV PULSE_DOCKER=true
|
||||
RUN adduser -D -u 1000 -g 1000 pulse && \
|
||||
chown -R pulse:pulse /app /etc/pulse /data /opt/pulse
|
||||
|
||||
# Health check
|
||||
# Health check script (handles both HTTP and HTTPS)
|
||||
COPY docker-healthcheck.sh /docker-healthcheck.sh
|
||||
RUN chmod +x /docker-healthcheck.sh
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:7655 || exit 1
|
||||
CMD /docker-healthcheck.sh
|
||||
|
||||
# Use entrypoint script to handle UID/GID
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
10
docker-healthcheck.sh
Normal file
10
docker-healthcheck.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# Docker health check script for Pulse
|
||||
# Automatically uses HTTPS when HTTPS_ENABLED=true
|
||||
|
||||
if [ "$HTTPS_ENABLED" = "true" ] || [ "$HTTPS_ENABLED" = "1" ]; then
|
||||
# Use HTTPS with --no-check-certificate to handle self-signed certs
|
||||
wget --no-verbose --tries=1 --spider --no-check-certificate https://localhost:7655 || exit 1
|
||||
else
|
||||
wget --no-verbose --tries=1 --spider http://localhost:7655 || exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user