From db840bd1b4851760882ca913d2331961cc9bf8ce Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 31 Oct 2024 15:25:23 +0530 Subject: [PATCH] chore: app healthcheck --- docker-compose.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5b850297..e64ab0d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,12 +8,15 @@ services: target: production env_file: .env ports: - - "5173:80" - - "8080:8080" + - "5173:80" # Only expose Nginx depends_on: - - db - - minio - - redis + db: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/"] + interval: 10s + timeout: 5s + retries: 5 db: image: postgres:13