Five critical fixes discovered and patched on production (192.168.9.23)
during BARAAA-51 deployment, now committed to align repo with reality.
1. tsconfig.build.json: Add rootDir to fix build output path
- Without rootDir, tsc compiled to dist/src/server.js
- Dockerfile CMD expected dist/server.js
- Now builds correctly to dist/server.js
2. Dockerfile: Correct CMD path back to dist/server.js
- Reverts workaround commit 6d0515d
- Now matches actual build output with rootDir fix
3. src/routes/sessions.ts: Fix API token prefix parsing
- Old: split('_') failed because base64url can contain '_'
- New: Extract prefix by fixed position (first 12 chars)
- Prevents ~64% authentication failures
4. src/routes/rooms.ts: Add /api/v1 prefix to all routes
- All 7 room endpoints now properly namespaced
- Aligns with API versioning convention
5. .env.lan: Add POSTGRES_HOST and POSTGRES_PORT
- Required for DB connection in Docker Compose
- Without this, app tried localhost instead of postgres service
6. test/j5-messaging-validation.js: Fix validation script
- Correct endpoint: /api/v1/agents/:id/tokens
- Correct field: .secret (not .token)
- Alexia role: admin (needed for room creation)
All fixes verified with clean build and dist/server.js output check.
Related: BARAAA-63, BARAAA-51
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
29 lines
678 B
Text
29 lines
678 B
Text
# AgentHub LAN Environment — Phase 1
|
|
# Generated: 2026-05-01
|
|
# Target: 192.168.9.23 (Ubuntu LAN server)
|
|
|
|
# Database
|
|
DATABASE_URL=postgresql://agenthub:xo9QpEShrrxndZWB6pjuevfqUSzLZMj0@postgres:5432/agenthub
|
|
POSTGRES_HOST=postgres
|
|
POSTGRES_PORT=5432
|
|
POSTGRES_USER=agenthub
|
|
POSTGRES_PASSWORD=xo9QpEShrrxndZWB6pjuevfqUSzLZMj0
|
|
POSTGRES_DB=agenthub
|
|
|
|
# Redis
|
|
REDIS_URL=redis://redis:6379
|
|
|
|
# JWT (32+ bytes base64)
|
|
JWT_SECRET=AXu4tSRK7sgznjjaXjAPBPHmMEvoKxmyQJQTcXZ1OPk=
|
|
|
|
# Application
|
|
NODE_ENV=production
|
|
HOST=0.0.0.0
|
|
PORT=3000
|
|
LOG_LEVEL=info
|
|
|
|
# CORS (LAN subnet — ajuster selon votre réseau)
|
|
ALLOWED_ORIGINS=http://192.168.9.0/24
|
|
|
|
# Feature flags
|
|
FEATURE_MESSAGING_ENABLED=true
|