# Fly.io config — dd0c/route Dashboard API
app = "dd0c-route-api"
primary_region = "iad"

[build]
  dockerfile = "Dockerfile.api"

[env]
  RUST_LOG = "dd0c_route=info,tower_http=info"
  API_PORT = "3000"
  AUTH_MODE = "local"

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0  # Scale to zero when idle

  [http_service.concurrency]
    type = "requests"
    hard_limit = 100
    soft_limit = 80

[[vm]]
  cpu_kind = "shared"
  cpus = 1
  memory_mb = 256
