Files
legal-ai/Dockerfile
Chaim 64724656af 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>
2026-04-11 13:47:05 +00:00

41 lines
1.5 KiB
Docker

# ══════════════════════════════════════════════════════════════
# 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
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
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
# 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
EXPOSE 3000
CMD ["node", "server.js"]