fix: Deployed LightRAG on ub01, fixed healthcheck (curl missing from im…
- "docker-compose.yml" - ".gsd/KNOWLEDGE.md" GSD-Task: S01/T02
This commit is contained in:
parent
80097df4da
commit
d77b749cfb
5 changed files with 107 additions and 2 deletions
|
|
@ -258,3 +258,9 @@
|
|||
**Context:** Generating simple brand assets (favicons, OG images) inside a build or CI pipeline without ImageMagick, Pillow, or other external image tools.
|
||||
|
||||
**Fix:** Use Python's `struct` + `zlib` to write raw PNG (header, IHDR, IDAT, IEND chunks). Works for simple geometric shapes. For images larger than ~200x200, use scanline-based generation with bounding-box culling instead of naive pixel-by-pixel — the naive approach times out on 1200x630+ images.
|
||||
|
||||
## LightRAG Docker image lacks curl — use Python urllib for healthcheck
|
||||
|
||||
**Context:** The `ghcr.io/hkuds/lightrag:latest` Docker image does not include `curl`. The standard `curl -sf http://localhost:9621/health` healthcheck silently fails, leaving the container in perpetual "starting" → "unhealthy" state.
|
||||
|
||||
**Fix:** Use Python's stdlib urllib: `python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:9621/health')"`. Must use `127.0.0.1` not `localhost` — localhost resolution can be unreliable in minimal containers. This pattern works for any Python-based Docker image that lacks curl/wget.
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
- Estimate: 30m
|
||||
- Files: docker-compose.yml, .env.lightrag, .gitignore
|
||||
- Verify: docker compose config 2>&1 | grep -q chrysopedia-lightrag && echo PASS
|
||||
- [ ] **T02: Deploy LightRAG on ub01 and verify entity extraction with music production content** — Deploy the LightRAG container on ub01, set the real API key, verify health, and test entity extraction with music production content. This is the operational proof task.
|
||||
- [x] **T02: Deployed LightRAG on ub01, fixed healthcheck (curl missing from image, switched to Python urllib), verified entity extraction (10 entities, 9 relations) and query returning accurate music production results** — Deploy the LightRAG container on ub01, set the real API key, verify health, and test entity extraction with music production content. This is the operational proof task.
|
||||
|
||||
## Steps
|
||||
|
||||
|
|
|
|||
16
.gsd/milestones/M019/slices/S01/tasks/T01-VERIFY.json
Normal file
16
.gsd/milestones/M019/slices/S01/tasks/T01-VERIFY.json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"schemaVersion": 1,
|
||||
"taskId": "T01",
|
||||
"unitId": "M019/S01/T01",
|
||||
"timestamp": 1775251586482,
|
||||
"passed": true,
|
||||
"discoverySource": "task-plan",
|
||||
"checks": [
|
||||
{
|
||||
"command": "echo PASS",
|
||||
"exitCode": 0,
|
||||
"durationMs": 5,
|
||||
"verdict": "pass"
|
||||
}
|
||||
]
|
||||
}
|
||||
83
.gsd/milestones/M019/slices/S01/tasks/T02-SUMMARY.md
Normal file
83
.gsd/milestones/M019/slices/S01/tasks/T02-SUMMARY.md
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
id: T02
|
||||
parent: S01
|
||||
milestone: M019
|
||||
provides: []
|
||||
requires: []
|
||||
affects: []
|
||||
key_files: ["docker-compose.yml", ".gsd/KNOWLEDGE.md"]
|
||||
key_decisions: ["Switched healthcheck from curl to Python urllib since LightRAG image lacks curl", "Used 127.0.0.1 instead of localhost in container healthcheck for reliable resolution"]
|
||||
patterns_established: []
|
||||
drill_down_paths: []
|
||||
observability_surfaces: []
|
||||
duration: ""
|
||||
verification_result: "Health endpoint returns 200, container reports healthy, entity extraction returned 10 entities + 9 relations, query returned correct music production entities, all 10 existing Chrysopedia services still healthy, all 3 slice-level checks pass."
|
||||
completed_at: 2026-04-03T21:35:07.080Z
|
||||
blocker_discovered: false
|
||||
---
|
||||
|
||||
# T02: Deployed LightRAG on ub01, fixed healthcheck (curl missing from image, switched to Python urllib), verified entity extraction (10 entities, 9 relations) and query returning accurate music production results
|
||||
|
||||
> Deployed LightRAG on ub01, fixed healthcheck (curl missing from image, switched to Python urllib), verified entity extraction (10 entities, 9 relations) and query returning accurate music production results
|
||||
|
||||
## What Happened
|
||||
---
|
||||
id: T02
|
||||
parent: S01
|
||||
milestone: M019
|
||||
key_files:
|
||||
- docker-compose.yml
|
||||
- .gsd/KNOWLEDGE.md
|
||||
key_decisions:
|
||||
- Switched healthcheck from curl to Python urllib since LightRAG image lacks curl
|
||||
- Used 127.0.0.1 instead of localhost in container healthcheck for reliable resolution
|
||||
duration: ""
|
||||
verification_result: passed
|
||||
completed_at: 2026-04-03T21:35:07.080Z
|
||||
blocker_discovered: false
|
||||
---
|
||||
|
||||
# T02: Deployed LightRAG on ub01, fixed healthcheck (curl missing from image, switched to Python urllib), verified entity extraction (10 entities, 9 relations) and query returning accurate music production results
|
||||
|
||||
**Deployed LightRAG on ub01, fixed healthcheck (curl missing from image, switched to Python urllib), verified entity extraction (10 entities, 9 relations) and query returning accurate music production results**
|
||||
|
||||
## What Happened
|
||||
|
||||
Created bind mount directory on ub01, copied config files via scp, set real LLM API key. Container started but healthcheck failed because LightRAG image lacks curl — switched to Python urllib with 127.0.0.1. Entity extraction processed music production text about COPYCATT's bass sound design, extracting 10 entities and 9 relationships. Query returned accurate response identifying Serum, OTT, and Valhalla Room. All existing services remained healthy.
|
||||
|
||||
## Verification
|
||||
|
||||
Health endpoint returns 200, container reports healthy, entity extraction returned 10 entities + 9 relations, query returned correct music production entities, all 10 existing Chrysopedia services still healthy, all 3 slice-level checks pass.
|
||||
|
||||
## Verification Evidence
|
||||
|
||||
| # | Command | Exit Code | Verdict | Duration |
|
||||
|---|---------|-----------|---------|----------|
|
||||
| 1 | `ssh ub01 'curl -sf http://localhost:9621/health'` | 0 | ✅ pass | 200ms |
|
||||
| 2 | `ssh ub01 'docker ps --filter name=chrysopedia-lightrag ... | grep -q healthy'` | 0 | ✅ pass | 300ms |
|
||||
| 3 | `ssh ub01 'curl -sf -X POST http://localhost:9621/documents/text ...'` | 0 | ✅ pass | 500ms |
|
||||
| 4 | `ssh ub01 'curl -sf -X POST http://localhost:9621/query ...'` | 0 | ✅ pass | 8000ms |
|
||||
| 5 | `docker compose config 2>&1 | grep -q chrysopedia-lightrag` | 0 | ✅ pass | 500ms |
|
||||
| 6 | `docker compose config > /dev/null 2>&1` | 0 | ✅ pass | 500ms |
|
||||
| 7 | `git check-ignore -q .env.lightrag` | 0 | ✅ pass | 10ms |
|
||||
|
||||
|
||||
## Deviations
|
||||
|
||||
Changed healthcheck from curl to Python urllib because LightRAG Docker image does not include curl.
|
||||
|
||||
## Known Issues
|
||||
|
||||
Qdrant client v1.15.1 in LightRAG image warns about server v1.13.2 mismatch but functions correctly. Files deployed via scp — ub01 repo has uncommitted changes.
|
||||
|
||||
## Files Created/Modified
|
||||
|
||||
- `docker-compose.yml`
|
||||
- `.gsd/KNOWLEDGE.md`
|
||||
|
||||
|
||||
## Deviations
|
||||
Changed healthcheck from curl to Python urllib because LightRAG Docker image does not include curl.
|
||||
|
||||
## Known Issues
|
||||
Qdrant client v1.15.1 in LightRAG image warns about server v1.13.2 mismatch but functions correctly. Files deployed via scp — ub01 repo has uncommitted changes.
|
||||
|
|
@ -99,7 +99,7 @@ services:
|
|||
networks:
|
||||
- chrysopedia
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -sf http://localhost:9621/health || exit 1"]
|
||||
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:9621/health')\" || exit 1"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue