docs(devops): fix 15 bugs/gaps in single-VM deployment guide — add 4 missing web services, update stale references
This commit is contained in:
parent
0502dead68
commit
a92373adec
@ -1,6 +1,6 @@
|
||||
# ByteLyst Ecosystem — Single-VM Deployment Guide
|
||||
|
||||
> Deploy the **entire** ByteLyst ecosystem on one VM, fully Dockerized, with a K3s Kubernetes layer for production-readiness practice.
|
||||
> Deploy the **entire** ByteLyst ecosystem on one VM, fully Dockerized, with a local Kubernetes layer (Docker Desktop or K3s) for production-readiness practice.
|
||||
|
||||
---
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
- Cosmos Emulator: ~2 GB
|
||||
- 10 Fastify backends × 150 MB = ~1.5 GB
|
||||
- 3 shared services × 250 MB = ~0.75 GB
|
||||
- 10 Next.js webs × 200 MB = ~2 GB
|
||||
- 11 Next.js webs × 200 MB = ~2.2 GB
|
||||
- Infra (Traefik, Loki, Grafana, Azurite, Mailpit) = ~0.65 GB
|
||||
- K3s overhead = ~0.5 GB
|
||||
- **Subtotal: ~7.4 GB** → headroom for spikes + build cache = **32 GB**
|
||||
@ -112,7 +112,7 @@
|
||||
|
||||
### Phase 1: Docker Compose (after prerequisite work)
|
||||
|
||||
> **⚠️ Prerequisite:** 6 repos need Dockerfiles created, 3 webs need `output: 'standalone'` in next.config.ts, and ALL product repos must run `docker-prep.sh` before building (see §12 Audit Findings).
|
||||
> **⚠️ Prerequisite:** ALL product repos must run `docker-prep.sh` before building Docker images (see §12 Audit Findings). All Dockerfiles and `output: 'standalone'` configs are now in place (completed 2026-03-22).
|
||||
|
||||
Create a **unified** `docker-compose.ecosystem.yml` that brings everything up.
|
||||
|
||||
@ -158,10 +158,11 @@ Create `docker-compose.ecosystem.yml` at workspace root (`~/code/mygh/`) that co
|
||||
# Pack @bytelyst/* file: dependencies into tarballs for each product repo.
|
||||
# Every product repo has file: refs to ../learning_ai_common_plat/packages/*
|
||||
# which don't resolve inside Docker build context. docker-prep.sh packs them.
|
||||
for repo in learning_ai_trails learning_ai_local_memory_gpt learning_ai_notes learning_ai_fastgap; do
|
||||
for repo in learning_voice_ai_agent learning_multimodal_memory_agents learning_ai_clock \
|
||||
learning_ai_jarvis_jr learning_ai_peakpulse learning_ai_flowmonk \
|
||||
learning_ai_fastgap learning_ai_notes learning_ai_trails learning_ai_local_memory_gpt; do
|
||||
(cd $repo && ./scripts/docker-prep.sh)
|
||||
done
|
||||
# Repos without docker-prep.sh yet need it created (see §12 Audit Findings)
|
||||
```
|
||||
|
||||
```yaml
|
||||
@ -269,7 +270,7 @@ services:
|
||||
# Others use backend/ subdir context.
|
||||
# ══════════════════════════════════════════════════════
|
||||
lysnrai-backend:
|
||||
build: ./learning_voice_ai_agent/backend # Needs Dockerfile (missing)
|
||||
build: ./learning_voice_ai_agent/backend
|
||||
ports: ['4015:4015']
|
||||
env_file: [.env.ecosystem]
|
||||
environment: { PORT: '4015', SERVICE_NAME: lysnrai-backend }
|
||||
@ -277,7 +278,7 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
mindlyst-backend:
|
||||
build: ./learning_multimodal_memory_agents/backend # Needs Dockerfile (missing)
|
||||
build: ./learning_multimodal_memory_agents/backend
|
||||
ports: ['4014:4014']
|
||||
env_file: [.env.ecosystem]
|
||||
environment: { PORT: '4014', SERVICE_NAME: mindlyst-backend }
|
||||
@ -285,7 +286,7 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
chronomind-backend:
|
||||
build: ./learning_ai_clock/backend # Needs Dockerfile (missing)
|
||||
build: ./learning_ai_clock/backend
|
||||
ports: ['4011:4011']
|
||||
env_file: [.env.ecosystem]
|
||||
environment: { PORT: '4011', SERVICE_NAME: chronomind-backend }
|
||||
@ -293,7 +294,7 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
jarvisjr-backend:
|
||||
build: ./learning_ai_jarvis_jr/backend # Needs Dockerfile (missing)
|
||||
build: ./learning_ai_jarvis_jr/backend
|
||||
ports: ['4012:4012']
|
||||
env_file: [.env.ecosystem]
|
||||
environment: { PORT: '4012', SERVICE_NAME: jarvisjr-backend }
|
||||
@ -309,7 +310,7 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
peakpulse-backend:
|
||||
build: ./learning_ai_peakpulse/backend # Needs Dockerfile (missing)
|
||||
build: ./learning_ai_peakpulse/backend
|
||||
ports: ['4010:4010']
|
||||
env_file: [.env.ecosystem]
|
||||
environment: { PORT: '4010', SERVICE_NAME: peakpulse-backend }
|
||||
@ -317,7 +318,7 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
flowmonk-backend:
|
||||
build: ./learning_ai_flowmonk/backend # Needs Dockerfile (missing)
|
||||
build: ./learning_ai_flowmonk/backend
|
||||
ports: ['4017:4017']
|
||||
env_file: [.env.ecosystem]
|
||||
environment: { PORT: '4017', SERVICE_NAME: flowmonk-backend }
|
||||
@ -416,8 +417,42 @@ services:
|
||||
depends_on: [notelett-backend]
|
||||
restart: unless-stopped
|
||||
|
||||
# Remaining webs need Dockerfiles + output:'standalone' in next.config.ts:
|
||||
# chronomind-web (3051), jarvisjr-web (3052), flowmonk-web (3053), mindlyst-web (3050)
|
||||
chronomind-web:
|
||||
build: ./learning_ai_clock/web
|
||||
ports: ['3051:3000'] # Internal 3000 → external 3051
|
||||
environment:
|
||||
NEXT_PUBLIC_BACKEND_URL: http://chronomind-backend:4011
|
||||
NEXT_PUBLIC_PLATFORM_SERVICE_URL: http://platform-service:4003
|
||||
depends_on: [chronomind-backend]
|
||||
restart: unless-stopped
|
||||
|
||||
jarvisjr-web:
|
||||
build: ./learning_ai_jarvis_jr/web
|
||||
ports: ['3052:3000'] # Internal 3000 → external 3052
|
||||
environment:
|
||||
NEXT_PUBLIC_BACKEND_URL: http://jarvisjr-backend:4012
|
||||
NEXT_PUBLIC_PLATFORM_SERVICE_URL: http://platform-service:4003
|
||||
depends_on: [jarvisjr-backend]
|
||||
restart: unless-stopped
|
||||
|
||||
flowmonk-web:
|
||||
build: ./learning_ai_flowmonk/web
|
||||
ports: ['3053:3000'] # Internal 3000 → external 3053
|
||||
environment:
|
||||
NEXT_PUBLIC_BACKEND_URL: http://flowmonk-backend:4017
|
||||
NEXT_PUBLIC_PLATFORM_SERVICE_URL: http://platform-service:4003
|
||||
depends_on: [flowmonk-backend]
|
||||
restart: unless-stopped
|
||||
|
||||
mindlyst-web:
|
||||
build: ./learning_multimodal_memory_agents/mindlyst-native/web
|
||||
ports: ['3050:3050']
|
||||
environment:
|
||||
PORT: 3050 # package.json sets -p 3050
|
||||
NEXT_PUBLIC_BACKEND_URL: http://mindlyst-backend:4014
|
||||
NEXT_PUBLIC_PLATFORM_SERVICE_URL: http://platform-service:4003
|
||||
depends_on: [mindlyst-backend]
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
azurite-data:
|
||||
@ -426,7 +461,7 @@ volumes:
|
||||
localmemgpt-data:
|
||||
```
|
||||
|
||||
### 4.2 Phase 2 — K3s (Single-Node Kubernetes)
|
||||
### 4.2 Phase 2 — Local Kubernetes (Docker Desktop or K3s)
|
||||
|
||||
#### Install K3s on the VM
|
||||
|
||||
@ -759,7 +794,7 @@ kubectl get pods -A
|
||||
|
||||
---
|
||||
|
||||
## 10. What's NOT Dockerized Yet (gaps)
|
||||
## 10. Dockerization Status (all complete)
|
||||
|
||||
| Repo | Backend Dockerfile | Web Dockerfile | `docker-prep.sh` | `output:'standalone'` | Status |
|
||||
| --------------- | ------------------ | ------------------- | ---------------- | --------------------- | ------------------------------------ |
|
||||
@ -780,7 +815,7 @@ kubectl get pods -A
|
||||
|
||||
---
|
||||
|
||||
## 11. Dockerfile Template (for missing repos)
|
||||
## 11. Dockerfile Template (reference)
|
||||
|
||||
> **Critical:** These templates assume you run `docker-prep.sh` first to pack `@bytelyst/*` file: deps into `.tarballs/`. Without this, `npm ci` will fail because `file:../../learning_ai_common_plat/packages/*` doesn't exist inside the Docker build context.
|
||||
|
||||
@ -887,8 +922,7 @@ Systematic code review of all claims in this document against the actual codebas
|
||||
2. Packs each `@bytelyst/*` package into a `.tarballs/*.tgz`
|
||||
3. Rewrites package.json `file:` refs → `file:.tarballs/bytelyst-*.tgz`
|
||||
|
||||
**Repos with `docker-prep.sh`:** ActionTrail ✅, LocalMemGPT ✅, NoteLett ✅, NomGap ✅
|
||||
**Repos missing `docker-prep.sh`:** LysnrAI, MindLyst, ChronoMind, JarvisJr, PeakPulse, FlowMonk
|
||||
**All 10 repos now have `docker-prep.sh`** (created 2026-03-22). Previously only ActionTrail, LocalMemGPT, NoteLett, NomGap had them.
|
||||
|
||||
### F3. NomGap Backend Dockerfile Ignores `file:` Deps (BUG)
|
||||
|
||||
@ -911,10 +945,10 @@ The Dockerfile template copies from `.next/standalone/` — this directory only
|
||||
| admin-web | ✅ | Conditional: `process.env.VERCEL ? {} : { output: 'standalone' }` |
|
||||
| tracker-web | ✅ | Conditional (same) |
|
||||
| user-dashboard | ✅ | Conditional (same) |
|
||||
| ChronoMind | ❌ | **Must add** |
|
||||
| JarvisJr | ❌ | **Must add** |
|
||||
| FlowMonk | ❌ | **Must add** |
|
||||
| MindLyst | ❌ | Unknown — needs check |
|
||||
| ChronoMind | ✅ | Added 2026-03-22 (conditional) |
|
||||
| JarvisJr | ✅ | Added 2026-03-22 (conditional) |
|
||||
| FlowMonk | ✅ | Added 2026-03-22 (conditional) |
|
||||
| MindLyst | ✅ | Added 2026-03-22 (conditional) |
|
||||
|
||||
### F6. Build Context Mismatch for ActionTrail + LocalMemGPT
|
||||
|
||||
@ -1285,6 +1319,6 @@ esac
|
||||
| ------------------------------ | -------------------------------------------------------------------------------------------------------------- |
|
||||
| **Can deploy on single VM?** | **Yes.** All ~25 services fit in 32 GB RAM. |
|
||||
| **All Dockerized?** | **Yes.** All 10 product repos now have Dockerfiles + docker-prep.sh. |
|
||||
| **K8s practice on single VM?** | **K3s** — certified K8s, single binary, same manifests scale to multi-node or AKS/EKS/GKE. |
|
||||
| **K8s practice on single VM?** | **Docker Desktop K8s** (Mac/Windows) or **K3s** (Linux). Same manifests scale to AKS/EKS/GKE. |
|
||||
| **Recommended VM?** | 8 vCPU / 32 GB (min) or 16 vCPU / 64 GB (with Ollama). Hetzner ~$45/mo for dev. |
|
||||
| **Time to production K8s?** | Phase 1 (compose) → Phase 2 (K3s single) → Phase 3 (K3s multi) → Phase 4 (managed). Same manifests throughout. |
|
||||
| **Time to production K8s?** | Phase 1 (compose) → Phase 2 (Docker Desktop / K3s) → Phase 3 (multi-node) → Phase 4 (managed). Same manifests. |
|
||||
|
||||
Loading…
Reference in New Issue
Block a user