Phase 1: scaffold Next.js 16 web-ui + Coolify staging
- create-next-app with TypeScript, Tailwind v4, App Router - Port design-system.css tokens into Tailwind @theme (navy/gold/parchment, Heebo) - Install TanStack Query, react-hook-form, zod, lucide-react, react-dropzone - layout.tsx: RTL Hebrew + Heebo via next/font/google - AppShell component with navy header + gold rule + nav - next.config.ts: output:standalone + rewrites to proxy /api/* to production FastAPI - Dockerfile: multi-stage Node 20 Alpine build for Next.js standalone (branch-local override of the FastAPI Dockerfile; main is unaffected) - Switch .taskmaster to claude-code provider (no API key required) - Add 7 phase tasks (83-89) tracking the full rewrite plan Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
53
Dockerfile
53
Dockerfile
@@ -1,27 +1,40 @@
|
||||
FROM python:3.12-slim
|
||||
# ══════════════════════════════════════════════════════════════
|
||||
# Dockerfile — Next.js 16 web-ui (ui-rewrite branch only)
|
||||
#
|
||||
# This file REPLACES the FastAPI Dockerfile on this branch so that
|
||||
# Coolify's default /Dockerfile lookup builds the new Next.js staging
|
||||
# UI. The FastAPI Dockerfile lives on `main` and is unaffected.
|
||||
#
|
||||
# When the rewrite is merged to main, decide between:
|
||||
# (a) keeping both via separate Dockerfiles + dockerfile_location config, or
|
||||
# (b) a multi-stage Dockerfile that serves both, or
|
||||
# (c) fully replacing FastAPI's StaticFiles with this Next.js front end.
|
||||
# ══════════════════════════════════════════════════════════════
|
||||
|
||||
FROM node:20-alpine AS deps
|
||||
WORKDIR /app
|
||||
COPY web-ui/package.json web-ui/package-lock.json ./
|
||||
RUN npm ci --no-audit --no-fund
|
||||
|
||||
# System deps for PyMuPDF and document processing
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc libmupdf-dev libfreetype6-dev libharfbuzz-dev libjpeg62-turbo-dev \
|
||||
libopenjp2-7-dev curl git && rm -rf /var/lib/apt/lists/* && \
|
||||
git config --global init.defaultBranch main
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY web-ui/ ./
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
RUN npm run build
|
||||
|
||||
# Copy Ezer Mishpati MCP server source
|
||||
COPY mcp-server/pyproject.toml /app/mcp-server/pyproject.toml
|
||||
COPY mcp-server/src/ /app/mcp-server/src/
|
||||
FROM node:20-alpine AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV PORT=3000
|
||||
ENV HOSTNAME=0.0.0.0
|
||||
|
||||
# Install MCP server + web deps
|
||||
RUN pip install --no-cache-dir /app/mcp-server && \
|
||||
pip install --no-cache-dir fastapi uvicorn python-multipart
|
||||
# next.config.ts uses output: 'standalone', so we copy only the minimal runtime
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
|
||||
# Copy web app
|
||||
COPY web/ /app/web/
|
||||
EXPOSE 3000
|
||||
|
||||
ENV PYTHONPATH=/app/mcp-server/src
|
||||
ENV DOTENV_PATH=/dev/null
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["uvicorn", "web.app:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
Reference in New Issue
Block a user