Files
website-enchun-mgr/Dockerfile.frontend
pkupuk 8ca609a889 chore(infra): update build config and deployment scripts
Update Docker configurations, nginx setup, and shared design tokens. Refresh lockfile.
2026-02-11 11:50:04 +08:00

31 lines
592 B
Docker

# Frontend Dockerfile - Multi-stage build
FROM node:18-alpine AS builder
WORKDIR /app
# Install pnpm
RUN npm install -g pnpm
# Copy package files
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# Copy source and build
COPY . .
RUN pnpm run build
# Production stage - nginx for static site
FROM nginx:alpine AS production
# Copy built files from builder stage
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port
EXPOSE 4321
# Start nginx
CMD ["nginx", "-g", "daemon off;"]