personal-website/Dockerfile
Cyril Šebek f7ac382a84
All checks were successful
Build Docker Image and Deploy / Build Image and push to Registry (push) Successful in 2m2s
Build Docker Image and Deploy / Deploy on webserver (push) Successful in 57s
Fix: change base container to node:18-slim
2024-12-14 20:14:28 +01:00

25 lines
434 B
Docker

FROM node:18-slim AS base
WORKDIR /app
RUN corepack enable pnpm
COPY package.json pnpm-lock.yaml ./
FROM base AS prod-deps
RUN pnpm install --prod
FROM base AS build-deps
RUN pnpm install
FROM build-deps AS build
COPY . .
RUN pnpm run build
FROM base AS runtime
COPY --from=prod-deps /app/node_modules ./node_modules
COPY --from=build /app/dist ./dist
ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321
CMD node ./dist/server/entry.mjs