Files
kit/Dockerfile
valknarandClaude Sonnet 4.6 98ae25d816 fix(docker): copy pnpm-workspace.yaml before pnpm install
pnpm 11 reads onlyBuiltDependencies from pnpm-workspace.yaml, but it
wasn't being copied into the builder layer before install ran.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 12:20:29 +02:00

43 lines
849 B
Docker

# Build stage
FROM node:22-alpine AS builder
WORKDIR /app
# Add build arguments for Umami and Site URL
ARG UMAMI_SCRIPT
ARG UMAMI_ID
ARG NEXT_PUBLIC_SITE_URL
# Set environment variables for the build process
ENV UMAMI_SCRIPT=$UMAMI_SCRIPT
ENV UMAMI_ID=$UMAMI_ID
ENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URL
ENV NODE_ENV=production
# Copy package files
COPY package.json pnpm-lock.yaml* pnpm-workspace.yaml ./
# Install pnpm and dependencies
RUN corepack enable pnpm && pnpm install --frozen-lockfile
# Copy source code
COPY . .
# Build the application
RUN pnpm build
# Production stage
FROM nginx:alpine
# Copy custom nginx config
COPY nginx.conf /etc/nginx/nginx.conf
# Copy built static files from builder
COPY --from=builder /app/out /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]