From 529c92e0e1ad54ebe8f16e3a3019f1a07713d45c Mon Sep 17 00:00:00 2001 From: Ho Ngoc Hai Date: Wed, 15 Apr 2026 12:27:01 +0700 Subject: [PATCH] =?UTF-8?q?feat(dev):=20hybrid=20local=20dev=20setup=20?= =?UTF-8?q?=E2=80=94=20remote=20PostgreSQL/MinIO,=20local=20Redis/RabbitMQ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Configure all 24 services to connect to remote staging PostgreSQL (212.28.186.239:30992) and MinIO (minio.techbi.org) while running Redis and RabbitMQ locally on non-standard ports (16379, 25672) to avoid conflicts with other projects. - Add .env.remote with hybrid connection strings - Add docker-compose.dev.yml (lightweight Redis + RabbitMQ only) - Add scripts/dev/start-dev.sh for one-command infra startup - Update all appsettings.Development.json with remote DB + timeout - Add .claude/launch.json for Claude Code preview (pos-web only) Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/launch.json | 17 ++ deployments/local/.env.remote | 82 +++++++++ deployments/local/docker-compose.dev.yml | 57 ++++++ scripts/dev/start-dev.sh | 165 ++++++++++++++++++ .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 11 +- .../appsettings.Development.json | 8 +- .../appsettings.Development.json | 18 +- .../appsettings.Development.json | 8 +- 28 files changed, 485 insertions(+), 41 deletions(-) create mode 100644 .claude/launch.json create mode 100644 deployments/local/.env.remote create mode 100644 deployments/local/docker-compose.dev.yml create mode 100755 scripts/dev/start-dev.sh diff --git a/.claude/launch.json b/.claude/launch.json new file mode 100644 index 00000000..bbf26669 --- /dev/null +++ b/.claude/launch.json @@ -0,0 +1,17 @@ +{ + "version": "0.0.1", + "configurations": [ + { + "name": "pos-web", + "runtimeExecutable": "dotnet", + "runtimeArgs": ["run", "--project", "apps/web-client-tpos-net/src/WebClientTpos.Server", "--launch-profile", "http"], + "port": 5092 + }, + { + "name": "enterprise-web", + "runtimeExecutable": "dotnet", + "runtimeArgs": ["run", "--project", "apps/web-client-base-net/src/WebClientBase.Server", "--launch-profile", "http"], + "port": 5091 + } + ] +} diff --git a/deployments/local/.env.remote b/deployments/local/.env.remote new file mode 100644 index 00000000..58cad195 --- /dev/null +++ b/deployments/local/.env.remote @@ -0,0 +1,82 @@ +# ============================================================================= +# GoodGo Platform - Hybrid Dev Environment (Remote DB + MinIO, Local Redis + RabbitMQ) +# ============================================================================= +# EN: Points PostgreSQL and MinIO to remote staging servers. +# Redis and RabbitMQ run locally on non-standard ports to avoid conflicts. +# VI: Trỏ PostgreSQL và MinIO lên remote staging servers. +# Redis và RabbitMQ chạy local trên port khác để tránh xung đột. +# ============================================================================= + +ASPNETCORE_ENVIRONMENT=Development +NODE_ENV=development +LOG_LEVEL=Information +API_VERSION=v1 + +# JWT / Auth +JWT_SECRET=GoodGo-Local-Dev-JWT-Secret-2024-Min32Chars!! +JWT_REFRESH_SECRET=GoodGo-Local-Dev-Refresh-Secret-2024-32Ch!! +JWT_ID_SECRET=GoodGo-Local-Dev-ID-Secret-2024-Min32Char!! +JWT_EXPIRES_IN=15m +JWT_REFRESH_EXPIRES_IN=7d +JWT_ID_EXPIRES_IN=1h +JWT_ISSUER=goodgo-platform +JWT_AUDIENCE=goodgo-services +JWT_ACCESS_TOKEN_EXPIRY_MINUTES=15 +JWT_REFRESH_TOKEN_EXPIRY_DAYS=7 + +# Security +ENCRYPTION_KEY=a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2 + +# Redis (LOCAL container on non-standard port to avoid conflict with ga-redis) +REDIS_HOST=localhost +REDIS_PORT=16379 +REDIS_PASSWORD=goodgo-redis-dev +REDIS_DATABASE=0 +REDIS_CONNECTION_STRING=localhost:16379,password=goodgo-redis-dev + +# MinIO (REMOTE - staging server via HTTPS) +MINIO_ENDPOINT=minio.techbi.org +MINIO_ACCESS_KEY=admin +MINIO_SECRET_KEY=Velik@2026 +MINIO_USE_SSL=true +MINIO_BUCKET=goodgo-staging + +# RabbitMQ (LOCAL container on non-standard port to avoid conflict with ga-rabbitmq) +RABBITMQ_HOST=localhost +RABBITMQ_PORT=25672 +RABBITMQ_MANAGEMENT_PORT=35672 +RABBITMQ_USERNAME=guest +RABBITMQ_PASSWORD=goodgo-rabbitmq-dev + +# Feature flags +FEATURE_SWAGGER_ENABLED=true +FEATURE_DETAILED_ERRORS=true +CORS_ORIGIN=http://localhost:3000,http://localhost:3001,http://localhost,http://admin.localhost +TRACING_ENABLED=false +METRICS_ENABLED=false + +# Database connection strings (REMOTE PostgreSQL - Staging Neon via NodePort) +IAM_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=iam_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +STORAGE_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=storage_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +MEMBERSHIP_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=membership_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +MERCHANT_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=merchant_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +WALLET_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=wallet_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +CHAT_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=chat_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +SOCIAL_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=social_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +MINING_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=mining_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +MISSION_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=mission_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +PROMOTION_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=promotion_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +CATALOG_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=catalog_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +ORDER_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=order_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +INVENTORY_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=inventory_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +FNB_ENGINE_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=fnb_engine;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +BOOKING_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=booking_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +ADS_MANAGER_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=ads_manager_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +ADS_ANALYTICS_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=ads_analytics_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +ADS_SERVING_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=ads_serving_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +ADS_BILLING_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=ads_billing_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +ADS_TRACKING_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=ads_tracking_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +MKT_FACEBOOK_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=mkt_facebook_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +MKT_WHATSAPP_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=mkt_whatsapp_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +MKT_X_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=mkt_x_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer +MKT_ZALO_DATABASE_URL=Host=212.28.186.239;Port=30992;Database=mkt_zalo_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer diff --git a/deployments/local/docker-compose.dev.yml b/deployments/local/docker-compose.dev.yml new file mode 100644 index 00000000..286f5ff5 --- /dev/null +++ b/deployments/local/docker-compose.dev.yml @@ -0,0 +1,57 @@ +# ============================================================================= +# GoodGo Platform - Lightweight Dev Infrastructure +# ============================================================================= +# EN: Only Redis + RabbitMQ for local dev. PostgreSQL and MinIO are on remote. +# VI: Chỉ Redis + RabbitMQ cho local dev. PostgreSQL và MinIO ở remote server. +# +# Usage: +# docker compose -f docker-compose.dev.yml up -d +# docker compose -f docker-compose.dev.yml down +# +# Ports (non-standard to avoid conflicts): +# Redis: 16379 (instead of 6379) +# RabbitMQ: 25672 (AMQP), 35672 (Management UI) +# ============================================================================= + +services: + # Redis 7 - Cache & SignalR Backplane (dev) + redis-dev: + image: redis:7-alpine + container_name: goodgo-redis-dev + command: redis-server --requirepass goodgo-redis-dev --maxmemory 256mb --maxmemory-policy allkeys-lru + ports: + - "16379:6379" + volumes: + - redis_dev_data:/data + restart: unless-stopped + healthcheck: + test: ["CMD", "redis-cli", "-a", "goodgo-redis-dev", "ping"] + interval: 10s + timeout: 5s + retries: 5 + + # RabbitMQ 3 - Message Broker (dev) + rabbitmq-dev: + image: rabbitmq:3-management-alpine + container_name: goodgo-rabbitmq-dev + environment: + - RABBITMQ_DEFAULT_USER=guest + - RABBITMQ_DEFAULT_PASS=goodgo-rabbitmq-dev + ports: + - "25672:5672" # AMQP + - "35672:15672" # Management UI + volumes: + - rabbitmq_dev_data:/var/lib/rabbitmq + restart: unless-stopped + healthcheck: + test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"] + interval: 15s + timeout: 10s + retries: 5 + start_period: 30s + +volumes: + redis_dev_data: + driver: local + rabbitmq_dev_data: + driver: local diff --git a/scripts/dev/start-dev.sh b/scripts/dev/start-dev.sh new file mode 100755 index 00000000..b8fe6d40 --- /dev/null +++ b/scripts/dev/start-dev.sh @@ -0,0 +1,165 @@ +#!/bin/bash +# ============================================================================= +# GoodGo Platform - Start Dev Infrastructure +# ============================================================================= +# EN: Starts lightweight local infra (Redis + RabbitMQ) and verifies remote +# connections (PostgreSQL + MinIO). No need to run full docker-compose. +# VI: Khởi động infra local nhẹ (Redis + RabbitMQ) và kiểm tra kết nối +# remote (PostgreSQL + MinIO). Không cần chạy docker-compose đầy đủ. +# +# Usage: +# ./scripts/dev/start-dev.sh # Start infra + check connections +# ./scripts/dev/start-dev.sh stop # Stop local containers +# ./scripts/dev/start-dev.sh status # Check status +# ============================================================================= + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" +COMPOSE_FILE="$PROJECT_ROOT/deployments/local/docker-compose.dev.yml" + +# Colors +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' + +print_header() { + echo "" + echo -e "${BLUE}═══════════════════════════════════════════════════${NC}" + echo -e "${BLUE} GoodGo Platform - Dev Infrastructure${NC}" + echo -e "${BLUE}═══════════════════════════════════════════════════${NC}" + echo "" +} + +check_remote_pg() { + echo -e "${YELLOW}[PostgreSQL]${NC} Testing remote connection (212.28.186.239:30992)..." + if nc -z -w3 212.28.186.239 30992 2>/dev/null; then + echo -e " ${GREEN}✓${NC} PostgreSQL remote is reachable" + return 0 + else + echo -e " ${RED}✗${NC} PostgreSQL remote is NOT reachable" + echo -e " ${RED} Check your network / VPN connection${NC}" + return 1 + fi +} + +check_remote_minio() { + echo -e "${YELLOW}[MinIO]${NC} Testing remote connection (minio.techbi.org)..." + if nc -z -w3 minio.techbi.org 443 2>/dev/null; then + echo -e " ${GREEN}✓${NC} MinIO remote is reachable" + return 0 + else + echo -e " ${RED}✗${NC} MinIO remote is NOT reachable" + return 1 + fi +} + +check_local_redis() { + echo -e "${YELLOW}[Redis]${NC} Testing local connection (localhost:16379)..." + if nc -z -w3 localhost 16379 2>/dev/null; then + echo -e " ${GREEN}✓${NC} Redis local is running" + return 0 + else + echo -e " ${RED}✗${NC} Redis local is NOT running" + return 1 + fi +} + +check_local_rabbitmq() { + echo -e "${YELLOW}[RabbitMQ]${NC} Testing local connection (localhost:25672)..." + if nc -z -w3 localhost 25672 2>/dev/null; then + echo -e " ${GREEN}✓${NC} RabbitMQ local is running" + return 0 + else + echo -e " ${RED}✗${NC} RabbitMQ local is NOT running" + return 1 + fi +} + +start_infra() { + print_header + + echo -e "${BLUE}Starting local containers (Redis + RabbitMQ)...${NC}" + docker compose -f "$COMPOSE_FILE" up -d + echo "" + + # Wait for containers to be healthy + echo -e "${BLUE}Waiting for containers to be ready...${NC}" + sleep 3 + + echo "" + echo -e "${BLUE}Checking all connections:${NC}" + echo "" + + local all_ok=true + check_remote_pg || all_ok=false + check_remote_minio || all_ok=false + check_local_redis || all_ok=false + check_local_rabbitmq || all_ok=false + + echo "" + if [ "$all_ok" = true ]; then + echo -e "${GREEN}═══════════════════════════════════════════════════${NC}" + echo -e "${GREEN} All infrastructure is ready!${NC}" + echo -e "${GREEN}═══════════════════════════════════════════════════${NC}" + else + echo -e "${YELLOW}═══════════════════════════════════════════════════${NC}" + echo -e "${YELLOW} Some connections failed. Check above for details.${NC}" + echo -e "${YELLOW}═══════════════════════════════════════════════════${NC}" + fi + + echo "" + echo -e "${BLUE}Infrastructure endpoints:${NC}" + echo -e " PostgreSQL : ${GREEN}212.28.186.239:30992${NC} (remote)" + echo -e " MinIO : ${GREEN}minio.techbi.org${NC} (remote, HTTPS)" + echo -e " Redis : ${GREEN}localhost:16379${NC} (local)" + echo -e " RabbitMQ : ${GREEN}localhost:25672${NC} (local, UI: localhost:35672)" + echo "" + echo -e "${BLUE}Run a service:${NC}" + echo -e " cd services/iam-service-net/src/IamService.API" + echo -e " dotnet run" + echo "" + echo -e "${BLUE}Service ports:${NC}" + echo -e " IAM Service : http://localhost:5001" + echo -e " Storage Service : http://localhost:5002" + echo -e " Wallet Service : http://localhost:5003" + echo -e " Merchant Service: http://localhost:5005" + echo "" +} + +stop_infra() { + echo -e "${BLUE}Stopping local containers...${NC}" + docker compose -f "$COMPOSE_FILE" down + echo -e "${GREEN}Done.${NC}" +} + +show_status() { + print_header + echo -e "${BLUE}Container status:${NC}" + docker compose -f "$COMPOSE_FILE" ps 2>/dev/null || echo " No containers running" + echo "" + echo -e "${BLUE}Connection checks:${NC}" + check_remote_pg + check_remote_minio + check_local_redis + check_local_rabbitmq +} + +case "${1:-start}" in + start) + start_infra + ;; + stop) + stop_infra + ;; + status) + show_status + ;; + *) + echo "Usage: $0 {start|stop|status}" + exit 1 + ;; +esac diff --git a/services/ads-analytics-service-net/src/AdsAnalyticsService.API/appsettings.Development.json b/services/ads-analytics-service-net/src/AdsAnalyticsService.API/appsettings.Development.json index e407ac85..4a2f0635 100644 --- a/services/ads-analytics-service-net/src/AdsAnalyticsService.API/appsettings.Development.json +++ b/services/ads-analytics-service-net/src/AdsAnalyticsService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=ads_analytics_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/ads-billing-service-net/src/AdsBillingService.API/appsettings.Development.json b/services/ads-billing-service-net/src/AdsBillingService.API/appsettings.Development.json index e407ac85..f5a552eb 100644 --- a/services/ads-billing-service-net/src/AdsBillingService.API/appsettings.Development.json +++ b/services/ads-billing-service-net/src/AdsBillingService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=ads_billing_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/ads-manager-service-net/src/AdsManagerService.API/appsettings.Development.json b/services/ads-manager-service-net/src/AdsManagerService.API/appsettings.Development.json index e407ac85..1075d8cd 100644 --- a/services/ads-manager-service-net/src/AdsManagerService.API/appsettings.Development.json +++ b/services/ads-manager-service-net/src/AdsManagerService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=ads_manager_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/ads-serving-service-net/src/AdsServingService.API/appsettings.Development.json b/services/ads-serving-service-net/src/AdsServingService.API/appsettings.Development.json index e407ac85..60d3cf63 100644 --- a/services/ads-serving-service-net/src/AdsServingService.API/appsettings.Development.json +++ b/services/ads-serving-service-net/src/AdsServingService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=ads_serving_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/ads-tracking-service-net/src/AdsTrackingService.API/appsettings.Development.json b/services/ads-tracking-service-net/src/AdsTrackingService.API/appsettings.Development.json index e407ac85..b3ba16d5 100644 --- a/services/ads-tracking-service-net/src/AdsTrackingService.API/appsettings.Development.json +++ b/services/ads-tracking-service-net/src/AdsTrackingService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=ads_tracking_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/booking-service-net/src/BookingService.API/appsettings.Development.json b/services/booking-service-net/src/BookingService.API/appsettings.Development.json index e407ac85..165889c3 100644 --- a/services/booking-service-net/src/BookingService.API/appsettings.Development.json +++ b/services/booking-service-net/src/BookingService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=booking_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/catalog-service-net/src/CatalogService.API/appsettings.Development.json b/services/catalog-service-net/src/CatalogService.API/appsettings.Development.json index e407ac85..156a594c 100644 --- a/services/catalog-service-net/src/CatalogService.API/appsettings.Development.json +++ b/services/catalog-service-net/src/CatalogService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=catalog_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/chat-service-net/src/ChatService.API/appsettings.Development.json b/services/chat-service-net/src/ChatService.API/appsettings.Development.json index e407ac85..409c0fb8 100644 --- a/services/chat-service-net/src/ChatService.API/appsettings.Development.json +++ b/services/chat-service-net/src/ChatService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=chat_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/fnb-engine-net/src/FnbEngine.API/appsettings.Development.json b/services/fnb-engine-net/src/FnbEngine.API/appsettings.Development.json index e407ac85..13b95860 100644 --- a/services/fnb-engine-net/src/FnbEngine.API/appsettings.Development.json +++ b/services/fnb-engine-net/src/FnbEngine.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=fnb_engine;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/iam-service-net/src/IamService.API/appsettings.Development.json b/services/iam-service-net/src/IamService.API/appsettings.Development.json index aa19fd7e..0cd7db13 100644 --- a/services/iam-service-net/src/IamService.API/appsettings.Development.json +++ b/services/iam-service-net/src/IamService.API/appsettings.Development.json @@ -30,15 +30,15 @@ ] }, "ConnectionStrings": { - "DefaultConnection": "Host=localhost;Database=iam_service;Username=goodgo;Password=goodgo-local-2024" + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=iam_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" }, "IdentityServer": { "Authority": "http://localhost:5001" }, "Redis": { "Host": "localhost", - "Port": 6379, - "Password": "", + "Port": 16379, + "Password": "goodgo-redis-dev", "Database": 0, "ConnectTimeout": 5000, "SyncTimeout": 5000 @@ -76,4 +76,4 @@ "CallbackUrl": "/api/auth/external-callback" }, "AllowedHosts": "*" -} \ No newline at end of file +} diff --git a/services/inventory-service-net/src/InventoryService.API/appsettings.Development.json b/services/inventory-service-net/src/InventoryService.API/appsettings.Development.json index e407ac85..c767658c 100644 --- a/services/inventory-service-net/src/InventoryService.API/appsettings.Development.json +++ b/services/inventory-service-net/src/InventoryService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=inventory_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/membership-service-net/src/MembershipService.API/appsettings.Development.json b/services/membership-service-net/src/MembershipService.API/appsettings.Development.json index 7bff96d5..3ad30c3a 100644 --- a/services/membership-service-net/src/MembershipService.API/appsettings.Development.json +++ b/services/membership-service-net/src/MembershipService.API/appsettings.Development.json @@ -17,12 +17,12 @@ } }, "ConnectionStrings": { - "DefaultConnection": "Host=localhost;Database=membership_service;Username=goodgo;Password=goodgo-local-2024" + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=membership_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" }, "Redis": { "Host": "localhost", - "Port": 6379, - "Password": "", + "Port": 16379, + "Password": "goodgo-redis-dev", "Database": 0, "ConnectTimeout": 5000, "SyncTimeout": 5000 @@ -34,4 +34,4 @@ "AccessTokenExpiryMinutes": 15, "RefreshTokenExpiryDays": 7 } -} \ No newline at end of file +} diff --git a/services/merchant-service-net/src/MerchantService.API/appsettings.Development.json b/services/merchant-service-net/src/MerchantService.API/appsettings.Development.json index e407ac85..43e02c23 100644 --- a/services/merchant-service-net/src/MerchantService.API/appsettings.Development.json +++ b/services/merchant-service-net/src/MerchantService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=merchant_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/mining-service-net/src/MiningService.API/appsettings.Development.json b/services/mining-service-net/src/MiningService.API/appsettings.Development.json index e407ac85..e62b1f9a 100644 --- a/services/mining-service-net/src/MiningService.API/appsettings.Development.json +++ b/services/mining-service-net/src/MiningService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=mining_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/mission-service-net/src/MissionService.API/appsettings.Development.json b/services/mission-service-net/src/MissionService.API/appsettings.Development.json index e407ac85..cbdf4a1c 100644 --- a/services/mission-service-net/src/MissionService.API/appsettings.Development.json +++ b/services/mission-service-net/src/MissionService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=mission_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/mkt-facebook-service-net/src/FacebookService.API/appsettings.Development.json b/services/mkt-facebook-service-net/src/FacebookService.API/appsettings.Development.json index e407ac85..9edef43b 100644 --- a/services/mkt-facebook-service-net/src/FacebookService.API/appsettings.Development.json +++ b/services/mkt-facebook-service-net/src/FacebookService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=mkt_facebook_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/mkt-whatsapp-service-net/src/WhatsAppService.API/appsettings.Development.json b/services/mkt-whatsapp-service-net/src/WhatsAppService.API/appsettings.Development.json index e407ac85..480a5729 100644 --- a/services/mkt-whatsapp-service-net/src/WhatsAppService.API/appsettings.Development.json +++ b/services/mkt-whatsapp-service-net/src/WhatsAppService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=mkt_whatsapp_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/mkt-x-service-net/src/MktXService.API/appsettings.Development.json b/services/mkt-x-service-net/src/MktXService.API/appsettings.Development.json index e407ac85..ef85fce8 100644 --- a/services/mkt-x-service-net/src/MktXService.API/appsettings.Development.json +++ b/services/mkt-x-service-net/src/MktXService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=mkt_x_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/mkt-zalo-service-net/src/MktZaloService.API/appsettings.Development.json b/services/mkt-zalo-service-net/src/MktZaloService.API/appsettings.Development.json index e407ac85..af0a7b07 100644 --- a/services/mkt-zalo-service-net/src/MktZaloService.API/appsettings.Development.json +++ b/services/mkt-zalo-service-net/src/MktZaloService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=mkt_zalo_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/order-service-net/src/OrderService.API/appsettings.Development.json b/services/order-service-net/src/OrderService.API/appsettings.Development.json index e407ac85..d00cf173 100644 --- a/services/order-service-net/src/OrderService.API/appsettings.Development.json +++ b/services/order-service-net/src/OrderService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=order_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/promotion-service-net/src/PromotionService.API/appsettings.Development.json b/services/promotion-service-net/src/PromotionService.API/appsettings.Development.json index 0169caaf..52e7023e 100644 --- a/services/promotion-service-net/src/PromotionService.API/appsettings.Development.json +++ b/services/promotion-service-net/src/PromotionService.API/appsettings.Development.json @@ -17,7 +17,7 @@ } }, "ConnectionStrings": { - "DefaultConnection": "Host=localhost;Database=promotion_service;Username=goodgo;Password=goodgo-local-2024" + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=promotion_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" }, "WalletService": { "BaseUrl": "http://localhost:5003", @@ -29,14 +29,17 @@ }, "RabbitMQ": { "Host": "localhost", - "Port": 5672, + "Port": 25672, "Username": "guest", - "Password": "guest", + "Password": "goodgo-rabbitmq-dev", "VirtualHost": "/" }, "Jwt": { "Authority": "http://localhost:5001", "Audience": "goodgo-api", "RequireHttpsMetadata": false + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/social-service-net/src/SocialService.API/appsettings.Development.json b/services/social-service-net/src/SocialService.API/appsettings.Development.json index e407ac85..b052ec38 100644 --- a/services/social-service-net/src/SocialService.API/appsettings.Development.json +++ b/services/social-service-net/src/SocialService.API/appsettings.Development.json @@ -15,5 +15,11 @@ "System": "Information" } } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=social_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +} diff --git a/services/storage-service-net/src/StorageService.API/appsettings.Development.json b/services/storage-service-net/src/StorageService.API/appsettings.Development.json index c2c69d81..8467bd06 100644 --- a/services/storage-service-net/src/StorageService.API/appsettings.Development.json +++ b/services/storage-service-net/src/StorageService.API/appsettings.Development.json @@ -31,18 +31,18 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "DefaultConnection": "Host=localhost;Database=storage_service;Username=goodgo;Password=goodgo-local-2024" + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=storage_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" }, "Storage": { "Provider": "minio", - "DefaultBucket": "goodgo", + "DefaultBucket": "goodgo-staging", "PreSignedUrlExpirationSeconds": 3600, "MaxFileSizeBytes": 104857600, "MinIO": { - "Endpoint": "localhost:9000", - "AccessKey": "minioadmin", - "SecretKey": "minioadmin", - "UseSSL": false, + "Endpoint": "minio.techbi.org", + "AccessKey": "admin", + "SecretKey": "Velik@2026", + "UseSSL": true, "Region": "us-east-1" }, "AliyunOSS": { @@ -61,8 +61,8 @@ }, "Redis": { "Host": "localhost", - "Port": 6379, - "Password": "", + "Port": 16379, + "Password": "goodgo-redis-dev", "Database": 0, "ConnectTimeout": 5000, "SyncTimeout": 5000 @@ -74,4 +74,4 @@ "AccessTokenExpiryMinutes": 15, "RefreshTokenExpiryDays": 7 } -} \ No newline at end of file +} diff --git a/services/wallet-service-net/src/WalletService.API/appsettings.Development.json b/services/wallet-service-net/src/WalletService.API/appsettings.Development.json index 18bfb9d2..ec3b4f7a 100644 --- a/services/wallet-service-net/src/WalletService.API/appsettings.Development.json +++ b/services/wallet-service-net/src/WalletService.API/appsettings.Development.json @@ -22,5 +22,11 @@ "PaymentUrl": "https://sandbox.vnpayment.vn/paymentv2/vpcpay.html", "ReturnUrl": "http://localhost:3001/payment/return", "ApiUrl": "https://sandbox.vnpayment.vn/merchant_webapi/api/transaction" + }, + "ConnectionStrings": { + "DefaultConnection": "Host=212.28.186.239;Port=30992;Database=wallet_service;Username=cloud_admin;Password=XbnKQ2ONe6pMxxCh;SSL Mode=Prefer;Timeout=60;Command Timeout=120" + }, + "Redis": { + "ConnectionString": "localhost:16379,password=goodgo-redis-dev" } -} \ No newline at end of file +}