When TLS_ENABLED=false (e.g. behind a reverse proxy) the healthcheck
was still hitting https://localhost which fails on plain HTTP, keeping
the container perpetually in 'starting' state on TrueNAS SCALE.
Use a shell conditional so the correct protocol is used at runtime:
- TLS_ENABLED=false -> wget http://localhost:${PORT}/health
- TLS_ENABLED=true (default) -> wget --no-check-certificate https://...
2.8 KiB
2.8 KiB