Files
fuz-site/Dockerfile

28 lines
424 B
Docker

# ============================
# 1) BUILD STAGE
# ============================
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# ============================
# 2) RUNTIME STAGE (alpine)
# ============================
FROM node:18-alpine
WORKDIR /app
COPY --from=builder /app /app
ENV NODE_ENV=production
EXPOSE 3000
CMD ["node", "dist/server/entry.mjs"]