From de895cc3672465e2590fb127a8e5c4d89fc853bf Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Wed, 9 Sep 2026 12:12:28 +0200 Subject: [PATCH] Fix CLIC health probe and worker startup commands --- docker-compose.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 11b7f95..09d4efe 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -168,7 +168,12 @@ services: clic-redis: condition: service_started healthcheck: - test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health/live/', timeout=5)"] + # Match the public host and proxy scheme while probing the local listener. + test: + - CMD + - python + - -c + - "import urllib.request; r = urllib.request.Request('http://127.0.0.1:8000/health/live/', headers={'Host': 'clic.psi.ch', 'X-Forwarded-Proto': 'https'}); urllib.request.urlopen(r, timeout=5)" interval: 30s timeout: 5s retries: 5 @@ -193,8 +198,8 @@ services: volumes: - /mount/webhosting_dmz_write/clic/media:/app/media - /mount/webhosting_dmz_write/clic/impact_factors:/app/data/impact_factors:ro - entrypoint: ["/bin/sh", "-c"] - command: exec python manage.py process_package_exports + entrypoint: ["python"] + command: ["manage.py", "process_package_exports", "--skip-checks"] depends_on: clic-db: condition: service_healthy @@ -219,8 +224,8 @@ services: volumes: - /mount/webhosting_dmz_write/clic/media:/app/media - /mount/webhosting_dmz_write/clic/impact_factors:/app/data/impact_factors:ro - entrypoint: ["/bin/sh", "-c"] - command: exec python manage.py process_brightway_json_exports --skip-checks --sleep "${CLIC_API_EXPORT_POLL_SECONDS:-2}" + entrypoint: ["python"] + command: ["manage.py", "process_brightway_json_exports", "--skip-checks", "--sleep", "${CLIC_API_EXPORT_POLL_SECONDS:-2}"] depends_on: clic-db: condition: service_healthy