hatch-surf/Dockerfile
Alex Chen 6ee520f6d7 fix: update Dockerfile to use npm instead of pnpm
- Changed from pnpm to npm for Docker builds
- Fixed build cache issue that was serving stale content
- Verified correct content is now deployed

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-24 10:53:12 +02:00

30 lines
630 B
Docker

# Stage 1: Build
FROM node:20-alpine AS builder
WORKDIR /app
# Install dependencies
COPY package.json package-lock.json ./
RUN npm ci
# Build the application
COPY . .
RUN npm run build
# Stage 2: Production
FROM nginx:alpine AS production
# Copy custom nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Copy built assets from builder
COPY --from=builder /app/.next/static /usr/share/nginx/html/_next/static
COPY --from=builder /app/out /usr/share/nginx/html
# Expose port (internal only, no SSL)
EXPOSE 80
# Health check
HEALTHCHECK --interval=30s --timeout=3s \
CMD wget -qO- http://localhost:80/ || exit 1