This guide covers deploying the Oxygen Cylinder Tracker to Render with PostgreSQL database.
- Render account (free tier available)
- GitHub repository with your code
- PostgreSQL database (Render provides this)
Create a PostgreSQL database on Render:
- Go to Render Dashboard → New → PostgreSQL
- Name:
oxygen-tracker-db - User:
oxygen_user - Database:
oxygen_tracker - Plan: Starter (free tier)
- Region: Choose closest to your users
Create a web service on Render:
- Go to Render Dashboard → New → Web Service
- Connect your GitHub repository
- Name:
oxygen-cylinder-tracker - Environment:
Python 3 - Build Command:
pip install -r requirements.txt - Start Command:
gunicorn --bind 0.0.0.0:$PORT --workers 2 --timeout 120 main:app
Add these environment variables in Render:
DATABASE_URL: Connection string from your PostgreSQL databaseSESSION_SECRET: Generate a secure random string (32+ characters)
SENDGRID_API_KEY: For email functionality (if using SendGrid)
The DATABASE_URL format for Render PostgreSQL:
postgresql://username:password@host:port/database
The application is configured for PostgreSQL and will:
- Automatically create database tables on first run
- Handle database migrations
- Support user authentication and role-based access
After successful deployment:
- Create Admin User: Visit
/loginand create your first admin user - Import Data: Use the import functionality to migrate existing data
- Configure Users: Set up additional users and roles as needed
- Customer management with full CRUD operations
- Cylinder inventory tracking and rental management
- Bulk operations for cylinder dispatch/return
- Search and filtering across customers and cylinders
- CSV and PDF export capabilities
- Role-based access control (Admin, User, Viewer)
- PostgreSQL database with robust data integrity
- Automatic backups and data archiving
- Import functionality for existing data migration
- Comprehensive audit trails and rental history
- Responsive Bootstrap 5 design
- Mobile-optimized touch interface
- Dark theme with professional styling
- Real-time feedback and validation
- Gunicorn with 2 workers for optimal performance
- Database connection pooling and optimization
- Automatic session management
- Secure password hashing with Werkzeug
- Session-based authentication
- Environment variable protection for secrets
- SQL injection protection via SQLAlchemy ORM
- Database Connection: Verify
DATABASE_URLis correctly set - Missing Tables: Application creates tables automatically on startup
- Import Errors: MS Access import requires additional setup (optional)
- Performance: Monitor worker count and database connections
- Check Render logs for detailed error messages
- Database logs available in Render PostgreSQL dashboard
- Application logs show detailed debugging information
- Increase worker count in start command
- Consider upgrading to higher Render plans
- Database read replicas for heavy read workloads
- Render PostgreSQL offers automatic scaling options
- Connection pooling handles concurrent users
- Archiving system manages data growth
- Environment Variables: Never commit secrets to code
- Database Access: Use connection pooling and prepared statements
- User Authentication: Implement strong password policies
- Session Management: Secure session configuration
- HTTPS: Render provides automatic SSL certificates
- Use Render's free tier for development/testing
- PostgreSQL starter plan supports moderate usage
- Monitor usage and scale based on actual needs
- Consider data archiving for long-term storage optimization