A simple starter template to deploy a Django project on Vercel as a serverless function.
This app is pre-configured to use PostgreSQL as the database. It also includes:
- ✅ Static file support for production
- ✅ Compatibility with PostgreSQL and MySQL
- Python 3.12 or above
- Git
- uv (optional, for fast dependency management)
mkdir -p ~/Dev/django-vercel
cd ~/Dev/django-vercel
git clone https://github.com/arvind-4/django-on-vercel.git .Option A: Using uv
uv venv
uv syncpython3.12 -m venv venv
source venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txtcp .env.sample .envMake sure to update
.envwith your actual credentials and settings.
python manage.py runserver- This setup is optimized for deployment on Vercel as a serverless backend.
- Ensure your database settings in
.envare correctly configured before deploying.