environment: development

server:
  port: 8080
  host: "0.0.0.0"
  read_timeout: 30s
  write_timeout: 30s

database:
  driver: "postgres"
  dsn: "postgres://goplt:goplt_password@localhost:5432/goplt?sslmode=disable"
  max_connections: 25
  max_idle_connections: 5
  conn_max_lifetime: 5m
  conn_max_idle_time: 10m

logging:
  level: "info"
  format: "json"
  output: "stdout"

tracing:
  enabled: true
  service_name: "platform"
  service_version: "1.0.0"
  otlp_endpoint: ""

registry:
  type: consul
  consul:
    address: "localhost:8500"
    datacenter: "dc1"
    scheme: "http"
    health_check:
      interval: "10s"
      timeout: "3s"
      deregister_after: "30s"
      http: "/healthz"

gateway:
  port: 8080
  host: "0.0.0.0"
  routes:
    - path: "/api/v1/auth/**"
      service: "auth-service"
      auth_required: false
    - path: "/api/v1/users/**"
      service: "identity-service"
      auth_required: true
  cors:
    allowed_origins: ["*"]
    allowed_methods: ["GET", "POST", "PUT", "DELETE", "PATCH"]
    allowed_headers: ["Authorization", "Content-Type"]
