The current Dockerfile and docker-compose.yml build the legacy Python/FastAPI backend. The Phase-A backend rewrite (Python → Rust/axum) and the subsequent stack lift (app/ tree: Tauri + Rust sidecar + Vite/React 19 + Tailwind 4 + CodeMirror 6 + AI SDK v6 — branch lift/tauri-portable-pty-cm6-aisdk) leave the container path completely out of date.
This is a follow-up to the lift PR — the lift itself does not change Docker artifacts (the legacy backend/ + frontend/ trees still build from main until the cleanup PR).
Current state (broken / obsolete)
Dockerfile
# Final Stage for Backend and Frontend Assets
FROM python:3.11-slim
WORKDIR /app
...
COPY backend/requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY backend/ ./backend/
COPY --from=frontend-builder /app/frontend/dist ./frontend/dist
ENV PYTHONPATH=/app/backend
ENV PORT=8000
EXPOSE 8000
CMD [\"python\", \"-m\", \"uvicorn\", \"app.main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"8000\"]
- Python runtime + uvicorn entry — no longer applicable (current
backend/ is Rust).
backend/requirements.txt is gone.
- No
app/ stage at all (lift binaries server-core + server-bin are unbuildable here).
docker-compose.yml
environment:
- DATABASE_URL=sqlite+aiosqlite:///./data/claude_registry.db
sqlite+aiosqlite:// is the Python async dialect; sqlx accepts sqlite:// (or no prefix and a plain path).
Expected rewrite
Multi-stage build, two paths to choose:
Option A — ship the current legacy Rust backend (faster, no lift dependency)
FROM rust:1.85-slim AS backend-builder — build the current Rust backend/ crate with cargo build --release.
FROM node:20-slim AS frontend-builder — build frontend/ (existing).
FROM debian:bookworm-slim final stage — copy the binary + frontend/dist, set FRONTEND_DIST=/app/frontend/dist, EXPOSE 8000, CMD [\"./backend-bin\", \"--host\", \"0.0.0.0\", \"--port\", \"8000\"].
Pros: minimal scope, ships what's on main today.
Option B — ship the app/ lift stack (post-cutover)
FROM rust:1.85-slim AS server-builder — cd app/server && cargo build --release -p server-bin.
FROM node:20-slim AS web-builder — cd app/web && npm ci && npm run build.
FROM debian:bookworm-slim final stage — copy server-bin + app/web/dist, set FRONTEND_DIST=/app/web/dist, EXPOSE 8000, CMD [\"./server-bin\"].
- Optional: do not ship the Tauri desktop in the container — desktop is local-install only.
Pros: aligns the container with the lift target.
The cleanup PR (which renames backend/+frontend/ → legacy/) is the natural moment to commit to Option B.
docker-compose.yml updates
DATABASE_URL=sqlite:///app/data/claude_registry.db (or omit — server-bin defaults to a local DB).
- Mount
app/server/claude_registry.db location into the data volume.
- Optionally pass
ANTHROPIC_API_KEY env so the in-container build supports the chat panel.
Repo locations
Dockerfile (repo root)
docker-compose.yml (repo root)
app/server/ (lift Rust workspace) · app/server/bin/src/main.rs (server-bin entry)
app/web/ (lift Vite/React) · app/web/dist/ (build output)
backend/ (legacy Rust binary still on main)
frontend/ (legacy Vite/React still on main)
Acceptance criteria
Where to look first
- Cargo workspace root:
app/server/Cargo.toml
- Server-bin entry:
app/server/bin/src/main.rs (reads HOST, PORT, DATABASE_URL, PRESENCE_PUBLIC_URL, ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL, FRONTEND_DIST).
- Web build:
app/web/package.json (npm run build → app/web/dist/).
Context
Discovered during the Phase-D build/cutover pass of the stack lift, session 2026-05-23 (branch lift/tauri-portable-pty-cm6-aisdk). Out of scope for the lift PR per the canonical plan ("Dockerfile fix-or-file: Only blocking if container deploy is in scope at PR time"). Filed so the rewrite is not lost.
The current
Dockerfileanddocker-compose.ymlbuild the legacy Python/FastAPI backend. The Phase-A backend rewrite (Python → Rust/axum) and the subsequent stack lift (app/tree: Tauri + Rust sidecar + Vite/React 19 + Tailwind 4 + CodeMirror 6 + AI SDK v6 — branchlift/tauri-portable-pty-cm6-aisdk) leave the container path completely out of date.This is a follow-up to the lift PR — the lift itself does not change Docker artifacts (the legacy
backend/+frontend/trees still build frommainuntil the cleanup PR).Current state (broken / obsolete)
Dockerfilebackend/is Rust).backend/requirements.txtis gone.app/stage at all (lift binariesserver-core+server-binare unbuildable here).docker-compose.ymlsqlite+aiosqlite://is the Python async dialect; sqlx acceptssqlite://(or no prefix and a plain path).Expected rewrite
Multi-stage build, two paths to choose:
Option A — ship the current legacy Rust backend (faster, no lift dependency)
FROM rust:1.85-slim AS backend-builder— build the current Rustbackend/crate withcargo build --release.FROM node:20-slim AS frontend-builder— buildfrontend/(existing).FROM debian:bookworm-slimfinal stage — copy the binary +frontend/dist, setFRONTEND_DIST=/app/frontend/dist,EXPOSE 8000,CMD [\"./backend-bin\", \"--host\", \"0.0.0.0\", \"--port\", \"8000\"].Pros: minimal scope, ships what's on
maintoday.Option B — ship the
app/lift stack (post-cutover)FROM rust:1.85-slim AS server-builder—cd app/server && cargo build --release -p server-bin.FROM node:20-slim AS web-builder—cd app/web && npm ci && npm run build.FROM debian:bookworm-slimfinal stage — copyserver-bin+app/web/dist, setFRONTEND_DIST=/app/web/dist,EXPOSE 8000,CMD [\"./server-bin\"].Pros: aligns the container with the lift target.
The cleanup PR (which renames
backend/+frontend/→legacy/) is the natural moment to commit to Option B.docker-compose.yml updates
DATABASE_URL=sqlite:///app/data/claude_registry.db(or omit — server-bin defaults to a local DB).app/server/claude_registry.dblocation into the data volume.ANTHROPIC_API_KEYenv so the in-container build supports the chat panel.Repo locations
Dockerfile(repo root)docker-compose.yml(repo root)app/server/(lift Rust workspace) ·app/server/bin/src/main.rs(server-bin entry)app/web/(lift Vite/React) ·app/web/dist/(build output)backend/(legacy Rust binary still onmain)frontend/(legacy Vite/React still onmain)Acceptance criteria
docker compose upbuilds and starts the container without error.http://localhost:8000and renders correctly./api/v1/statusreturns 200 with version info.ANTHROPIC_API_KEYenv is honored — chat panel works when the var is set.Where to look first
app/server/Cargo.tomlapp/server/bin/src/main.rs(readsHOST,PORT,DATABASE_URL,PRESENCE_PUBLIC_URL,ANTHROPIC_API_KEY,ANTHROPIC_BASE_URL,FRONTEND_DIST).app/web/package.json(npm run build→app/web/dist/).Context
Discovered during the Phase-D build/cutover pass of the stack lift, session 2026-05-23 (branch
lift/tauri-portable-pty-cm6-aisdk). Out of scope for the lift PR per the canonical plan ("Dockerfile fix-or-file: Only blocking if container deploy is in scope at PR time"). Filed so the rewrite is not lost.