learning_ai_invt_trdg/docker-compose.yml
Saravana Achu Mac 4cfb446f57 feat(backend): WebSocket namespaces, audit persistence, tab flags, telemetry
- Add /trading and /admin named Socket.IO namespaces; root namespace kept for
  backward compat; admin namespace rejects non-admins at connect time
- Wire auditRepository.ts: persist TradeAuditEvent to Cosmos audit-events
  container (best-effort); expose GET /api/admin/audit for admin queries
- Add tradingTelemetry singleton (Node.js Map-based storage adapter); init
  and fatal-error tracking wired in index.ts main()
- Add TAB_MARKETPLACE_ENABLED / TAB_MEMBERSHIP_ENABLED config flags; expose
  tabs.* shape in GET /api/feature-flags response
- Fix SupabaseService URL validation (regex check before createClient)
- Wire check:api-contract and check:audit-repository into npm run test
- Switch @bytelyst/* deps to file:../vendor/* references

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 19:35:00 -04:00

70 lines
2.0 KiB
YAML

# Production-mode compose.
# Usage:
# docker compose up --build
#
# Requires:
# - backend/.env populated (copy from backend/.env.example)
# - GITEA_NPM_TOKEN env var set for private @bytelyst/* registry build args
#
# For hot-reload dev mode use:
# docker compose -f docker-compose.yml -f docker-compose.dev.yml up
#
# For Docker backend + local Vite web:
# pnpm dev (or: sh scripts/dev.sh)
services:
# ---------------------------------------------------------------------------
# Backend — trading engine + REST API + Socket.IO
# ---------------------------------------------------------------------------
backend:
build:
context: .
dockerfile: backend/Dockerfile
args:
GITEA_NPM_TOKEN: ${GITEA_NPM_TOKEN:-}
container_name: invttrdg-backend
env_file:
- backend/.env
ports:
- '4025:4018'
networks:
- default
- platform_net
restart: unless-stopped
healthcheck:
test: ['CMD', 'wget', '-qO-', 'http://localhost:4018/health/live']
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
# ---------------------------------------------------------------------------
# Web — Vite SPA served via nginx
# ---------------------------------------------------------------------------
web:
build:
context: .
dockerfile: web/Dockerfile
args:
GITEA_NPM_TOKEN: ${GITEA_NPM_TOKEN:-}
VITE_PRODUCT_ID: ${VITE_PRODUCT_ID:-invttrdg}
VITE_PLATFORM_URL: ${VITE_PLATFORM_URL:-https://api.bytelyst.com/platform/api}
VITE_TRADING_API_URL: ${VITE_TRADING_API_URL:-https://api.bytelyst.com/invttrdg/api}
VITE_BACKTEST_ENABLED: ${VITE_BACKTEST_ENABLED:-true}
container_name: invttrdg-web
ports:
- '3085:3085'
networks:
- default
- platform_net
restart: unless-stopped
depends_on:
backend:
condition: service_healthy
networks:
default: {}
platform_net:
external: true
name: learning_ai_common_plat_default