Add healthcheck on database service (#1304)

This commit is contained in:
Maxime Helias
2024-04-05 19:19:12 +02:00
committed by GitHub
parent 1f04d3f0c8
commit fd96941b6d
@@ -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!",