# cPanel deployment

## Django API

Upload the contents of `django_api` outside `public_html` when possible. Create a Python application in cPanel with:

- Application root: `server/django_api`
- Startup file: `passenger_wsgi.py`
- Entry point: `application`
- Python version: 3.11 or newer

Install dependencies from `requirements-django.txt`, then run:

```bash
python manage.py migrate --noinput
python manage.py collectstatic --noinput
```

Set the environment variables from `.env.example` in cPanel. Set `DJANGO_ALLOWED_HOSTS` to the API hostname and `CORS_ALLOWED_ORIGIN` to the frontend origin.

The included `db.sqlite3` contains the current Django data. SQLite is suitable for a small deployment; use MySQL/PostgreSQL for production scale.

## Frontend

Upload the contents of `client/dist` to `public_html`. The production build uses `VITE_API_BASE_URL` from `.env.production`.