From f8bf092bb48ad542c2783a20091664cc51a577f8 Mon Sep 17 00:00:00 2001 From: Jeffrey Vervoort Date: Fri, 8 Dec 2023 10:16:06 +0100 Subject: [PATCH] Add Hack comment to postgis healthcheck. --- ...{postgis_healthcheck.sh => healthcheck_postgis_uptime.sh} | 0 docker-compose.yml | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) rename database/{postgis_healthcheck.sh => healthcheck_postgis_uptime.sh} (100%) diff --git a/database/postgis_healthcheck.sh b/database/healthcheck_postgis_uptime.sh similarity index 100% rename from database/postgis_healthcheck.sh rename to database/healthcheck_postgis_uptime.sh diff --git a/docker-compose.yml b/docker-compose.yml index b86294b..d1ec933 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,14 +10,15 @@ services: volumes: # - ts-data:/home/postgres/pgdata/data # for timescale image - ts-data:/var/lib/postgresql/data # for postgres image - - ./database/postgis_healthcheck.sh:/postgis_healthcheck.sh # for the healthcheck + - ./database/healthcheck_postgis_uptime.sh:/healthcheck_postgis_uptime.sh # for the healthcheck environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=mysecretpassword - POSTGRES_DB=data restart: on-failure healthcheck: - test: ["CMD-SHELL", "/postgis_healthcheck.sh postgresql://postgres:mysecretpassword@localhost/data 10 second"] + # HACK Due to the installation of Postgis extension the database is restarted, the healthcheck checks if the database is up for longer than specified time. + test: ["CMD-SHELL", "/healthcheck_postgis_uptime.sh postgresql://postgres:mysecretpassword@localhost/data 10 second"] interval: 5s timeout: 1s retries: 3