Skip to main content

Deployment: hbf-stats

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

Runtime

  • Port: configurable via SERVICE_PORT (no default exposed in docker-compose)
  • Base image: node:18 / node:18-slim (multi-stage)
  • Start command: npm run start
  • Health check: none defined

Required Environment Variables

VariableExampleDescription
CORE_URLhttp://hbf-core:8080hbf-core API base URL
CORE_TOKENtokenAuth token for hbf-core
STATS_LIFESPAN_MINUTES60Stats aggregation window
EXECUTION_TIME_INTERVAL_MILLISECONDS30000Main loop interval
BATCH_SIZE100Tenants per batch
BATCH_COOLDOWN_SECONDS5Pause between batches
PINO_LOGGER_USEtrueEnable Pino logger
PINO_LOGGER_LEVELinfoPino log level
PINO_LOGGER_AUTO_LOGGINGtrueAuto-log HTTP requests
SERVICE_PORT3000HTTP listening port (optional)
NUMBER_OF_TENANTS_TO_BE_UPDATED10Max tenants updated per cycle

Docker

# Build
docker build -t hbf-stats .

# Run (local dev)
docker compose up

docker-compose defines the service only (no ports mapped, no database container).

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)

Notes

  • Daemon process with an infinite loop. No HTTP endpoints exposed by default.
  • Aggregates stats by calling hbf-core API in configurable batches.
  • SERVICE_PORT is optional and only relevant if HTTP health checks are needed in K8s.