Skip to main content

Deployment: hbf-lcg

Ports

ProtocolPortConfig
HTTP1337SERVICE_PORT
Redis microserviceConfigurableMICROSERVICE_REDIS_HOST / MICROSERVICE_REDIS_PORT

Docker

  • Base image: node:22-slim (multi-stage build)
  • Build stage: Installs npm packages, runs npm run build
  • Runtime stage: Copies dist + node_modules, runs as node user (non-root)
  • Start command: npm run start:prod (runs node dist/src/main)
  • No docker-compose.yml: Standalone service, depends on shared MySQL and Redis from platform infra

Database

  • Engine: MySQL/MariaDB (TypeORM)
  • Database name: lcm (shared name with hbf-lcm, but different tables)
  • Auto-migrate: TYPEORM_AUTORUN_MIGRATIONS=true by default (runs migrations on startup)
  • Tables: live_chat_session, cisco_event

Environment Variables

VariableRequiredDescription
SERVICE_URLYesService base URL
SERVICE_PORTNoHTTP port (default: 1337)
HBF_CORE_URLYeshbf-core API endpoint
HBF_CORE_API_TOKENYesBearer token for hbf-core
HBF_LCM_URLYeshbf-lcm endpoint
HBF_LCM_TOKENYesBearer token for hbf-lcm
HBF_BOT_EVENT_URLYeshbf-bot event callback URL
JWT_SECRETYesJWT signing key for inbound auth
JWT_SUBYesRequired JWT subject claim
TYPEORM_CONNECTIONNoDB driver (default: mysql)
TYPEORM_HOSTYesDatabase host
TYPEORM_PORTNoDatabase port (default: 3306)
TYPEORM_USERNAMEYesDatabase user
TYPEORM_PASSWORDYesDatabase password
TYPEORM_DATABASENoDatabase name (default: lcm)
TYPEORM_AUTORUN_MIGRATIONSNoAuto-migrate on startup (default: true)
CACHE_REDIS_ENABLENoEnable Redis cache (default: false)
CACHE_REDIS_URLNoRedis URL for caching
CACHE_TTLNoCache TTL in seconds (default: 20)
MICROSERVICE_REDIS_HOSTYesRedis host for cluster coordination
MICROSERVICE_REDIS_PORTNoRedis port for cluster (default: 6379)
MICROSERVICE_REDIS_DBNoRedis DB index (default: 0)
MICROSERVICE_REDIS_USERNoRedis user
MICROSERVICE_REDIS_PASSWORDNoRedis password
MICROSERVICE_RESPONSE_TIMEOUT_MILLISNoRPC timeout (default: 5000)
MICROSERVICE_HEARTBEAT_TIMEOUT_MILLISNoHeartbeat timeout (default: 5000)
MICROSERVICE_INSTANCE_IDNoCluster instance ID (default: random UUID)
ELASTIC_APM_ACTIVENoEnable APM (default: false)
ELASTIC_APM_SERVER_URLNoAPM server URL
ELASTIC_APM_SERVICE_NAMENoAPM service name
HBF_EVENT_PUBLISHER_URLYesURL for the hbf-event-publisher service (used in publisher-client.service.ts)

Notes

  • Redis serves dual roles: optional cache (CACHE_REDIS_URL) and required cluster coordination (MICROSERVICE_REDIS_*). These can be separate Redis instances.
  • The lcm database name is shared with hbf-lcm. Both services write to the same MySQL database but manage different tables.
  • No CI/CD pipeline configured in the repo.