From 7a86396e307200e0e22679f72993104b39e14149 Mon Sep 17 00:00:00 2001 From: Oleh Vehera <11544787+iVegas@users.noreply.github.com> Date: Thu, 24 Apr 2025 00:09:55 +0300 Subject: [PATCH] Add healthcheck for postgres container --- compose.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compose.yml b/compose.yml index 280cd7d85..ab985c250 100644 --- a/compose.yml +++ b/compose.yml @@ -106,6 +106,11 @@ services: # volumes: # - ./postgres-init:/docker-entrypoint-initdb.d # Place init file(s) here. # - /path/to/postgres/data/on/host:/var/lib/postgresql/data # Use bind mount +# healthcheck: +# test: netstat -an | grep $DB_PORT > /dev/null; if [ 0 != $? ]; then exit 1; fi; +# interval: 10s +# timeout: 15s +# retries: 15 # apache: # image: wodby/apache:$APACHE_TAG