Skip to main content

Deployment: hbf-media-manager

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

Runtime

  • Port: 3000 (default; docker-compose overrides to 3030)
  • Base image: node:22-slim (multi-stage)
  • Start command: npm run start:prod
  • Health check: GET /health (returns 200 unconditionally; see src/controllers/health.controller.ts)

Required Environment Variables

VariableExampleDescription
PORT3000 (docker-compose: 3030)HTTP listen port
ENVdevelopmentEnvironment name
CORE_URLhbf-core base URL
CORE_TOKENAuth token for core service
DB_HOSThbf-media-manager-dbMySQL host
DB_USERNAMErootMySQL username
DB_PASSWORDMySQL password
DB_NAMEhbf-media-managerMySQL database name
DB_PORT3306MySQL port
AWS_S3_BUCKET_NAMES3 bucket for media storage
AWS_ACCESS_KEYAWS access key
AWS_SECRET_ACCESS_KEYAWS secret key
AWS_REGIONAWS region
AWS_S3_URLS3 endpoint URL (for custom/MinIO endpoints)
MAX_IMAGE_SIZEMaximum image upload size in bytes
MAX_VIDEO_SIZEMaximum video upload size in bytes
MAX_AUDIO_SIZEMaximum audio upload size in bytes
PINO_LOGGER_USEfalseEnable Pino structured logging
PINO_LOGGER_LEVELdebugLog level
PINO_LOGGER_AUTO_LOGGINGfalseEnable/disable automatic request logging
ELASTIC_APM_ACTIVEfalseEnable Elastic APM agent
ELASTIC_APM_SERVER_URLAPM server URL
ELASTIC_APM_SECRET_TOKENAPM secret token
ELASTIC_APM_SERVICE_NAMEhbf-media-managerAPM service name
ELASTIC_APM_ENVIRONMENTlocalAPM environment

Docker

# Build
docker build -t hbf-media-manager .

# Run (local dev)
docker compose up

docker-compose starts MySQL 8.0.34 (database: hbf-media-manager) and the service on port 3030. Service depends_on the db 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

  • Supports Elastic APM for distributed tracing (disabled by default).