Prototypr / nextjs-deploy-script

Script to deploy NextJS with NGINX and PM2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NextJS deploy script

This script is for self-hosting a NextJS app with NGINX using PM2 with a 'blue green workflow' that gives:

  • Zero downtime – no downtime between deployments
  • If the build fails, use the working version
  • Auto Deploy - 'git push' to main
  • Logs – See the View all the build logs and see build progress in GitHub actions

Here's the script - ideally triggered from a GitHub action.

Here's a guide that shows you how to use it and set up blue green deployment on your server.

About

Script to deploy NextJS with NGINX and PM2

License:MIT License


Languages

Language:Shell 100.0%