Development and Test Pipeline
Environments
1. Dev (Local Development)
- Run the app on your local machine for active development.
- Default port: 5000
- Use SQLite for local DB.
- Start with:
python run_dev.pyorpython server.py - Environment variables: copy
env.exampleto.envand fill in values. - Initialize DB:
python init_db.py
2. Test (Render)
- Deploy to Render for cloud-based testing.
- Set Render root directory to
.(not a subfolder). - Use the
Procfileor Render's web service settings to start the app (e.g.,gunicorn server:app --bind 0.0.0.0:$PORT). - Set environment variables in Render dashboard.
- Initialize DB on first deploy: open Render shell and run
python init_db.py.
Workflow
- Develop and test locally (Dev).
- Commit and push changes to GitHub.
- Deploy to Render (Test) for cloud testing.
- Once stable, promote to Production (future step).
What else to document?
- Production deployment steps (when ready).
- How to roll back a deployment.
- How to update environment variables and secrets.
- Database migration process.
- Backup and restore procedures.
- User management and permissions.
- API endpoints and usage.
- Troubleshooting common errors.
Update this document as your workflow evolves!