mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 03:09:14 +08:00
14 lines
311 B
Docker
14 lines
311 B
Docker
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"]
|