mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-08 11:17:17 +02:00
- 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
14 lines
376 B
Django/Jinja
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" }} |