Skip to main content
Deploy Pongo to Vercel for serverless hosting with automatic scaling and global CDN delivery.

Quick Deploy

Deploy with Vercel Click the button above to deploy Pongo to Vercel in one click.

Manual Deployment

1

Clone the repository

git clone https://github.com/TimMikeladze/pongo.git
cd pongo
2

Install Vercel CLI

npm i -g vercel
3

Deploy to Vercel

vercel
Follow the prompts to link your project.
4

Configure environment variables

Set the required environment variables in your Vercel project settings:
vercel env add DATABASE_URL
vercel env add CRON_SECRET
vercel env add ACCESS_CODE  # Optional: password-protect dashboard
Or use the Vercel dashboard: Settings → Environment Variables
5

Deploy to production

vercel --prod

Environment Variables

Required

VariableDescriptionExample
DATABASE_URLPostgreSQL connection stringpostgres://user:pass@host:5432/pongo
CRON_SECRETSecret token for authenticating cron requestsGenerate with openssl rand -base64 32

Optional

VariableDescriptionDefault
ACCESS_CODEPassword to protect dashboard- (no auth)
EXPIRY_DAYSSession TTL in days7
NEXT_PUBLIC_URLPublic URL for SEO/metadataAuto-detected
Important: Vercel requires PostgreSQL. SQLite is not supported in serverless environments.

Vercel Cron Setup

Pongo includes a vercel.json configuration that automatically sets up Vercel Cron:
vercel.json
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "crons": [
    {
      "path": "/api/cron",
      "schedule": "*/30 * * * *"
    }
  ]
}
This configuration:
  • Triggers the /api/cron endpoint every 30 seconds
  • Executes all monitors on their configured schedules
  • Requires the CRON_SECRET environment variable for authentication

Adjusting Cron Schedule

Modify the schedule field in vercel.json to change the execution frequency:
"schedule": "*/1 * * * *"  // Every 1 minute
"schedule": "*/5 * * * *"  // Every 5 minutes
Vercel Cron has a minimum interval of 1 minute on Hobby plans and 10 seconds on Pro plans.

Cron Endpoint

The /api/cron endpoint is protected by the CRON_SECRET environment variable:
// Endpoint: /api/cron
// Method: GET or POST
// Headers: Authorization: Bearer <CRON_SECRET>
Vercel Cron automatically includes the correct authorization header when triggering the endpoint.

Manual Trigger

You can manually trigger a check run:
curl -X POST https://your-app.vercel.app/api/cron \
  -H "Authorization: Bearer $CRON_SECRET"

Database Setup

PostgreSQL Options

Vercel Postgres:
vercel postgres create
External Providers: Once created, add the connection string to your Vercel project:
vercel env add DATABASE_URL
# Paste: postgres://user:pass@host:5432/pongo

Troubleshooting

Monitors not running

  1. Verify CRON_SECRET is set correctly in environment variables
  2. Check Vercel Cron logs: Deployments → Logs → Cron
  3. Test the endpoint manually with curl

Database connection errors

  1. Verify DATABASE_URL format: postgres://user:pass@host:5432/dbname
  2. Ensure database allows connections from Vercel IPs
  3. Check database is accessible and credentials are correct

Cold starts affecting monitors

Serverless functions may experience cold starts. Consider:
  • Using a hybrid deployment (Vercel for dashboard, VPS for scheduler)
  • Upgrading to Vercel Pro for improved cold start times
  • Adjusting alert conditions to account for occasional delays

Hybrid Deployment

For more reliable scheduling, deploy the dashboard to Vercel but run the scheduler on a VPS:
  1. Deploy to Vercel as described above
  2. On your VPS, run:
    DATABASE_URL="postgres://..." bun scheduler
    
  3. Remove the crons section from vercel.json
This gives you Vercel’s global CDN for the dashboard with fine-grained control over monitor execution.

Build docs developers (and LLMs) love