# S02: Deploy to ub01 — Clone, Build, Start, Migrate

**Goal:** Clone repo to ub01, create .env with secrets, build images, start stack, run Alembic migration, verify health
**Demo:** After this: All containers running healthy on ub01, web UI accessible at :8096, API health endpoint returns 200

## Tasks
- [x] **T01: Full 7-container stack deployed and healthy on ub01 — API, worker, web, DB, Redis, Qdrant, Ollama all running with Alembic migration applied** — 1. Git clone xpltdco/chrysopedia to /vmPool/r/repos/xpltdco/chrysopedia on ub01
2. Create /vmPool/r/compose/xpltd_chrysopedia/ and symlink docker-compose.yml
3. Create service directories for bind mounts
4. Create .env with production secrets (LLM key, DB password, etc.)
5. Build docker images
6. Start the stack with docker compose up -d
7. Pull nomic-embed-text model into Ollama container
8. Run Alembic migration against the production database
9. Verify all containers healthy
10. Verify GET /health returns 200
11. Verify web UI loads on port 8096
  - Estimate: 20min
  - Verify: ssh ub01 'docker ps --filter name=chrysopedia --format "{{.Names}} {{.Status}}"' && ssh ub01 'curl -s http://localhost:8096/health'
