From 7038422161e3d44e321d967fb0a603431e8425da Mon Sep 17 00:00:00 2001 From: elpatron Date: Sat, 25 Apr 2026 10:49:48 +0200 Subject: [PATCH] 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 --- docker-compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 5b692d0..6c39270 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: