From 240fb8f1897796df021f993db4fd31dfea0be681 Mon Sep 17 00:00:00 2001 From: ISMAIL MASSERAN Date: Tue, 30 Jun 2026 14:10:14 +0800 Subject: [PATCH] DONE: fix health issues on db service --- be/.env.production | 3 ++- be/docker/production/docker-compose.production.yml | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/be/.env.production b/be/.env.production index 18e4095..f7bd921 100644 --- a/be/.env.production +++ b/be/.env.production @@ -3,7 +3,8 @@ APP_ENV=production APP_KEY=base64:XdMAy5IbQMHsTrp1N7Tn/LIJC4SKenN8CfhYLt1s3tk= APP_DEBUG=false APP_TIMEZONE=Asia/Kuala_Lumpur -APP_URL=https://api.koppkb.com +APP_URL=http://localhost +APP_PORT=8080 APP_LOCALE=en APP_FALLBACK_LOCALE=en diff --git a/be/docker/production/docker-compose.production.yml b/be/docker/production/docker-compose.production.yml index acb5bb6..939437c 100644 --- a/be/docker/production/docker-compose.production.yml +++ b/be/docker/production/docker-compose.production.yml @@ -62,17 +62,20 @@ services: ports: - "${DB_PORT:-5433}:5432" environment: - - POSTGRES_ROOT_PASSWORD=${DB_ROOT_PASSWORD} - - POSTGRES_DATABASE=${DB_DATABASE} - POSTGRES_USER=${DB_USERNAME} - POSTGRES_PASSWORD=${DB_PASSWORD} + - POSTGRES_DB=${DB_DATABASE} volumes: - db-data-production:/var/lib/postgres - ./be/docker/postgres/conf.d:/etc/postgres/conf.d:ro networks: - mykopkb-production-network healthcheck: - test: ["CMD", "postgres", "ping", "-h", "localhost"] + test: + [ + "CMD-SHELL", + 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" || exit 1', + ] interval: 15s timeout: 10s retries: 5