Deploying: Vercel (Serverless Python runtime)
Entry Point: app.py
This guide walks you through deploying your cloned instance of pkg.bio
to Vercel using the built-in Python support.
npm install -g vercel
)git clone https://github.com/your-org/pkg.bio.git
cd pkg.bio
Create a .env
file in the root directory and define the following:
SECRET_KEY=your-secret-key
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-supabase-service-role-key
Git should automatically ignore this file, but in case it doesn't, do not commit this file.
pkg.bio/
├── app.py # Main Flask application
├── vercel.json # Vercel deployment config
├── requirements.txt # Python dependencies
├── templates/ # HTML templates (Flask)
├── static/ # CSS, favicon, and assets
└── ...
Your vercel.json
should look like this:
{
"version": 2,
"builds": [
{ "src": "app.py", "use": "@vercel/python" }
],
"routes": [
{ "src": "/(.*)", "dest": "/app.py" }
]
}
This config tells Vercel to treat app.py
as the entry point and forward all requests to it.
Install the Python requirements locally to test:
pip install -r requirements.txt
Run the following to deploy:
vercel --prod
Follow the CLI prompts to link your project. Vercel will detect app.py
and deploy your Flask app serverlessly.
After the first deploy, go to your project dashboard on Vercel:
SECRET_KEY
SUPABASE_URL
SUPABASE_KEY
After deployment, Vercel will give you a public URL like:
https://pkg-bio.vercel.app
You can now visit the home page, log in, and create your public bio.
vercel --prod
again.flask run
before deploying.water.css
and other static assets load by checking your network tab or inspecting static/
routes.