Skip to content

Deploy

This guide will show you how to deploy your Turbo app to Vercel. Vercel is a cloud platform for static sites and Serverless Functions that fits perfectly with Turbo's architecture. It's easy to use and has a free tier that is perfect for small projects. However, you can also host your app on other platforms like AWS, Cloudflare, or Netlify. The process is similar, but you may need to adjust some settings.

Creating a production database

Before deploying your app, you need to create a production database on. The place you are going to host your database is up to you. You can use a managed service like Heroku or DigitalOcean. If you don't want to go through the hassle of setting up a database, you can use Supabase or Vercel's own database service.

If you decide to use Supabase, you basically need to set DATABASE_URL and DIRECT_URL environment variables in your hosting service to the values provided by Supabase (see more).

Deploying to Vercel

To deploy your app to Vercel, you need to create an account on Vercel and add a new project. Select the GitHub repository where your app is being committed to. After that, you are going to be asked to configure the project. You can use the following settings:

SettingValue
Framework PresetNext.js
Root Directoryapps/@www
Build Commandturbo run build --filter=www && cd ../.. && bun prisma migrate deploy
Install Commandbun install

On the Environment Variables section, you need to add the corresponding values for the Database and other features that you are using on your app.

Configuring Sentry.io

https://docs.sentry.io/product/integrations/deployment/vercel/#install

Go to your sentry.io account and navigate to Settings > [MY ORG] > Integrations > Configure Vercel

If you have already added the Vercel integration, you’ll need to go to the configuration tab from the Vercel integration to be able to add the new project.