Files
atridotdad/Dockerfile
Atridad 831985bb3f
All checks were successful
Docker Deploy / build-and-push (push) Successful in 6m11s
fixed build
2025-06-30 14:08:49 -06:00

46 lines
879 B
Docker

FROM node:24-alpine AS builder
WORKDIR /app
# Install pnpm
RUN npm i -g pnpm
# Copy package files
COPY package.json pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy source code
COPY . .
# Build the application
RUN pnpm run build
# Production stage
FROM mcr.microsoft.com/playwright:v1.50.0-noble AS runtime
WORKDIR /app
# Install pnpm
RUN npm i -g pnpm
# Copy built application and package files
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package.json /app/pnpm-lock.yaml ./
# Install production dependencies and clean up in one layer
RUN pnpm install --prod --frozen-lockfile \
&& pnpm store prune \
&& npm cache clean --force
# Set environment variables
ENV HOST=0.0.0.0 \
PORT=4321 \
NODE_ENV=production
# Expose port
EXPOSE 4321
# Start the application
CMD ["node", "./dist/server/entry.mjs"]