Merge pull request #6812 from Budibase/fix/single-image-health

Quick healthcheck update for single image
This commit is contained in:
Michael Drury 2022-07-19 17:23:45 +01:00 committed by GitHub
commit 1e681e9111
2 changed files with 5 additions and 1 deletions

View File

@ -108,7 +108,7 @@ RUN chmod +x install.sh && ./install.sh
WORKDIR / WORKDIR /
ADD hosting/single/runner.sh . ADD hosting/single/runner.sh .
RUN chmod +x ./runner.sh RUN chmod +x ./runner.sh
ADD hosting/scripts/healthcheck.sh . ADD hosting/single/healthcheck.sh .
RUN chmod +x ./healthcheck.sh RUN chmod +x ./healthcheck.sh
ADD hosting/scripts/build-target-paths.sh . ADD hosting/scripts/build-target-paths.sh .

View File

@ -1,6 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
healthy=true healthy=true
if [ -f "/data/.env" ]; then
export $(cat /data/.env | xargs)
fi
if [[ $(curl -Lfk -s -w "%{http_code}\n" http://localhost/ -o /dev/null) -ne 200 ]]; then if [[ $(curl -Lfk -s -w "%{http_code}\n" http://localhost/ -o /dev/null) -ne 200 ]]; then
echo 'ERROR: Budibase is not running'; echo 'ERROR: Budibase is not running';
healthy=false healthy=false