# ============================================================================= # RWA Infrastructure - Production Environment Configuration # ============================================================================= # # Deployment: Server B (192.168.1.111) or separate monitoring server # Role: Observability stack - metrics, logs, tracing, service discovery # # Components: # ┌─────────────────────────────────────────────────────────────────────────┐ # │ Observability Stack │ # ├─────────────────────────────────────────────────────────────────────────┤ # │ Grafana :3030 - Dashboards and visualization │ # │ Prometheus :9090 - Metrics collection and alerting │ # │ Loki :3100 - Log aggregation │ # │ Jaeger :16686 - Distributed tracing │ # │ Consul :8500 - Service discovery (optional) │ # └─────────────────────────────────────────────────────────────────────────┘ # # Network Topology: # Server A (192.168.1.100): Kong API Gateway # Server B (192.168.1.111): Microservices + MPC System # Prometheus scrapes metrics from both servers # # Setup: # 1. Copy to .env: cp .env.example .env # 2. Update passwords and URLs # 3. Start: docker-compose up -d # ============================================================================= # ============================================================================= # Network Configuration # ============================================================================= # Server A: Gateway (Kong) KONG_SERVER_IP=192.168.1.100 # Server B: Backend services BACKEND_SERVER_IP=192.168.1.111 # Public domain PUBLIC_DOMAIN=rwaapi.szaiai.com # ============================================================================= # Consul Configuration (Service Discovery) # ============================================================================= CONSUL_HTTP_PORT=8500 CONSUL_DNS_PORT=8600 # ============================================================================= # Jaeger Configuration (Distributed Tracing) # ============================================================================= JAEGER_UI_PORT=16686 # ============================================================================= # Loki Configuration (Log Aggregation) # ============================================================================= LOKI_PORT=3100 # ============================================================================= # Grafana Configuration (Dashboards) # ============================================================================= GRAFANA_PORT=3030 GRAFANA_ADMIN_USER=admin # SECURITY: Change this in production! # Example command to generate: openssl rand -base64 24 GRAFANA_ADMIN_PASSWORD=admin123 # Grafana Root URL - MUST match actual access URL for CORS/auth # For internal access: http://192.168.1.111:3030 # For external access with nginx: https://monitor.szaiai.com GRAFANA_ROOT_URL=https://monitor.szaiai.com GRAFANA_LOG_LEVEL=info # ============================================================================= # Prometheus Configuration (Metrics) # ============================================================================= PROMETHEUS_PORT=9090 # Scrape targets (configured in prometheus.yml): # - Kong: 192.168.1.100:8001/metrics # - identity-service: 192.168.1.111:3000/metrics # - wallet-service: 192.168.1.111:3001/metrics # - mpc-service: 192.168.1.111:3006/metrics # - blockchain-service: 192.168.1.111:3012/metrics # - mpc-system services: 192.168.1.111:4000/metrics, etc. # ============================================================================= # PostgreSQL Configuration (for Grafana data source) # ============================================================================= # Connect to main RWA database for dashboards POSTGRES_HOST=192.168.1.111 POSTGRES_PORT=5432 POSTGRES_USER=rwa_user # SECURITY: Use the same password as backend/services/.env POSTGRES_PASSWORD=your_password_here