Improve container resilience after VPS restarts.

Add an automatic restart policy and a built-in HTTP healthcheck so the service recovers cleanly after host reboot and reports runtime readiness.

Made-with: Cursor
This commit is contained in:
2026-04-25 10:49:48 +02:00
parent dbe22cd175
commit 7038422161
+7
View File
@@ -4,6 +4,13 @@ services:
erdbeerkasse:
build: .
container_name: erdbeerkasse
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request,sys; urllib.request.urlopen('http://127.0.0.1:90/', timeout=5); sys.exit(0)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
ports:
- "9090:90"
volumes: