From 4d46bd66d3d35bca39593418bb56db6f68d6bf9a Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Tue, 29 Oct 2024 09:12:02 +0100 Subject: [PATCH] - Add healthcheck example in compose file. --- ReleaseNotes.txt | 10 +++++++++- compose.yaml | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 15bddd0..19bce72 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,8 +1,16 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3/PostgreSQL-Mga9 V 1.0.3 - A. GIBERT - 2024/11/xx +------------------------------------------------------------------------------------------------------------------------------------ + +- Add healthcheck example in compose file. + + + ------------------------------------------------------------------------------------------------------------------------------------ Rx3/PostgreSQL-Mga9 V 1.0.2 - A. GIBERT - 2024/10/05 ------------------------------------------------------------------------------------------------------------------------------------ -- Now use server-mga9:1.1.3 image, +- Now use rx3/server-mga9:1.1.3 image, - Variabilization of external server ports in env & compose file, - Now use docker_tools for .env building. diff --git a/compose.yaml b/compose.yaml index 9cb77a3..82abc22 100644 --- a/compose.yaml +++ b/compose.yaml @@ -29,6 +29,12 @@ services: POSTGRESQL_USER: ${POSTGRESQL_USER} POSTGRESQL_PASSWORD: ${POSTGRESQL_PASSWORD} + healthcheck: + test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRESQL_USER} -d ${POSTGRESQL_DATABASE}'"] + interval: 10s + timeout: 3s + retries: 3 + volumes: - ./var/lib/pgsql/data:/var/lib/pgsql/data