From 3d17f0409fc47839195a36bbb1656a3df3d82e2c Mon Sep 17 00:00:00 2001 From: unlair Date: Sun, 12 Apr 2026 17:44:04 -0400 Subject: [PATCH] Fix healthcheck in Docker files when `SYSTEM_ROOTURIPATH` is specified (#5954) --- DeveloperGuide.md | 2 +- devGuide/DeveloperGuide.md | 2 +- docker/compose/docker-compose-unified-backend.yml | 2 +- docker/compose/docker-compose-unified-both.yml | 2 +- docker/compose/docker-compose-unified-frontend.yml | 2 +- docker/compose/docker-compose.fat.yml | 2 +- docker/compose/docker-compose.ultra-lite.yml | 2 +- docker/compose/docker-compose.yml | 2 +- docker/embedded/Dockerfile | 2 +- docker/embedded/Dockerfile.fat | 2 +- .../compose/docker-compose-latest-fat-endpoints-disabled.yml | 2 +- docker/embedded/compose/docker-compose-latest-fat-security.yml | 2 +- .../compose/docker-compose-latest-security-remote-uno.yml | 2 +- docker/embedded/compose/docker-compose-latest-security.yml | 2 +- docker/embedded/compose/docker-compose-latest-ultra-lite.yml | 2 +- docker/embedded/compose/test_cicd.yml | 2 +- testing/compose/docker-compose-keycloak-oauth.yml | 2 +- testing/compose/docker-compose-keycloak-saml.yml | 2 +- testing/compose/docker-compose-security-with-login.yml | 2 +- testing/compose/docker-compose-security.yml | 2 +- testing/compose/docker-compose-ultra-lite.yml | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/DeveloperGuide.md b/DeveloperGuide.md index d67429437a..735c1348f9 100644 --- a/DeveloperGuide.md +++ b/DeveloperGuide.md @@ -187,7 +187,7 @@ services: limits: memory: 4G healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -q 'Please sign in'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -q 'Please sign in'"] interval: 5s timeout: 10s retries: 16 diff --git a/devGuide/DeveloperGuide.md b/devGuide/DeveloperGuide.md index 034a475c5f..2a16adf979 100644 --- a/devGuide/DeveloperGuide.md +++ b/devGuide/DeveloperGuide.md @@ -135,7 +135,7 @@ services: limits: memory: 4G healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -q 'Please sign in'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -q 'Please sign in'"] interval: 5s timeout: 10s retries: 16 diff --git a/docker/compose/docker-compose-unified-backend.yml b/docker/compose/docker-compose-unified-backend.yml index b8ebfd42b3..e8a9e3c3df 100644 --- a/docker/compose/docker-compose-unified-backend.yml +++ b/docker/compose/docker-compose-unified-backend.yml @@ -41,7 +41,7 @@ services: restart: unless-stopped healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status || exit 1"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status || exit 1"] interval: 30s timeout: 10s retries: 3 diff --git a/docker/compose/docker-compose-unified-both.yml b/docker/compose/docker-compose-unified-both.yml index 92e08e4aae..f600905de3 100644 --- a/docker/compose/docker-compose-unified-both.yml +++ b/docker/compose/docker-compose-unified-both.yml @@ -45,7 +45,7 @@ services: restart: unless-stopped healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status || exit 1"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status || exit 1"] interval: 30s timeout: 10s retries: 3 diff --git a/docker/compose/docker-compose-unified-frontend.yml b/docker/compose/docker-compose-unified-frontend.yml index c7d217b34c..0739bf8a7a 100644 --- a/docker/compose/docker-compose-unified-frontend.yml +++ b/docker/compose/docker-compose-unified-frontend.yml @@ -24,7 +24,7 @@ services: UMASK: "022" restart: unless-stopped healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status || exit 1"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status || exit 1"] interval: 30s timeout: 10s retries: 3 diff --git a/docker/compose/docker-compose.fat.yml b/docker/compose/docker-compose.fat.yml index a6d657f156..215471ab0b 100644 --- a/docker/compose/docker-compose.fat.yml +++ b/docker/compose/docker-compose.fat.yml @@ -10,7 +10,7 @@ services: limits: memory: 6G healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 16 diff --git a/docker/compose/docker-compose.ultra-lite.yml b/docker/compose/docker-compose.ultra-lite.yml index 420a64137f..af2c6efc71 100644 --- a/docker/compose/docker-compose.ultra-lite.yml +++ b/docker/compose/docker-compose.ultra-lite.yml @@ -10,7 +10,7 @@ services: limits: memory: 2G healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 16 diff --git a/docker/compose/docker-compose.yml b/docker/compose/docker-compose.yml index 359bf2f463..577338a90d 100644 --- a/docker/compose/docker-compose.yml +++ b/docker/compose/docker-compose.yml @@ -6,7 +6,7 @@ services: container_name: stirling-pdf restart: unless-stopped healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 16 diff --git a/docker/embedded/Dockerfile b/docker/embedded/Dockerfile index 0d8bb176e8..a0f435c15c 100644 --- a/docker/embedded/Dockerfile +++ b/docker/embedded/Dockerfile @@ -119,7 +119,7 @@ EXPOSE 8080/tcp STOPSIGNAL SIGTERM HEALTHCHECK --interval=30s --timeout=15s --start-period=120s --retries=5 \ - CMD curl -fs --max-time 10 http://localhost:8080/api/v1/info/status || exit 1 + CMD curl -fs --max-time 10 http://localhost:8080${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status || exit 1 ENTRYPOINT ["tini", "--", "/scripts/init.sh"] CMD [] diff --git a/docker/embedded/Dockerfile.fat b/docker/embedded/Dockerfile.fat index 43d4da75a9..6c739e61ea 100644 --- a/docker/embedded/Dockerfile.fat +++ b/docker/embedded/Dockerfile.fat @@ -121,7 +121,7 @@ EXPOSE 8080/tcp STOPSIGNAL SIGTERM HEALTHCHECK --interval=30s --timeout=15s --start-period=120s --retries=5 \ - CMD curl -fs --max-time 10 http://localhost:8080/api/v1/info/status || exit 1 + CMD curl -fs --max-time 10 http://localhost:8080${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status || exit 1 ENTRYPOINT ["tini", "--", "/scripts/init.sh"] CMD [] diff --git a/docker/embedded/compose/docker-compose-latest-fat-endpoints-disabled.yml b/docker/embedded/compose/docker-compose-latest-fat-endpoints-disabled.yml index 512ba4f144..c1d2360b53 100644 --- a/docker/embedded/compose/docker-compose-latest-fat-endpoints-disabled.yml +++ b/docker/embedded/compose/docker-compose-latest-fat-endpoints-disabled.yml @@ -11,7 +11,7 @@ services: limits: memory: 4G healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 16 diff --git a/docker/embedded/compose/docker-compose-latest-fat-security.yml b/docker/embedded/compose/docker-compose-latest-fat-security.yml index 9ca92ce60c..7abd1acd6c 100644 --- a/docker/embedded/compose/docker-compose-latest-fat-security.yml +++ b/docker/embedded/compose/docker-compose-latest-fat-security.yml @@ -10,7 +10,7 @@ services: limits: memory: 4G healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 16 diff --git a/docker/embedded/compose/docker-compose-latest-security-remote-uno.yml b/docker/embedded/compose/docker-compose-latest-security-remote-uno.yml index d1b804ad4c..a80a04e133 100644 --- a/docker/embedded/compose/docker-compose-latest-security-remote-uno.yml +++ b/docker/embedded/compose/docker-compose-latest-security-remote-uno.yml @@ -6,7 +6,7 @@ services: context: ../../.. dockerfile: docker/embedded/Dockerfile healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 16 diff --git a/docker/embedded/compose/docker-compose-latest-security.yml b/docker/embedded/compose/docker-compose-latest-security.yml index af8979bafa..42f9946dc0 100644 --- a/docker/embedded/compose/docker-compose-latest-security.yml +++ b/docker/embedded/compose/docker-compose-latest-security.yml @@ -6,7 +6,7 @@ services: context: ../../.. dockerfile: docker/embedded/Dockerfile healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 16 diff --git a/docker/embedded/compose/docker-compose-latest-ultra-lite.yml b/docker/embedded/compose/docker-compose-latest-ultra-lite.yml index a5cae8dc54..11174d1064 100644 --- a/docker/embedded/compose/docker-compose-latest-ultra-lite.yml +++ b/docker/embedded/compose/docker-compose-latest-ultra-lite.yml @@ -10,7 +10,7 @@ services: limits: memory: 1G healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -qv 'Please sign in'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -qv 'Please sign in'"] interval: 5s timeout: 10s retries: 16 diff --git a/docker/embedded/compose/test_cicd.yml b/docker/embedded/compose/test_cicd.yml index d1e08013c2..c6043078a0 100644 --- a/docker/embedded/compose/test_cicd.yml +++ b/docker/embedded/compose/test_cicd.yml @@ -10,7 +10,7 @@ services: limits: memory: 4G healthcheck: - test: ["CMD-SHELL", "curl -f -H 'X-API-KEY: 123456789' http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f -H 'X-API-KEY: 123456789' http://localhost:8080${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 16 diff --git a/testing/compose/docker-compose-keycloak-oauth.yml b/testing/compose/docker-compose-keycloak-oauth.yml index dd5c096658..345dac2175 100644 --- a/testing/compose/docker-compose-keycloak-oauth.yml +++ b/testing/compose/docker-compose-keycloak-oauth.yml @@ -58,7 +58,7 @@ services: - "localhost:host-gateway" - "${KEYCLOAK_HOST:-kubernetes.docker.internal}:host-gateway" healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 30 diff --git a/testing/compose/docker-compose-keycloak-saml.yml b/testing/compose/docker-compose-keycloak-saml.yml index c5192122ca..db5ec53a26 100644 --- a/testing/compose/docker-compose-keycloak-saml.yml +++ b/testing/compose/docker-compose-keycloak-saml.yml @@ -56,7 +56,7 @@ services: context: ../.. dockerfile: docker/embedded/Dockerfile healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 30 diff --git a/testing/compose/docker-compose-security-with-login.yml b/testing/compose/docker-compose-security-with-login.yml index ca35fd1c9f..7199d09171 100644 --- a/testing/compose/docker-compose-security-with-login.yml +++ b/testing/compose/docker-compose-security-with-login.yml @@ -10,7 +10,7 @@ services: limits: memory: 4G healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 16 diff --git a/testing/compose/docker-compose-security.yml b/testing/compose/docker-compose-security.yml index deedc001fe..4454cb275f 100644 --- a/testing/compose/docker-compose-security.yml +++ b/testing/compose/docker-compose-security.yml @@ -10,7 +10,7 @@ services: limits: memory: 4G healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 16 diff --git a/testing/compose/docker-compose-ultra-lite.yml b/testing/compose/docker-compose-ultra-lite.yml index fcb9554792..ab3a942809 100644 --- a/testing/compose/docker-compose-ultra-lite.yml +++ b/testing/compose/docker-compose-ultra-lite.yml @@ -10,7 +10,7 @@ services: limits: memory: 2G healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP'"] + test: ["CMD-SHELL", "curl -f http://localhost:8080$${SYSTEM_ROOTURIPATH:-''}/api/v1/info/status | grep -q 'UP'"] interval: 5s timeout: 10s retries: 16