2024-06-14 02:11:26 +08:00
|
|
|
FROM node:lts-alpine AS base
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
|
|
|
|
FROM base AS build
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
ENV ASTRO_TELEMETRY_DISABLED=1
|
|
|
|
RUN NODE_ENV=development npm install
|
2024-06-17 23:45:27 +08:00
|
|
|
RUN npm i patch-package && npm exec patch-package
|
2024-06-19 03:34:36 +08:00
|
|
|
RUN NODE_ENV=production npm run build
|
2024-06-14 02:11:26 +08:00
|
|
|
|
|
|
|
FROM base AS runtime
|
|
|
|
RUN npm install --omit=dev
|
|
|
|
COPY --from=build /app/dist ./dist
|
|
|
|
ENV HOST=0.0.0.0
|
|
|
|
ENV PORT=4321
|
|
|
|
EXPOSE 4321
|
2024-06-19 03:34:36 +08:00
|
|
|
CMD NODE_ENV=production node ./dist/server/entry.mjs
|