From 922d75e67b93cf33142331b9ddff5eb487e507b7 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Tue, 16 Jan 2024 15:57:40 +0100 Subject: [PATCH] fix(healthcheck): use address configured if not empty 1. Use `$FB_ADDRESS` content if not empty; 2. Fallback on "address" value in /.filebrowser.json 3. Fallback on `localhost` --- healthcheck.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/healthcheck.sh b/healthcheck.sh index 50263896..cea8a1cb 100644 --- a/healthcheck.sh +++ b/healthcheck.sh @@ -1,3 +1,5 @@ #!/bin/sh PORT=${FB_PORT:-$(jq .port /.filebrowser.json)} -curl -f http://localhost:$PORT/health || exit 1 +ADDRESS=${FB_ADDRESS:-$(jq .address /.filebrowser.json)} +ADDRESS=${ADDRESS:-localhost} +curl -f http://$ADDRESS:$PORT/health || exit 1