Something went wrong. Try again.
An open-source, container-based Platform-as-a-Service (PAAS) for seamless deployments and effortless infrastructure management — built on f…
Something went wrong. Try again.
659 B · 37 lines
Dockerfile
at master
12345678910111213141516171819202122232425262728293031323334353637# Stage 1: BuildFROM node:20-alpine AS build
WORKDIR /home/app
COPY package*.json ./
RUN npm ci --only=production && \ npm cache clean --force && \ rm -rf /root/.npm /root/.cache /tmp/*
COPY . .
# RUN npx prisma generate && \# npm run build
RUN npm run build
# Stage 2: ProductionFROM alpine:latest
RUN apk add --no-cache nodejs npm
WORKDIR /home/app
COPY --from=build /home/app/dist ./distCOPY --from=build /home/app/package*.json ./COPY --from=build /home/app/prisma ./prisma
RUN npm ci --only=production && \ npm cache clean --force && \ rm -rf /root/.npm /root/.cache /tmp/*
EXPOSE 5000
CMD ["node", "dist/index.js"]