gigafibre-fsm/services/targo-hub/docker-compose.yml
louispaulb 607ea54b5c refactor: reduce token count, DRY code, consolidate docs
Backend services:
- targo-hub: extract deepGetValue to helpers.js, DRY disconnect reasons
  lookup map, compact CAPABILITIES, consolidate vision.js prompts/schemas,
  extract dispatch scoring weights, trim section dividers across 9 files
- modem-bridge: extract getSession() helper (6 occurrences), resetIdleTimer(),
  consolidate DM query factory, fix duplicate username fill bug, trim headers
  (server.js -36%, tplink-session.js -47%, docker-compose.yml -57%)

Frontend:
- useWifiDiagnostic: extract THRESHOLDS const, split processDiagnostic into
  6 focused helpers (processOnlineStatus, processWanIPs, processRadios,
  processMeshNodes, processClients, checkRadioIssues)
- EquipmentDetail: merge duplicate ROLE_LABELS, remove verbose comments

Documentation (17 → 13 files, -1,400 lines):
- New consolidated README.md (architecture, services, dependencies, auth)
- Merge ECOSYSTEM-OVERVIEW into ARCHITECTURE.md
- Merge MIGRATION-PLAN + ARCHITECTURE-COMPARE + FIELD-GAP + CHANGELOG → MIGRATION.md
- Merge COMPETITIVE-ANALYSIS into PLATFORM-STRATEGY.md
- Update ROADMAP.md with current phase status
- Delete CONTEXT.md (absorbed into README)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 08:39:58 -04:00

44 lines
1.3 KiB
YAML

services:
targo-hub:
image: node:20-alpine
container_name: targo-hub
working_dir: /app
volumes:
- ./server.js:/app/server.js:ro
- ./lib:/app/lib:ro
- ./public:/app/public:ro
- ./package.json:/app/package.json:ro
- ./data:/app/data
- hub_modules:/app/node_modules
command: sh -c "npm install --production 2>&1 | tail -1 && node server.js"
env_file: .env
restart: unless-stopped
networks:
- proxy
- erpnext_erpnext
- oktopus_oktopus
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
# Main router — webhooks + send + health (no auth)
- "traefik.http.routers.targo-hub.rule=Host(`msg.gigafibre.ca`)"
- "traefik.http.routers.targo-hub.entrypoints=websecure"
- "traefik.http.routers.targo-hub.tls.certresolver=letsencrypt"
- "traefik.http.services.targo-hub.loadbalancer.server.port=3300"
# Disable response buffering for SSE
- "traefik.http.middlewares.sse-headers.headers.customresponseheaders.X-Accel-Buffering=no"
- "traefik.http.routers.targo-hub.middlewares=sse-headers"
volumes:
hub_modules:
networks:
proxy:
external: true
erpnext_erpnext:
external: true
oktopus_oktopus:
external: true