mirror of
https://github.com/symfony/recipes.git
synced 2026-09-12 07:36:30 +03:00
Add healthcheck on database service (#1304)
This commit is contained in:
@@ -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!",
|
||||
|
||||
Reference in New Issue
Block a user