Commit Graph

9 Commits

Author SHA1 Message Date
kennethreitz a66f457747 Revert docker-compose to direct uvicorn (no nginx)
Keep nginx only for production (Fly.io). Local dev uses uvicorn
directly for simpler hot-reloading.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 02:08:14 -05:00
kennethreitz 0505a9e196 Add healthcheck to ensure nginx waits for uvicorn
- Web service has healthcheck on /api/health
- nginx depends on web being healthy before starting
- Added curl to Dockerfile for healthcheck

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 02:02:59 -05:00
kennethreitz d630e629bd Add nginx to docker-compose setup
- nginx.conf: docker-compose version (uses 'web:8001')
- nginx-prod.conf: production version (uses '127.0.0.1:8001')
- Separate nginx service in docker-compose
- uvicorn runs on port 8001, nginx exposes 8000

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 02:01:00 -05:00
kennethreitz a3e7d5c346 Add analytics disable via DISABLE_ANALYTICS env var
- Add DISABLE_ANALYTICS=true to docker-compose.yml for local dev
- Pass disable_analytics to Jinja2 templates as global
- Wrap Gauges analytics in conditional block
- Add blue/pink gender-based coloring to generation cards

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:03:41 -05:00
kennethreitz 94a8801251 Add Swagger UI defaults and enable JSON file watching in Docker
- Updated all API endpoint parameters to use `example` instead of `examples` for better Swagger UI experience
- Parameters now pre-fill with reasonable defaults when testing endpoints in /api/docs
- Added --reload and --reload-include '*.json' flags to docker-compose for auto-reload on JSON changes
- Included commentary-generator agent configuration for AI-powered verse commentary

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:37:04 -05:00
kennethreitz 3362985c1d Optimize performance: upgrade to dedicated CPUs, disable reload in docker-compose
- Upgrade Fly.io VMs from shared to performance CPUs for dedicated compute
- Remove --reload flag from docker-compose for better local performance
- Improves response times and consistency under load
- Cost increase: ~$10-15/month for dedicated CPU performance
2025-11-28 00:37:44 -05:00
kennethreitz 9aab232937 Fix missing bible import in study guides routes
The bible module was only imported inside get_books() but was
referenced in study_guide_detail() for verse lookups, causing
all verse texts to fail silently.

Also excludes .venv from Docker volume mount to prevent
local/container environment conflicts.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 20:45:55 -05:00
kennethreitz 8775346240 Add cache warming on startup for interlinear data
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>
2025-11-22 13:04:44 -05:00
kennethreitz 9fe291f7af updates 2025-11-11 12:24:34 -05:00