yufan.me/Dockerfile
Yufan Sheng c8bc627869
feat: use s3 api for uploading the static files. (#46)
* chore: bump the dependencies.

* feat: use s3 v3 client instead of the upyun sdk.

* chore: change the schema of biome.
2024-11-15 14:53:46 +08:00

19 lines
397 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 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