# fly.toml — Farient Review API (Fly.io) # # HOW TO DEPLOY (one-time) # ───────────────────────── # cd apps/api # flyctl launch --no-deploy --copy-config # registers app, reuses this file # flyctl secrets set \ # OPENAI_API_KEY=sk-... \ # OPENAI_MODEL=gpt-4o-mini \ # WEB_ORIGINS=https://.vercel.app \ # WEB_ORIGIN_REGEX='^https://farient-review.*\.vercel\.app$' \ # MAX_UPLOAD_MB=60 # flyctl deploy # # SUBSEQUENT DEPLOYS # ────────────────── # flyctl deploy # from apps/api/ # # SMOKE CHECK # ─────────── # curl https://farient-review-api.fly.dev/health # expect {"ok": true} # # ROLLBACK # ──────── # flyctl releases # list releases # flyctl releases rollback # roll back to a specific version app = "farient-review-api" primary_region = "iad" [build] dockerfile = "Dockerfile" [http_service] internal_port = 8000 force_https = true auto_stop_machines = "stop" auto_start_machines = true min_machines_running = 0 [http_service.concurrency] type = "requests" soft_limit = 10 hard_limit = 25 [[vm]] memory = "1gb" cpus = 1 cpu_kind = "shared" [[services]] protocol = "tcp" internal_port = 8000 [[services.tcp_checks]] interval = "15s" timeout = "10s" grace_period = "30s" restart_limit = 0 [[services.http_checks]] interval = "15s" timeout = "10s" grace_period = "30s" method = "GET" path = "/health" protocol = "http" restart_limit = 0 tls_skip_verify = false