Merges ac-helper (PHP Activation Calendar) and brief-extractor (Python AI) into a single Docker app with React/TypeScript frontend. Features: - Brief upload → AI extraction → review → Activation Calendar import - Handsontable v17 spreadsheet with dependent dropdowns (148 categories) - AI natural language commands via Gemini (YOLO mode, voice input) - Azure AD MSAL SPA PKCE authentication, user roles (user/admin) - CSV Activation Calendar export - Real-time WebSocket job progress - Admin: user management, dropdown Excel upload - Multi-stage Dockerfile, docker-compose, nginx proxy instructions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
40 lines
1.3 KiB
Docker
40 lines
1.3 KiB
Docker
# ── Stage 1: Build React frontend ────────────────────────────────────────────
|
|
FROM node:22-alpine AS frontend-builder
|
|
|
|
WORKDIR /app/frontend
|
|
COPY frontend/package*.json ./
|
|
RUN npm ci
|
|
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
# ── Stage 2: Python runtime ───────────────────────────────────────────────────
|
|
FROM python:3.11-slim
|
|
|
|
# System deps for document processing
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libmagic1 \
|
|
libreoffice-core \
|
|
libreoffice-writer \
|
|
libreoffice-impress \
|
|
poppler-utils \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Install Python dependencies
|
|
COPY backend/requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy backend source
|
|
COPY backend/ ./
|
|
|
|
# Copy built frontend into static directory
|
|
COPY --from=frontend-builder /app/frontend/dist ./frontend/dist
|
|
|
|
# Create data directory (will be mounted as volume in production)
|
|
RUN mkdir -p data/uploads data/outputs data/sheets
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["python", "-m", "hypercorn", "server.app:create_app()", "--bind", "0.0.0.0:8000", "--worker-class", "asyncio"]
|