phase: 01-docker-compose-stack
plan: 03
type: execute
wave: 3
depends_on:
- 01-02
files_modified: []
autonomous: false
requirements:
- SVC-01
- SVC-02
- SVC-06
- SVC-04
- ING-04

must_haves:
truths:
- "docker compose up --build starts without errors on macOS M4"
- "curl localhost:8080/health returns ok"
- "Ingest via browser UI writes chunks to pgvector"
- "Query returns Claude answer based on chunks"
- "Data persists after docker compose restart"
artifacts: []
key_links: []



Build and start the full Docker stack, then verify that all Phase 1 success criteria from ROADMAP.md are met end-to-end.

Purpose: This is the gate plan -- nothing ships until a human confirms the stack works. The automated smoke tests catch regressions but cannot replace visual confirmation of the browser UI and end-to-end data flow.
Output: Verified working stack on macOS M4


@$HOME/.claude/get-shit-done/workflows/execute-plan.md
@$HOME/.claude/get-shit-done/templates/summary.md


@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/01-docker-compose-stack/01-01-SUMMARY.md
@.planning/phases/01-docker-compose-stack/01-02-SUMMARY.md

@docker-compose.yml
@Dockerfile
@.env.example
@smoke_test.sh


Task 1: Build and start Docker stack, run smoke tests


- docker-compose.yml (verify services defined correctly)
- Dockerfile (verify build will work)
- .env.example (verify it has container hostnames -- user must have copied to .env)
- smoke_test.sh (the automated tests to run)


1. Verify .env exists (user must have copied .env.example to .env and set ANTHROPIC_API_KEY):
test -f .env || (echo "ERROR: Copy .env.example to .env and set ANTHROPIC_API_KEY" && exit 1)

2. Build and start the stack in detached mode:
   ```
   docker compose up --build -d
   ```

3. Wait for all services to be healthy (up to 120 seconds):
   ```
   docker compose ps --format json
   ```
   Verify all three services show "healthy" or "running".

4. Run the smoke test script:
   ```
   bash smoke_test.sh
   ```

5. If smoke tests fail, check logs for diagnosis:
   ```
   docker compose logs app --tail 50
   docker compose logs db --tail 50
   docker compose logs ollama --tail 50
   ```



bash smoke_test.sh


- docker compose up --build -d completes without error
- docker compose ps shows all 3 services running (app, db, ollama)
- smoke_test.sh exits with code 0 (all tests pass)
- curl -sf localhost:8080/health returns {"status":"ok"}

All three Docker services running, smoke tests pass, health endpoint returns ok


Task 2: Human verifies full stack end-to-end


Human verifies the full Docker Compose stack works end-to-end by testing the browser UI, ingest, query, persistence, and logs.


curl -sf http://localhost:8080/health | grep -q ok && echo "PASS" || echo "FAIL"

Human has confirmed: browser UI loads, ingest works, query returns Claude answer, data persists after restart, logs visible

Complete Docker Compose stack for RAG Support Desk:
- FastAPI app on port 8080 (Dockerfile + python:3.14-slim)
- PostgreSQL + pgvector on named volume (pgvector/pgvector:pg17)
- Ollama with auto-pulled nomic-embed-text on named volume
- Automated smoke tests all passing


1. Open http://localhost:8080 in browser -- should show the RAG Support Desk UI
2. Open http://localhost:8080/health -- should show {"status":"ok"}
3. Open http://localhost:8080/docs -- should show FastAPI Swagger UI with /ingest and /query endpoints
4. Test ingest: In the browser UI (or via curl), submit a log file for ingest. Verify it returns an inserted count > 0.
5. Test query: Ask "Was ist mit dem Mailserver passiert?" -- should return a Claude answer referencing log data.
6. Test persistence: Run docker compose restart in terminal, then refresh browser -- health should still return ok, and a query should still find previously ingested chunks.
7. Check logs: Run docker compose logs app --tail 20 -- should show uvicorn startup and request logs.

Type "approved" if everything works, or describe any issues found


Phase 1 ROADMAP success criteria:
1. docker compose up --build starts without errors on macOS M4 -- verified by Task 1
2. curl localhost:8080/health returns {"status":"ok"} -- verified by smoke_test.sh
3. Logfile ingest via browser UI writes chunks -- verified by human in Task 2
4. Query gives Claude answer based on chunks -- verified by human in Task 2
5. pgvector data survives docker compose restart -- verified by smoke_test.sh + human
6. Linux x86_64 -- deferred to deployment (same images are multi-arch, verified in RESEARCH.md)


- All smoke tests pass (smoke_test.sh exits 0)
- Human confirms browser UI works for ingest and query
- Human confirms data persists after restart

After completion, create `.planning/phases/01-docker-compose-stack/01-03-SUMMARY.md`