All Projects → steveholgado → Nextjs Docker Pm2 Nginx

steveholgado / Nextjs Docker Pm2 Nginx

Next.js with Docker, PM2 and NGINX

Projects that are alternatives of or similar to Nextjs Docker Pm2 Nginx

Nuxt Ssr Demo
✨ 高仿掘金,整合 vue + nuxt + axios + vuex + vue-router (nuxt 自带 vuex 和 vue-router),一个基于 Nuxt 的服务器端渲染 Demo
Stars: ✭ 856 (+515.83%)
Mutual labels:  pm2, nginx
React Cnodejs.org
Material UI version of cnodejs.org, the biggest Node.js Chinese community.
Stars: ✭ 242 (+74.1%)
Mutual labels:  pm2, nginx
Light Push
轻量级推送服务和实时在线监控平台,同时用于开发即时通信系统,基于node的socket.io,支持web、android、ios客户端,支持移动端离线推送,可进行分布式部署
Stars: ✭ 128 (-7.91%)
Mutual labels:  pm2, nginx
Vue2 blog
使用vue2.x + vue-cli +vue-router+ vuex + axios + mysql + express + pm2 + webpack+nginx构建的具有登录,注册,留言,用户发帖,用户评论等功能的SPA Blog。注意,注意,注意,后端API全部自己手写,很适合刚学习vue以及express的小伙伴学习,喜欢请Star鼓励一下我,谢谢!项目预览:
Stars: ✭ 417 (+200%)
Mutual labels:  pm2, nginx
Node Production
Take Your Node.js Project to The Production Environment (VPS/Dedicated Server).
Stars: ✭ 35 (-74.82%)
Mutual labels:  pm2, nginx
One Sys
聚合koa2+pm2+vue-cli+element+axios的前后端一体开发脚手架
Stars: ✭ 102 (-26.62%)
Mutual labels:  pm2, nginx
Next Advanced Apollo Starter
Advanced, but minimalistic Next.js pre-configured starter with focus on DX
Stars: ✭ 131 (-5.76%)
Mutual labels:  nextjs, nginx
Wxapp
🙋travelib-node 流动图书Node.js后端
Stars: ✭ 132 (-5.04%)
Mutual labels:  pm2
Monitaure
🔔 A server uptime monitoring progressive web application - NO LONGER MAINTAINED
Stars: ✭ 135 (-2.88%)
Mutual labels:  nginx
Nitro
An Example of a PWA using Nextjs, Material-UI, Typescript and Auth0 💗
Stars: ✭ 130 (-6.47%)
Mutual labels:  nextjs
Vagrant Elastic Stack
Giving the Elastic Stack a try in Vagrant
Stars: ✭ 131 (-5.76%)
Mutual labels:  nginx
Api Umbrella
Open source API management platform
Stars: ✭ 1,735 (+1148.2%)
Mutual labels:  nginx
Nextjs Express
A simple app using Next.js
Stars: ✭ 136 (-2.16%)
Mutual labels:  nextjs
Nextjs Pwa
Build a PWA with Next.JS
Stars: ✭ 132 (-5.04%)
Mutual labels:  nextjs
Airframe Next
Free Open Source High Quality Dashboard based on Bootstrap 4 & React 16 + Next.js: http://airframe.nextjs.webkom.co
Stars: ✭ 138 (-0.72%)
Mutual labels:  nextjs
Mern Authentication
MERN stack authentication boilerplate: password reset, email verification, server sessions, redux, hooks and docker for dev and prod.
Stars: ✭ 129 (-7.19%)
Mutual labels:  nginx
Docker Flask Gunicorn Nginx
Bootstrap example of a Flask app served via Gunicorn and Nginx using Docker conteiners
Stars: ✭ 138 (-0.72%)
Mutual labels:  nginx
Next Dark Mode
🌑 Enable dark mode for Next.js apps
Stars: ✭ 133 (-4.32%)
Mutual labels:  nextjs
Egg React Ssr
最小而美的Egg + React + SSR 服务端渲染应用骨架,同时支持JS和TS
Stars: ✭ 1,837 (+1221.58%)
Mutual labels:  nextjs
Nextjs Ts
Opinionated Next JS project boilerplate with TypeScript and Redux
Stars: ✭ 134 (-3.6%)
Mutual labels:  nextjs

Next.js with Docker, PM2 and NGINX

This project is a production Docker setup for a Next.js app.

The Next.js app is launched with PM2 Runtime, which is a Production Process Manager for Node.js applications and is used to keep the app alive forever.

A second container with the NGINX web server is used as a reverse proxy, and to handle HTTP caching.

Docker Compose

docker-compose up

NGINX listens on port 80, which is the default HTTP port, so you can just visit http://localhost/

Without Docker Compose

# Build images
docker build --tag nextjs-image .
docker build --tag nginx-image ./nginx

# Create shared network
docker network create my-network

# Run containers
docker run --network my-network --name nextjs-container nextjs-image
docker run --network my-network --link nextjs-container:nextjs --publish 80:80 nginx-image

Next.js container is referenced inside NGINX container as nextjs.

PM2 commands

PM2 commands can still be used inside a container with the docker exec command:

docker exec -it <container-id> pm2 monit          # Monitoring CPU/Usage of each process
docker exec -it <container-id> pm2 list           # Listing managed processes
docker exec -it <container-id> pm2 show           # Get more information about a process
docker exec -it <container-id> pm2 reload all     # 0sec downtime reload all applications
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].