# ============================================================================= # API Gateway (Kong) - Environment Configuration # ============================================================================= # This file contains all environment variables needed for Kong API Gateway. # # Setup Instructions: # 1. Copy this file: cp .env.example .env # 2. Update values according to your deployment environment # 3. Start services: ./deploy.sh up # # IMPORTANT: In production, change all default passwords and secrets! # ============================================================================= # ============================================================================= # Kong Database Configuration # ============================================================================= # PostgreSQL password for Kong database # NOTE: Kong uses hardcoded database username 'kong' and database name 'kong' # Only the password is configurable via this variable # SECURITY: Change this in production! # Example command to generate: openssl rand -base64 32 KONG_PG_PASSWORD=kong_password # ============================================================================= # Kong Admin GUI Configuration # ============================================================================= # Admin GUI URL - Update to match your deployment domain # Examples: # Development: http://localhost:8002 # Production: https://admin.yourdomain.com KONG_ADMIN_GUI_URL=http://localhost:8002 # ============================================================================= # Monitoring Stack Configuration (Optional) # ============================================================================= # Grafana Admin Password # SECURITY: Change this in production! # Example command to generate: openssl rand -base64 24 GRAFANA_ADMIN_PASSWORD=admin123 # Grafana Root URL - CRITICAL: Must match the actual URL users access Grafana from # IMPORTANT: This affects CORS, redirects, and authentication! # Examples: # Local development: http://localhost:3030 # Production with Nginx+SSL: https://monitor.szaiai.com # Production without SSL: http://monitor.szaiai.com # # If you use install-monitor.sh with domain "monitor.szaiai.com", set: # GRAFANA_ROOT_URL=https://monitor.szaiai.com # # Common mistake: Setting localhost when accessing via domain causes "origin not allowed" error! # After changing this value, you MUST restart monitoring services: # ./deploy.sh monitoring down && ./deploy.sh monitoring up GRAFANA_ROOT_URL=http://localhost:3030 # Docker network name for monitoring services # Note: This should match the network created by docker-compose.yml NETWORK_NAME=api-gateway_rwa-network # ============================================================================= # Backend Services Configuration # ============================================================================= # Backend server IP address for connectivity checks # IMPORTANT: Update this to the actual IP where your microservices are deployed! # You MUST also update service URLs in kong.yml to match this IP # Examples: # Local development: 127.0.0.1 # Remote server: 192.168.1.111 # Same server: 127.0.0.1 # # Default is example IP - CHANGE THIS to your actual backend server IP! # If backend is on same server as Kong, use 127.0.0.1 BACKEND_SERVER_IP=192.168.1.111