Skip to main content

Deployment: hbf-nlp

Infrastructure config for this service. Full platform deployment: docs/architecture/deployment.md

Runtime

  • Port: 3000 (docker-compose) / 2055 (NestJS SERVICE_PORT)
  • Base image: node:22-slim (multi-stage)
  • Start command: npm run start:prod
  • Health check: none defined

Required Environment Variables

VariableExampleDescription
SERVICE_PORT2055NestJS listen port
SERVICE_LOG_LEVELApplication log level
HBF_CORE_URLCore service base URL
HBF_CORE_API_TOKENAuth token for core service
AZURE_OPENAI_ENDPOINTAzure OpenAI endpoint URL
AZURE_OPENAI_DEPLOYMENT_NAMEgpt-4o-miniAzure OpenAI deployment name
AZURE_OPENAI_API_VERSIONAzure OpenAI API version
AZURE_OPENAI_API_KEYAzure OpenAI API key
SESSION_ANALYSIS_DEFAULT_MODELDefault model for session analysis
LLM_API_VERSIONLLM API version
JWT_SECRETJWT signing secret
CACHE_REDIS_ENABLEDEnable Redis caching
CACHE_REDIS_URLRedis connection URL
CACHE_TTLCache TTL in seconds
PINO_LOGGER_USEEnable Pino structured logging
PINO_LOGGER_LEVELLog level
NOTIFICATIONS_SERVICE_URLNotification service base URL
NOTIFICATION_SERVICE_API_TOKENAuth token for notification service
TYPEORM_CONNECTIONmysqlTypeORM connection type
TYPEORM_HOSTMySQL host
TYPEORM_PORTMySQL port
TYPEORM_USERNAMEMySQL username
TYPEORM_PASSWORDMySQL password
TYPEORM_DATABASEnlpMySQL database name
TYPEORM_AUTORUN_MIGRATIONSRun migrations on startup

Docker

# Build
docker build -t hbf-nlp .

# Run (local dev)
docker compose up

docker-compose runs the service only (env vars loaded from .env file).

CI/CD

  • Trigger: push to main/staging/develop
  • Steps: SonarQube audit -> Docker build -> Push to ECR -> Deploy to EKS
  • Deploy target: AWS EKS (helvia-dev, helvia-stg, helvia)
  • Rollout timeout: 900s (longer than the standard 600s)

Notes

  • Uses Azure OpenAI for LLM inference (NLU pipeline, session analysis).
  • Connects to MySQL for NLU pipeline configuration storage.
  • docker-compose exposes port 3000, but NestJS listens on SERVICE_PORT (2055 by default).
  • 900s rollout timeout due to longer startup or migration time.