mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
8775346240
Enable preloading of interlinear data at application startup to eliminate first-request delays. Configurable via PRELOAD_INTERLINEAR environment variable. - Add preload_data() function to interlinear_loader.py with logging - Add startup event handler in server.py to trigger preload - Enable PRELOAD_INTERLINEAR=true in fly.toml and docker-compose.yml - Update FLY_DEPLOYMENT.md with cache warming documentation Performance impact: - Startup time: ~7-10 seconds (vs ~5 seconds without preload) - First request: <100ms (vs 2-3 seconds without preload) - Memory usage: ~400-500MB total (139MB for interlinear data) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
44 lines
837 B
TOML
44 lines
837 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'
|
|
|
|
[build]
|
|
|
|
[http_service]
|
|
internal_port = 8000
|
|
force_https = true
|
|
auto_stop_machines = 'stop'
|
|
auto_start_machines = true
|
|
min_machines_running = 0
|
|
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 = '2gb'
|
|
cpu_kind = 'shared'
|
|
cpus = 2
|
|
|
|
[env]
|
|
# Production optimizations
|
|
PYTHONUNBUFFERED = "1"
|
|
PYTHONDONTWRITEBYTECODE = "1"
|
|
|
|
# Preload interlinear data on startup for fast first requests
|
|
PRELOAD_INTERLINEAR = "true"
|