From fd96941b6d612381b666b940b7ec4bdab521ea24 Mon Sep 17 00:00:00 2001 From: Maxime Helias Date: Fri, 5 Apr 2024 19:19:12 +0200 Subject: [PATCH] Add healthcheck on database service (#1304) --- doctrine/doctrine-bundle/2.12/manifest.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doctrine/doctrine-bundle/2.12/manifest.json b/doctrine/doctrine-bundle/2.12/manifest.json index 1d8996a7..0889946e 100644 --- a/doctrine/doctrine-bundle/2.12/manifest.json +++ b/doctrine/doctrine-bundle/2.12/manifest.json @@ -28,6 +28,11 @@ " # You should definitely change the password in production", " POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}", " POSTGRES_USER: ${POSTGRES_USER:-app}", + " healthcheck:", + " test: [\"CMD\", \"pg_isready\"]", + " timeout: 5s", + " retries: 5", + " start_period: 60s", " volumes:", " - database_data:/var/lib/postgresql/data:rw", " # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!",