restart-condition in container-services
This commit is contained in:
@@ -36,9 +36,18 @@ services:
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
restart: "no"
|
||||
# Kein Bind-Mount und kein --reload: Es laeuft der Code aus dem
|
||||
# gebauten Abbild. Zum Entwickeln docker-compose.override.yml
|
||||
# anlegen (Vorlage: docker-compose.override.yml.example).
|
||||
healthcheck:
|
||||
# Kein curl im python:slim-Abbild - deshalb ueber Python.
|
||||
test: ["CMD", "python3", "-c",
|
||||
"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/healthz', timeout=3).status==200 else 1)"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
restart: unless-stopped
|
||||
networks: [einkaufsapp]
|
||||
|
||||
web:
|
||||
|
||||
Reference in New Issue
Block a user