From 5359a4ff96418029bae1b770882e533fb3dc89c0 Mon Sep 17 00:00:00 2001 From: gitea_admin Date: Fri, 9 Feb 2024 17:44:42 +0545 Subject: [PATCH] chore: Reduce healthcheck interval for both redis and api docker-compose.yml --- docker-compose.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 948dbf55..7ab4a9f7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,8 +26,8 @@ services: - POSTGRES_DB=learnhouse healthcheck: test: ["CMD-SHELL", "pg_isready"] - interval: 10s - timeout: 5s + interval: 5s + timeout: 4s retries: 5 redis: image: redis:7.2.3 @@ -35,7 +35,10 @@ services: ports: - "6379:6379" healthcheck: - test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] + test: [ "CMD", "redis-cli", "ping" ] + interval: 5s + timeout: 4s + retries: 5 mongo: image: mongo:5.0 restart: always @@ -43,6 +46,4 @@ services: - "27017:27017" environment: - MONGO_INITDB_ROOT_USERNAME=learnhouse - - MONGO_INITDB_ROOT_PASSWORD=learnhouse - healthcheck: - test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet \ No newline at end of file + - MONGO_INITDB_ROOT_PASSWORD=learnhous \ No newline at end of file