Docker container reduction
All checks were successful
Docker Deploy / build-and-push (push) Successful in 59s

This commit is contained in:
Atridad Lahiji 2025-01-27 10:15:39 -06:00
parent 530a234a44
commit 4edd77700a
Signed by: atridad
SSH key fingerprint: SHA256:LGomp8Opq0jz+7kbwNcdfTcuaLRb5Nh0k5AchDDb438

View file

@ -1,16 +1,25 @@
FROM node:lts AS runtime
FROM node:lts-alpine AS builder
WORKDIR /app
# Copy files
COPY . .
# Install pnpm
RUN npm i -g pnpm
# Install dependencies and build
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
COPY . .
RUN pnpm run build
FROM node:lts-alpine AS runtime
WORKDIR /app
RUN npm i -g pnpm
COPY --from=builder /app/dist ./dist
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --prod
ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321