# Infrastructure configuration for production environment
# Auto-generated by `mecha10 init`
#
# This config uses environment variables for sensitive data
# Override values via MECHA10_* environment variables

# Local Redis (on-robot message bus)
# In production, this runs on the robot itself for low-latency local communication
redis:
  url: redis://localhost:6379
  max_connections: 20
  connection_timeout_ms: 5000

# Control plane Redis (robot-to-cloud communication)
# This connects to Mecha10 SaaS control plane for fleet management
control_plane_redis:
  url: ${MECHA10_CONTROL_PLANE_REDIS_URL}
  max_connections: 10
  connection_timeout_ms: 10000

# Redis bridge (message forwarding between local and control plane)
# Automatically forwards messages to control plane for K8s-like architecture
bridge:
  enabled: true
  robot_id: ${MECHA10_ROBOT_ID} # Injected by platform
  local_topics:
    - '/sensor/camera/*' # Keep high-frequency sensor data local
    - '/sensor/lidar/*'
    - '/sensor/imu/*'
  bridged_topics:
    - '/system/*' # Forward system topics to control plane
    - '/telemetry/*' # Forward telemetry
    - '/logs/*' # Forward logs
    - '/fleet/*' # Forward fleet management

# PostgreSQL (API/platform database)
postgres:
  host: ${MECHA10_POSTGRES_HOST}
  port: ${MECHA10_POSTGRES_PORT:-5432}
  database: ${MECHA10_POSTGRES_DB:-mecha10}
  username: ${MECHA10_POSTGRES_USER}
  password: ${MECHA10_POSTGRES_PASSWORD}
  max_connections: 10
  # Enable SSL in production
  ssl_mode: require

# MLflow (experiment tracking)
mlflow:
  tracking_uri: ${MECHA10_MLFLOW_URI}
  artifact_location: ${MECHA10_MLFLOW_ARTIFACTS}

# MinIO/S3 (object storage)
minio:
  endpoint: ${MECHA10_S3_ENDPOINT}
  access_key: ${MECHA10_S3_ACCESS_KEY}
  secret_key: ${MECHA10_S3_SECRET_KEY}
  secure: true

# Logging
logging:
  level: ${LOG_LEVEL:-info}
  format: json

# Telemetry
telemetry:
  enabled: true
  endpoint: ${MECHA10_TELEMETRY_ENDPOINT}
