Deploying to Vercel
Redeploy the whole app on a new Vercel account at any time
Everything needed to run launch.rentals is in the repository, including database migrations, so a new Vercel account can host a fresh copy at any time.
Steps
- Import the Git repository into Vercel as a new project. The framework is detected as Next.js and
vercel.jsonsupplies the build command. - Add the Neon integration from the Vercel marketplace. It sets
DATABASE_URLfor you. - Set the other environment variables.
- Add your domain (for example
rentals.iairu.com) to the project. - Deploy. The build applies all migrations to the empty database first, then builds the app.
What the build does
| Step | Command |
|---|---|
| Install | npm ci (and the dependencies of this documentation site) |
| Migrate | npm run db:migrate |
| Build | This site, then next build |
If a migration fails, the build fails and the previous deployment keeps serving.
Updating
Push to main. Vercel builds, applies any new migrations and switches traffic once the build succeeds.