From d395bb4f390f752c5a2c969f8a320b20d477ebd9 Mon Sep 17 00:00:00 2001 From: Elliot Matson Date: Fri, 29 Jul 2022 16:43:49 -0500 Subject: [PATCH] Add healthchecks to postgres and pgadmin --- docker-compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 24d9a24..364f25c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,6 +34,11 @@ services: <<: [*db-environment] volumes: - *db-location + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 10s + timeout: 5s + retries: 5 pgbackups: image: prodrigestivill/postgres-backup-local:13 restart: always @@ -55,3 +60,5 @@ services: <<: [*admin-environment] ports: - *pgadmin-port + healthcheck: + test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost/ || exit 1"]