
- Add startup script for production deployment - Create Supervisor configuration file - Update main.py to ensure database initialization at startup - Add configurable port via environment variable - Add Supervisor setup instructions to README - Initialize database at application startup
11 lines
280 B
Bash
Executable File
11 lines
280 B
Bash
Executable File
#!/bin/bash
|
|
# Start script for the FastAPI application
|
|
|
|
# Set environment variables if needed
|
|
export PYTHONPATH=/app
|
|
|
|
# Navigate to the application directory
|
|
cd /app
|
|
|
|
# Start the application with uvicorn
|
|
exec uvicorn main:app --host 0.0.0.0 --port 8001 --workers 4 --no-access-log |