newsnow/Dockerfile

14 lines
311 B
Docker
Raw Permalink Normal View History

2024-10-24 02:17:47 +08:00
FROM node:20.12.2-alpine as builder
WORKDIR /usr/src
COPY . .
RUN corepack enable
RUN pnpm install
RUN pnpm run build
FROM node:20.12.2-alpine
WORKDIR /usr/app
COPY --from=builder /usr/src/dist/output ./output
ENV HOST=0.0.0.0 PORT=4444 NODE_ENV=production
EXPOSE $PORT
CMD ["node", "output/server/index.mjs"]