You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
412 B
Docker

# https://dev.to/code42cate/how-to-dockerize-and-deploy-astro-6ll
3 days ago
FROM node:alpine AS base
3 days ago
WORKDIR /app
COPY package.json package-lock.json ./
3 days ago
FROM base AS deps
3 days ago
RUN npm install
3 days ago
FROM deps AS build
3 days ago
COPY . .
RUN npm run build
FROM base AS runtime
3 days ago
COPY --from=deps /app/node_modules ./node_modules
3 days ago
COPY --from=build /app/dist ./dist
ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321
3 days ago
CMD node ./dist/server/entry.mjs