← Back to docs

Getting Started

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.

1. Prerequisites

2. Clone the Repository

git clone https://github.com/your-org/pkg.bio.git
cd pkg.bio

3. Define Your Environment

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.

4. Review Project Structure

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
└── ...

5. Vercel Configuration

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.

6. Install Dependencies

Install the Python requirements locally to test:

pip install -r requirements.txt

7. Deploy to Vercel

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.

8. Set Environment Variables in Vercel

After the first deploy, go to your project dashboard on Vercel:

9. Visit Your App

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.

10. Tips