Deploy

🐳 Docker

We use our underlying docker-node (opens in a new tab) image as a base for our Dockerfile. This image is based on the official node (opens in a new tab) image and adds some extra tools, like turbo and pnpm, to make it easier to work with our Docker images.

Commands, that are executed through Makefile (opens in a new tab) use the docker-compose.yaml (opens in a new tab) to run the commands inside the container. This way we can make sure that the commands are executed in the same environment, no matter if you are on Windows, Mac or Linux.

Check out help command for more information:

$ make help

🤖 Vercel, as hosting provider

Vercel supports it natively, so there's nothing to do. Just add your project to Vercel, and it will automatically detect the monorepo structure and deploy all the projects.

⚠️

Github repository should be already generated from our next-starter-tpl (opens in a new tab) template, before proceeding. Follow getting-started (opens in a new tab) guide to create a new project from the template.

→ Add New Project

From your vercel dashboard, click on "Add New..." and select the type — Project

→ Import Git Repository

Select your organization, or username, and then select the repository you want to deploy. If you selected to create your project from github template:

→ Add web and docs applications separately:

Docs App:

  • Project Name: next-starter-tpl-docs
  • Framework Preset: Next.js
  • Root Directory: apps/docs
  • Include source files outside of the Root Directory in the Build Step: true

Web App:

  • Project Name: next-starter-tpl-web
  • Framework Preset: Next.js
  • Root Directory: apps/web
  • Include source files outside of the Root Directory in the Build Step: true