ARG NODE_VERSION=22.16.0 FROM node:${NODE_VERSION}-slim as base FROM base as build WORKDIR /app 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 --link . . # Build the project RUN npm run build FROM base COPY --from=build /src/.output /src/.output # Change the port and host ENV PORT=3001 EXPOSE 3001 CMD ["pm2-runtime", "start", "node_modules/.bin/nuxt", "--", "start"]