# TigerStyle Whiskers Documentation Site # Multi-stage build for production optimization # Build stage FROM node:18-alpine AS builder WORKDIR /app # Copy package files COPY package*.json ./ # Install dependencies RUN npm ci --only=production # Copy source code COPY . . # Build the site RUN npm run build # Production stage FROM caddy:2-alpine AS production # Copy built site from builder stage COPY --from=builder /app/dist /usr/share/caddy # Copy Caddyfile COPY Caddyfile /etc/caddy/Caddyfile # Health check HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ CMD wget --quiet --tries=1 --spider http://localhost:80/health || exit 1 # Expose port EXPOSE 80 # Start Caddy CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]