Files
kjvstudy.org/fly.toml
T
kennethreitz 32bced2927 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>
2025-11-29 13:52:19 -05:00

50 lines
945 B
TOML

# fly.toml app configuration file generated for kjvstudy on 2025-05-26T12:55:54-04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = 'kjvstudy'
primary_region = 'iad'
[deploy]
strategy = "bluegreen"
[build]
[http_service]
internal_port = 8000
force_https = true
auto_stop_machines = 'off'
auto_start_machines = true
min_machines_running = 2
processes = ['app']
[http_service.concurrency]
type = "requests"
hard_limit = 250
soft_limit = 200
# Health check endpoint
[[http_service.checks]]
interval = "15s"
timeout = "10s"
grace_period = "30s"
method = "GET"
path = "/health"
[[vm]]
memory = '4gb'
cpu_kind = 'performance'
cpus = 2
[env]
# Production optimizations
PYTHONUNBUFFERED = "1"
PYTHONDONTWRITEBYTECODE = "1"
# Preload interlinear data on startup for fast first requests
PRELOAD_INTERLINEAR = "true"
# Number of Uvicorn workers (recommended: 2x CPU cores)
WORKERS = "4"