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 install
Start the development server on http://localhost:3000
:
# pnpm
pnpm run dev
Build the application for production:
# pnpm
pnpm run build
Locally preview production build:
# pnpm
pnpm run preview
Build 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.