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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user