Merge pull request 'Fix CLIC health check and silently restarting export workers' (#40) from sacchi_r/WebHosting_DMZ:fix-clic-health-workers into main

Reviewed-on: linux/WebHosting_DMZ#40
This commit is contained in:
2026-09-09 12:38:01 +02:00
+10 -5
View File
@@ -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