Simple Nuxt 3 Docker config with PM2, Nginx, and pnpm
Look at the Nuxt 3 documentation to learn more.
- 🐳 Docker - https://www.docker.com/
- ❤️ PM2 - a daemon process manager https://pm2.keymetrics.io/
- 📱 Nginx - https://www.nginx.com/
- ✨ pnpm - Fast, disk space efficient package manager. https://pnpm.io/
Make sure to install the dependencies:
# pnpm
pnpm installStart the development server on http://localhost:3000:
# pnpm
pnpm run devBuild the application for production:
# pnpm
pnpm run buildLocally preview production build:
# pnpm
pnpm run previewBuild the application for production:
docker compose build \
&& docker compose down --remove-orphans \
&& docker compose up --pull always -d --wait
Check out the deployment documentation for more information.