Backend Server Setup
The backend runs on an Ubuntu 24.04 VPS. Key configuration aspects include:
- Application Server: The Python FastAPI application is served using Gunicorn, configured with 4 Uvicorn workers to efficiently handle asynchronous requests.
- Service Management: A systemd unit file manages the FastAPI service, ensuring it runs reliably, restarts automatically on failure, and is easier to manage (start, stop, check status).
- Environment Variables: All necessary configurations, including credentials, database URLs, and API keys, are securely stored within an
.env
file located in a dedicatedconfig
subdirectory. The absolute path to this configuration file is defined via theENV_PATH
environment variable, which the application uses to locate its settings.