---
id: T01
parent: S02
milestone: M002
provides: []
requires: []
affects: []
key_files: ["docker-compose.yml", "docker/Dockerfile.api", "alembic/env.py"]
key_decisions: ["Used SSH agent forwarding for git clone on ub01 (no gh CLI or git credentials on server)", "Compose directory uses symlink to repo's docker-compose.yml following XPLTD pattern", "nomic-embed-text pulled into Ollama container (274MB)"]
patterns_established: []
drill_down_paths: []
observability_surfaces: []
duration: ""
verification_result: "All 7 containers healthy, GET /health returns {status:ok, database:connected}, web UI loads at :8096, Alembic at 001_initial head"
completed_at: 2026-03-30T01:27:16.896Z
blocker_discovered: false
---

# T01: Full 7-container stack deployed and healthy on ub01 — API, worker, web, DB, Redis, Qdrant, Ollama all running with Alembic migration applied

> Full 7-container stack deployed and healthy on ub01 — API, worker, web, DB, Redis, Qdrant, Ollama all running with Alembic migration applied

## What Happened
---
id: T01
parent: S02
milestone: M002
key_files:
  - docker-compose.yml
  - docker/Dockerfile.api
  - alembic/env.py
key_decisions:
  - Used SSH agent forwarding for git clone on ub01 (no gh CLI or git credentials on server)
  - Compose directory uses symlink to repo's docker-compose.yml following XPLTD pattern
  - nomic-embed-text pulled into Ollama container (274MB)
duration: ""
verification_result: passed
completed_at: 2026-03-30T01:27:16.896Z
blocker_discovered: false
---

# T01: Full 7-container stack deployed and healthy on ub01 — API, worker, web, DB, Redis, Qdrant, Ollama all running with Alembic migration applied

**Full 7-container stack deployed and healthy on ub01 — API, worker, web, DB, Redis, Qdrant, Ollama all running with Alembic migration applied**

## What Happened

Deployed the full Chrysopedia stack to ub01. Cloned repo via SSH agent forwarding to /vmPool/r/repos/xpltdco/chrysopedia. Created compose directory at /vmPool/r/compose/xpltd_chrysopedia/ with symlink. Created all service bind-mount directories. Wrote .env with production secrets. Built all 3 Docker images (API, worker, web). Started the stack — fixed 4 healthcheck issues iteratively (Ollama, Qdrant, web, worker all lacked the expected CLI tools). Fixed alembic env.py sys.path for Docker layout. Ran Alembic migration 001_initial. Pulled nomic-embed-text (274MB) into Ollama. All 7 containers healthy: chrysopedia-db, chrysopedia-redis, chrysopedia-qdrant, chrysopedia-ollama, chrysopedia-api, chrysopedia-worker, chrysopedia-web-8096. Health endpoint returns connected, web UI loads on port 8096.

## Verification

All 7 containers healthy, GET /health returns {status:ok, database:connected}, web UI loads at :8096, Alembic at 001_initial head

## Verification Evidence

| # | Command | Exit Code | Verdict | Duration |
|---|---------|-----------|---------|----------|
| 1 | `ssh ub01 'docker ps --filter name=chrysopedia --format table'` | 0 | ✅ pass — all 7 containers healthy | 1500ms |
| 2 | `ssh ub01 'curl -s http://localhost:8096/health'` | 0 | ✅ pass — {status:ok, database:connected} | 800ms |
| 3 | `ssh ub01 'curl -s http://localhost:8096/ | head -3'` | 0 | ✅ pass — HTML loads | 600ms |
| 4 | `ssh ub01 'docker exec chrysopedia-api alembic current'` | 0 | ✅ pass — 001_initial (head) | 2000ms |


## Deviations

Multiple healthcheck fixes required: Ollama (no curl → use ollama list), Qdrant (no wget/curl → use bash /dev/tcp), web (busybox wget fails → use curl), worker (HTTP healthcheck fails → celery inspect ping). Alembic env.py needed sys.path fix for Docker layout. ZFS permissions required sudo chown for uid mismatch (AD uid 11103 vs local uid 1000). Git clone required SSH agent forwarding (-A flag).

## Known Issues

None.

## Files Created/Modified

- `docker-compose.yml`
- `docker/Dockerfile.api`
- `alembic/env.py`


## Deviations
Multiple healthcheck fixes required: Ollama (no curl → use ollama list), Qdrant (no wget/curl → use bash /dev/tcp), web (busybox wget fails → use curl), worker (HTTP healthcheck fails → celery inspect ping). Alembic env.py needed sys.path fix for Docker layout. ZFS permissions required sudo chown for uid mismatch (AD uid 11103 vs local uid 1000). Git clone required SSH agent forwarding (-A flag).

## Known Issues
None.
