health check: working example in compose-sample.yaml

This commit is contained in:
Klaas van Schelven
2025-03-31 21:48:31 +02:00
parent abd144a4f6
commit 9a0c52dc58

View File

@@ -26,6 +26,11 @@ services:
CREATE_SUPERUSER: admin:admin # Change this (or remove it and execute 'createsuperuser' against the running container)
PORT: 8000
DATABASE_URL: mysql://root:change_your_passwords_for_real_usage@mysql:3306/bugsink
healthcheck:
test: ["CMD-SHELL", "python -c 'import requests; requests.get(\"http://localhost:8000/\").raise_for_status()'"]
interval: 5s
timeout: 20s
retries: 10
volumes:
my-datavolume: