From e2668c6143922bbc04d4481a1a226c958dbbed65 Mon Sep 17 00:00:00 2001 From: Nelson Stoik Date: Fri, 26 Jan 2024 22:59:48 -0700 Subject: [PATCH] add healthcheck for pgadmin and postgres --- docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 76e3aaa..8dbe813 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -92,6 +92,8 @@ services: - "dbdata:/var/lib/postgresql/data" networks: - farm_device + healthcheck: + test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}"] labels: - custom.label=farm_device @@ -111,6 +113,8 @@ services: networks: - farm_device restart: unless-stopped + healthcheck: + test: ["CMD", "wget", "-O", "-", "http://localhost:80/misc/ping"] labels: - custom.label=farm_device - traefik.enable=true