From 8e1753520e763ecfa20e31bfb7cd27db1c8cbbbe Mon Sep 17 00:00:00 2001 From: root Date: Wed, 17 Apr 2024 15:03:51 +0000 Subject: [PATCH] update status/restore functionality --- Workbench/scripts/gethealth.py | 2 +- Workbench/scripts/update-health-status.sh | 2 +- Workbench/webproxy/Dockerfile | 1 + Workbench/webproxy/container_files/system/startWithMDLoad.sh | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Workbench/scripts/gethealth.py b/Workbench/scripts/gethealth.py index 1c2da2f..13427df 100755 --- a/Workbench/scripts/gethealth.py +++ b/Workbench/scripts/gethealth.py @@ -5,7 +5,7 @@ print("") for container in containers: from subprocess import Popen, PIPE - dcmd = "docker ps -f name=workbench_" + container + "_1 --format '{{ .Status }} '" + dcmd = "docker ps -f name=workbench-" + container + "-1 --format '{{ .Status }} '" pipe = Popen(dcmd, shell=True, stdout=PIPE) healthstatus = 'unknown' for line in pipe.stdout: diff --git a/Workbench/scripts/update-health-status.sh b/Workbench/scripts/update-health-status.sh index c981f42..4fdab4c 100755 --- a/Workbench/scripts/update-health-status.sh +++ b/Workbench/scripts/update-health-status.sh @@ -2,4 +2,4 @@ /csp-tap/InCommonTAP-Examples/Workbench/scripts/gethealth.py > /csp-tap/InCommonTAP-Examples/Workbench/scripts/gethealth-output.txt -docker cp /csp-tap/InCommonTAP-Examples/Workbench/scripts/gethealth-output.txt workbench_webproxy_1:/var/www/html/status/index.html \ No newline at end of file +docker cp /csp-tap/InCommonTAP-Examples/Workbench/scripts/gethealth-output.txt workbench-webproxy-1:/var/www/html/status/index.html diff --git a/Workbench/webproxy/Dockerfile b/Workbench/webproxy/Dockerfile index f6db62b..109ecae 100644 --- a/Workbench/webproxy/Dockerfile +++ b/Workbench/webproxy/Dockerfile @@ -40,6 +40,7 @@ RUN sed -i 's/TransferLog logs\/ssl_access_log/TransferLog \/tmp\/logpipe/g' /et #set hostname RUN /usr/local/bin/setservername.sh +RUN mkdir -p /run/php-fpm/ HEALTHCHECK --interval=1m --timeout=30s \ CMD curl -k -f -u csp:workbench https://127.0.0.1/Shibboleth.sso/Status || exit 1 diff --git a/Workbench/webproxy/container_files/system/startWithMDLoad.sh b/Workbench/webproxy/container_files/system/startWithMDLoad.sh index 5edff2a..e3f14fa 100755 --- a/Workbench/webproxy/container_files/system/startWithMDLoad.sh +++ b/Workbench/webproxy/container_files/system/startWithMDLoad.sh @@ -1,5 +1,6 @@ #!/bin/sh /usr/local/bin/startup.sh & +php-fpm -D & #wait for IdPUI's API, then load metadata into it pushd /mdload
ContainerHealth Status