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 sync
python3.12 -m venv venv
source venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txt
cp .env.sample .env
Make sure to update
.env
with 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
.env
are correctly configured before deploying.