Files
computer-playbook/roles/docker-container/templates/healthcheck/curl.yml.j2
Kevin Veen-Birkenbach 9f734dff17 web-app-pretix: fix healthcheck and allowed hosts
- Add Host header to curl healthcheck when container_hostname is defined
- Use PRETIX_PRETIX_ALLOWED_HOSTS to fix Django 400 Bad Request during healthcheck
- Centralize PRETIX_HOSTNAME from container_hostname var
- Add Redis broker/result backend config for Celery

See: https://chatgpt.com/share/68b59c42-c0fc-800f-9bfb-f1137c59b3de
2025-09-01 15:15:04 +02:00

14 lines
376 B
Django/Jinja

healthcheck:
test:
- "CMD"
- "curl"
- "-f"
{% if container_hostname %}
- "-H"
- "Host: {{ container_hostname }}"
{% endif %}
- "http://127.0.0.1{{ (":" ~ container_port) if container_port is defined else '' }}/{{ container_healthcheck | default('') }}"
interval: 1m
timeout: 10s
retries: 3
{{ "\n" }}