Files
gimme-pet-root/Dockerfile

28 lines
578 B
Docker

# Stage 1: Build the Nuxt application
FROM node:lts-alpine AS builder
WORKDIR /app
COPY site/package*.json ./site/
RUN cd site && npm install
COPY site ./site
RUN cd site && npm run build
FROM node:lts-alpine
WORKDIR /app
#COPY --from=builder /app/package*.json ./
#COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/site/.output ./site/.output
COPY --from=builder /app/site/package*.json ./site/
RUN cd site && npm ci --omit=dev
ENV HOST=0.0.0.0
ENV NODE_ENV=production
ENV PORT=3030
EXPOSE 3030
CMD ["node", "site/.output/server/index.mjs"]