yufan.me/Dockerfile
Yufan Sheng 0126b71722
feat: add upyun support. move images to upyun on build. (#45)
* style: better reply button.

* feat: add astro badge.

* chore: drop useless styles.

* feat: use new options.ts for global configuration.

* fix: the invalid import.meta.env.PROD in astro build.

* feat: move og to new assert prefix.

* chore: add better og description.

* chore: make sure all the images link could be correctly replaced.

* feat: add upyun uploader.
2024-11-15 14:53:43 +08:00

20 lines
447 B
Docker

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
RUN npm i patch-package && npm exec patch-package
RUN NODE_ENV=production npm run build
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
CMD NODE_ENV=production node ./dist/server/entry.mjs