FROM node:22-alpine AS build WORKDIR /app RUN corepack enable RUN npm install -g pm2 # Copy package.json and your lockfile, here we add pnpm-lock.yaml for illustration COPY package*.json ./ # Install dependencies RUN npm i # Copy the entire project COPY . . # Build the project RUN npm run build # Change the port and host ENV PORT=3001 EXPOSE 3001 CMD ["pm2-runtime", "start", "node_modules/.bin/nuxt", "--", "start"]