---
id: S02
parent: M002
milestone: M002
provides:
  - Running Chrysopedia stack on ub01 (all 7 containers healthy)
  - PostgreSQL schema at 001_initial migration
  - Embedding model (nomic-embed-text) available via Ollama
requires:
  - slice: S01
    provides: Corrected docker-compose.yml with 7 services
affects:
  - S03
key_files:
  - docker-compose.yml
  - docker/Dockerfile.api
  - alembic/env.py
key_decisions:
  - SSH agent forwarding for git clone on ub01 (no gh CLI)
  - Compose dir symlinks to repo's docker-compose.yml
  - nomic-embed-text as embedding model (274MB, CPU-only)
patterns_established:
  - XPLTD compose symlink pattern: /vmPool/r/compose/xpltd_chrysopedia/ → repo's docker-compose.yml
  - Container healthcheck patterns: ollama list, bash /dev/tcp, celery inspect ping for non-HTTP services
observability_surfaces:
  - GET :8096/health returns API health + DB connectivity
  - docker ps shows all 7 containers healthy
  - Celery inspect ping confirms worker is processing
drill_down_paths:
  - .gsd/milestones/M002/slices/S02/tasks/T01-SUMMARY.md
duration: ""
verification_result: passed
completed_at: 2026-03-30T01:27:39.567Z
blocker_discovered: false
---

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

**Full 7-container Chrysopedia stack deployed and healthy on ub01 at port 8096**

## What Happened

Deployed the full Chrysopedia stack to ub01: cloned repo, created compose/service directories following XPLTD conventions, built Docker images, started all 7 containers, fixed multiple healthcheck issues iteratively, ran Alembic migration, and pulled the nomic-embed-text embedding model. All services are healthy and accessible.

## Verification

7/7 containers healthy, health endpoint returns ok, web UI loads, Alembic at head, embedding model pulled

## Requirements Advanced

- R010 — Full docker compose up -d on ub01 with all services healthy

## Requirements Validated

- R010 — docker compose up -d on ub01: 7 containers healthy, compose config validates, XPLTD conventions followed (bind mounts at /vmPool/r/services/, network 172.32.0.0/24, project name xpltd_chrysopedia)

## New Requirements Surfaced

None.

## Requirements Invalidated or Re-scoped

None.

## Deviations

4 healthcheck fixes needed iteratively (Ollama, Qdrant, web, worker images lack expected CLI tools). ZFS uid mismatch required sudo chown. Alembic env.py sys.path needed Docker-aware fix. SSH agent forwarding required for git clone.

## Known Limitations

Embedding model runs on CPU (no GPU passthrough configured for Ollama container).

## Follow-ups

None.

## Files Created/Modified

- `docker-compose.yml` — Healthcheck fixes for Ollama (ollama list), Qdrant (bash /dev/tcp), web (curl), worker (celery inspect ping)
- `docker/Dockerfile.api` — Added alembic.ini and alembic/ to Docker image
- `alembic/env.py` — Added parent dir to sys.path for Docker layout compatibility
