Features: - Vue 3 frontend with Three.js/Online3DViewer - Node.js API with PostgreSQL and Redis - Python worker for model conversion - Docker Compose for deployment - ViewCube navigation with drag rotation and 90° snap - Cross-section, exploded view, and render settings - Parts tree with visibility controls 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
817 B
Docker
42 lines
817 B
Docker
# Build stage
|
|
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Accept build arg for API URL
|
|
ARG VITE_API_URL=http://localhost:3000
|
|
ENV VITE_API_URL=$VITE_API_URL
|
|
|
|
# Install pnpm
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
|
|
# Copy package files
|
|
COPY package.json pnpm-lock.yaml* ./
|
|
|
|
# Install dependencies
|
|
RUN pnpm install
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build the application
|
|
RUN pnpm build
|
|
|
|
# Production stage with nginx
|
|
FROM nginx:alpine AS runner
|
|
|
|
# Copy custom nginx config
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# Copy built assets
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
|
|
# Expose port
|
|
EXPOSE 80
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD wget -q --spider http://localhost/ || exit 1
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|