- Add server Dockerfile with multi-stage build - Add frontend Dockerfile with Nginx - Add docker-compose.yml for orchestration - Add Nginx config with SSL support - Add deployment documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
932 B
Docker
42 lines
932 B
Docker
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Install pnpm
|
|
RUN npm install -g pnpm
|
|
|
|
# Copy workspace files
|
|
COPY pnpm-workspace.yaml package.json pnpm-lock.yaml ./
|
|
COPY packages/shared ./packages/shared
|
|
COPY packages/client-screen ./packages/client-screen
|
|
COPY packages/client-mobile ./packages/client-mobile
|
|
|
|
# Install dependencies
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
# Build shared package
|
|
WORKDIR /app/packages/shared
|
|
RUN pnpm build
|
|
|
|
# Build client-screen
|
|
WORKDIR /app/packages/client-screen
|
|
RUN pnpm build
|
|
|
|
# Build client-mobile
|
|
WORKDIR /app/packages/client-mobile
|
|
RUN pnpm build
|
|
|
|
# Production stage - Nginx
|
|
FROM nginx:alpine
|
|
|
|
# Copy built files
|
|
COPY --from=builder /app/packages/client-screen/dist /usr/share/nginx/html/screen
|
|
COPY --from=builder /app/packages/client-mobile/dist /usr/share/nginx/html/mobile
|
|
|
|
# Copy nginx config
|
|
COPY deploy/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
EXPOSE 80 443
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|