From a40e0abcc0654f94723423e9034fbafb76a49cda Mon Sep 17 00:00:00 2001 From: ISMAIL MASSERAN Date: Tue, 30 Jun 2026 12:49:32 +0800 Subject: [PATCH] DONE: update .env and docker compose port forwarding --- .env.production | 13 +++++++------ docker/production/docker-compose.production.yml | 4 ++-- docker/production/nginx/nginx.conf | 14 ++++++-------- docker/production/redis/redis.conf | 2 +- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.env.production b/.env.production index 2919b12..18e4095 100644 --- a/.env.production +++ b/.env.production @@ -3,7 +3,7 @@ APP_ENV=production APP_KEY=base64:XdMAy5IbQMHsTrp1N7Tn/LIJC4SKenN8CfhYLt1s3tk= APP_DEBUG=false APP_TIMEZONE=Asia/Kuala_Lumpur -APP_URL=https://anggota.koppkb.com +APP_URL=https://api.koppkb.com APP_LOCALE=en APP_FALLBACK_LOCALE=en @@ -21,12 +21,13 @@ LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=error -DB_CONNECTION=pgsql -DB_HOST=172.16.5.12 -DB_PORT=5433 +DB_CONNECTION=db +DB_HOST=db +DB_PORT=5432 DB_DATABASE=mykopkb DB_USERNAME=mykopkbuser DB_PASSWORD=MyKOPKB@Production_2026 +DB_ROOT_PASSWORD=MIq8ogpdKRppb5HThjY5Caeow5OFo8BCyJ SESSION_DRIVER=redis SESSION_LIFETIME=60 @@ -60,7 +61,7 @@ MAIL_HOST=mailpit MAIL_PORT=1025 MAIL_USERNAME=null MAIL_PASSWORD=null -MAIL_FROM_ADDRESS="hello@example.com" +MAIL_FROM_ADDRESS="noreply@koppkb.com" MAIL_FROM_NAME="${APP_NAME}" AWS_ACCESS_KEY_ID= @@ -91,7 +92,7 @@ EXTERNAL_API_BASE_URL= # SSO_ENABLE_FALLBACK=true # SSO_PROXY_ENABLED=true -SANCTUM_STATEFUL_DOMAINS=anggota.koppkb.com +SANCTUM_STATEFUL_DOMAINS=api.koppkb.com BLOCK_API_TOOLS_IN_PRODUCTION=true MIN_USER_AGENT_LENGTH=15 diff --git a/docker/production/docker-compose.production.yml b/docker/production/docker-compose.production.yml index f80b972..acb5bb6 100644 --- a/docker/production/docker-compose.production.yml +++ b/docker/production/docker-compose.production.yml @@ -44,7 +44,7 @@ services: networks: - mykopkb-production-network healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost/"] + test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1/health"] interval: 30s timeout: 10s retries: 3 @@ -60,7 +60,7 @@ services: container_name: mykopkb-postgres-production restart: unless-stopped ports: - - "${DB_PORT:-5432}:5432" + - "${DB_PORT:-5433}:5432" environment: - POSTGRES_ROOT_PASSWORD=${DB_ROOT_PASSWORD} - POSTGRES_DATABASE=${DB_DATABASE} diff --git a/docker/production/nginx/nginx.conf b/docker/production/nginx/nginx.conf index 0e5aa46..0135dd1 100644 --- a/docker/production/nginx/nginx.conf +++ b/docker/production/nginx/nginx.conf @@ -28,6 +28,12 @@ http { try_files $uri $uri/ /index.php?$query_string; } + location = /health { + access_log off; + default_type text/plain; + return 200 'ok'; + } + location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; @@ -43,14 +49,6 @@ http { deny all; } - location = /health { - fastcgi_pass 127.0.0.1:9000; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root/index.php; - include fastcgi_params; - fastcgi_param HTTP_PROXY ""; - } - location ^~ /horizon { add_header Content-Security-Policy "default-src 'self' http: https: data: blob 'unsafe-inline' 'unsafe-eval'" always; fastcgi_pass 127.0.0.1:9000; diff --git a/docker/production/redis/redis.conf b/docker/production/redis/redis.conf index 6008e97..e10e402 100644 --- a/docker/production/redis/redis.conf +++ b/docker/production/redis/redis.conf @@ -1,3 +1,3 @@ port 6379 bind 0.0.0.0 -requirepass sutera_redis@2025 \ No newline at end of file +requirepass mykopkb_redis@2025 \ No newline at end of file