Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/aou-sas/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ RUN PROXY_CONF=/etc/httpd/conf.d/dkrapro-proxy.conf && \
###############################################################################
RUN mkdir -p /data && chown aou:aougroup /data

# SAS Studio takes ~40s to start inside the container. The Docker
# HEALTHCHECK lets the host-level readiness probe (probe-proxy-readiness.sh)
# wait for HTTP 200 before marking startup_script/status=COMPLETE.
HEALTHCHECK --interval=5s --timeout=3s --start-period=60s --retries=3 \
CMD curl -sf http://localhost:7080/SASStudio/ || exit 1

# Wrapper entrypoint: copies the SAS license from Mikey Secrets (if active)
# to /sasinside/ before handing off to the SAS entrypoint.
COPY --from=wb-secret-receiver /dist/wb-secret-receiver /wb-secret-receiver
Expand Down
7 changes: 5 additions & 2 deletions startupscript/butane/probe-proxy-readiness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ set -o xtrace
# shellcheck source=/dev/null
source /home/core/metadata-utils.sh

APP_HEALTH="$(docker inspect --format='{{.State.Health.Status}}' application-server 2>/dev/null || echo "none")"

if docker ps -q --filter "name=proxy-agent" | grep -q . \
&& docker ps -q --filter "name=application-server" | grep -q .; then
echo "Proxy is ready."
&& docker ps -q --filter "name=application-server" | grep -q . \
&& [[ "${APP_HEALTH}" == "healthy" || "${APP_HEALTH}" == "none" ]]; then
echo "Proxy is ready (application-server health: ${APP_HEALTH})."
status="$(get_guest_attribute "startup_script/status" "")"
isSuccess="false"
if [[ "${status}" != "ERROR" ]]; then
Expand Down
Loading