personal-website/Dockerfile
Cyril Šebek 8958494701
All checks were successful
Build Docker Image and Deploy / Build Image and push to Registry (push) Successful in 1m26s
Build Docker Image and Deploy / Deploy on webserver (push) Successful in 32s
Fixed pnpm --ommit
2024-07-07 22:52:09 +02:00

25 lines
435 B
Docker

FROM node:lts-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