Skip to content

Deploy Lynch-S Application - #2

Open
mikeymc wants to merge 1 commit into
mainfrom
claude/deploy-lynch-s-01Gm6Ye5gBRNeGatDKDsMP3N
Open

mikeymc wants to merge 1 commit into
mainfrom
claude/deploy-lynch-s-01Gm6Ye5gBRNeGatDKDsMP3N

Conversation

@mikeymc

@mikeymc mikeymc commented Nov 15, 2025

Copy link
Copy Markdown
Owner

Configure the application for cloud deployment on Fly.io:

Backend changes:

  • Update Flask app to serve built React frontend as static files
  • Add environment variable support for DATABASE_PATH
  • Add SPA routing support (catch-all route for React Router)
  • Add gunicorn to requirements.txt for production WSGI server

Frontend changes:

  • Create config.js for environment-aware API base URL
  • Update all components to use dynamic API_BASE (dev: localhost:5001, prod: relative URLs)
  • Ensures frontend works in both development and production

Deployment files:

  • Dockerfile: Multi-stage build (Node.js for frontend, Python for backend)
  • fly.toml: Fly.io configuration with persistent volume for SQLite
  • .dockerignore: Optimize Docker build by excluding unnecessary files
  • DEPLOYMENT.md: Comprehensive deployment guide with step-by-step instructions

Architecture:

  • Single-container deployment (Flask serves both API and frontend)
  • Persistent volume at /data for SQLite database
  • Health checks at /api/health
  • Auto-scaling support with configurable memory
  • Estimated cost: Free tier (256MB RAM, 1GB volume)

Configure the application for cloud deployment on Fly.io:

Backend changes:
- Update Flask app to serve built React frontend as static files
- Add environment variable support for DATABASE_PATH
- Add SPA routing support (catch-all route for React Router)
- Add gunicorn to requirements.txt for production WSGI server

Frontend changes:
- Create config.js for environment-aware API base URL
- Update all components to use dynamic API_BASE (dev: localhost:5001, prod: relative URLs)
- Ensures frontend works in both development and production

Deployment files:
- Dockerfile: Multi-stage build (Node.js for frontend, Python for backend)
- fly.toml: Fly.io configuration with persistent volume for SQLite
- .dockerignore: Optimize Docker build by excluding unnecessary files
- DEPLOYMENT.md: Comprehensive deployment guide with step-by-step instructions

Architecture:
- Single-container deployment (Flask serves both API and frontend)
- Persistent volume at /data for SQLite database
- Health checks at /api/health
- Auto-scaling support with configurable memory
- Estimated cost: Free tier (256MB RAM, 1GB volume)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants