Enable blue-green deployment strategy

Changes:
- Added [deploy] strategy = "bluegreen" to fly.toml
- Increased min_machines_running from 1 to 2
- Disabled auto_stop_machines to keep both environments ready
- Updated GitHub Actions workflow with --strategy bluegreen flag

How Blue-Green Works:
1. Deploy creates new "green" environment alongside current "blue"
2. Health checks verify green environment is healthy
3. Traffic switches instantly from blue to green
4. Old blue environment kept briefly for instant rollback
5. Zero downtime during deployments

Cost Impact:
- Runs minimum 2 machines instead of 1
- Ensures true zero-downtime deployments
- Instant rollback capability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-29 13:52:19 -05:00
parent 8ea1b53031
commit 32bced2927
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -26,6 +26,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
- run: flyctl deploy --remote-only --strategy bluegreen
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
+5 -2
View File
@@ -6,14 +6,17 @@
app = 'kjvstudy'
primary_region = 'iad'
[deploy]
strategy = "bluegreen"
[build]
[http_service]
internal_port = 8000
force_https = true
auto_stop_machines = 'suspend'
auto_stop_machines = 'off'
auto_start_machines = true
min_machines_running = 1
min_machines_running = 2
processes = ['app']
[http_service.concurrency]