Run staging on a single Fly machine

Staging stores sessions in machine-local SQLite with no shared volume.
Fly's default deploy provisions two machines (HA), so requests after
login could land on the machine that never wrote the session row,
bouncing logged-in users straight back to the login page.

Deploy with --ha=false and scale count 1 so each per-branch staging app
runs on exactly one machine.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YWAvjVEAibhwbeVgbYmg94
This commit is contained in:
Claude
2026-06-20 12:54:12 +00:00
parent 82416e149d
commit 5259b1e553
+7 -1
View File
@@ -49,7 +49,13 @@ jobs:
"APP_URL=https://${HOST}" "APP_URL=https://${HOST}"
- name: Deploy - name: Deploy
run: flyctl deploy --app "$APP" --config fly.staging.toml --remote-only --yes # --ha=false so Fly provisions a single machine. Staging stores sessions
# in machine-local SQLite (no shared volume), so a second machine would
# serve requests it has no session for, bouncing logged-in users back to
# the login page. scale count 1 fixes apps already created with two.
run: |
flyctl deploy --app "$APP" --config fly.staging.toml --remote-only --yes --ha=false
flyctl scale count 1 --app "$APP" --yes
- name: Summary - name: Summary
run: echo "Deployed to https://${HOST}" >> "$GITHUB_STEP_SUMMARY" run: echo "Deployed to https://${HOST}" >> "$GITHUB_STEP_SUMMARY"