server:
  port: 8080
  env: staging
  read_timeout: 15s
  write_timeout: 15s

database:
  host: ${DATABASE_HOST}
  port: ${DATABASE_PORT}
  name: ${DATABASE_NAME}
  user: ${DATABASE_USER}
  password: ${DATABASE_PASSWORD}
  ssl_mode: require
  max_connections: 50
  max_idle_connections: 10
  max_lifetime: 10m

redis:
  host: ${REDIS_HOST}
  port: ${REDIS_PORT}
  password: ${REDIS_PASSWORD}
  db: 0
  pool_size: 20
  min_idle_connections: 5
  max_retries: 3

zitadel:
  domain: ${ZITADEL_DOMAIN}
  project_id: ${ZITADEL_PROJECT_ID}
  client_id: ${ZITADEL_CLIENT_ID}
  client_secret: ${ZITADEL_CLIENT_SECRET}
  issuer: https://${ZITADEL_DOMAIN}

jwt:
  secret: ${JWT_SECRET}
  expiration: 24h

ovh_s3:
  endpoint: ${OVH_S3_ENDPOINT}
  region: ${OVH_S3_REGION}
  access_key: ${OVH_S3_ACCESS_KEY}
  secret_key: ${OVH_S3_SECRET_KEY}
  bucket: ${OVH_S3_BUCKET}

mangopay:
  client_id: ${MANGOPAY_CLIENT_ID}
  api_key: ${MANGOPAY_API_KEY}
  base_url: https://api.sandbox.mangopay.com

logging:
  level: info
  format: json

cors:
  allowed_origins:
    - https://staging.roadwave.com
  allowed_methods:
    - GET
    - POST
    - PUT
    - DELETE
    - OPTIONS
  allowed_headers:
    - Origin
    - Content-Type
    - Authorization
  max_age: 3600

rate_limit:
  requests_per_minute: 100
  burst: 20

geo:
  default_radius_km: 50
  max_radius_km: 500
  cache_ttl: 5m
