Spaces:
Build error
Build error
Deploying to Vercel
This guide explains how to deploy this application to Vercel.
Prerequisites
- A Vercel account: Sign up here if you don't have one.
- A PostgreSQL database (you can use Vercel Postgres, Supabase, Neon, or any other Postgres provider).
- OpenAI API key for the resume parsing functionality.
Deployment Steps
1. Fork/Clone the Repository
Make sure you have the latest version of the code in your GitHub account.
2. Connect to Vercel
- Log in to your Vercel account
- Click "Add New..." → "Project"
- Import your GitHub repository
- Configure the project:
- Framework Preset: Next.js
- Build Command:
npm run build(default) - Output Directory:
.next(default) - Install Command:
npm install --no-frozen-lockfile
3. Environment Variables
Add the following environment variables in the Vercel dashboard:
DATABASE_URL=postgresql://username:password@host:port/database
OPENAI_API_KEY=your_openai_api_key
LLM_PROVIDER=openai
LLM_MODEL=gpt-4o
ENABLE_LLM=true
4. Deploy
Click "Deploy" and wait for the build process to complete.
5. Database Schema
After deployment, you need to apply the database schema:
- Go to the "Deployments" tab in your Vercel project
- Select the latest deployment
- Click "Redeploy" and choose "Redeploy with existing build cache"
This will run the Prisma migrations during the build process.
Troubleshooting
- Installation Errors: If you see "Error: Command 'pnpm install' exited with 1", make sure you've specified
npm install --no-frozen-lockfileas the install command in your Vercel project settings. - Database Connection Issues: Make sure your DATABASE_URL is correct and your database is accessible from Vercel's servers.
- Build Errors: Check the build logs for specific error messages.
- API Errors: Verify that all required environment variables are set correctly.
Updating Your Deployment
When you push changes to your GitHub repository, Vercel will automatically redeploy your application.