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; seesrc/controllers/health.controller.ts)
Required Environment Variables
| Variable | Example | Description |
|---|---|---|
| PORT | 3000 (docker-compose: 3030) | HTTP listen port |
| ENV | development | Environment name |
| CORE_URL | hbf-core base URL | |
| CORE_TOKEN | Auth token for core service | |
| DB_HOST | hbf-media-manager-db | MySQL host |
| DB_USERNAME | root | MySQL username |
| DB_PASSWORD | MySQL password | |
| DB_NAME | hbf-media-manager | MySQL database name |
| DB_PORT | 3306 | MySQL port |
| AWS_S3_BUCKET_NAME | S3 bucket for media storage | |
| AWS_ACCESS_KEY | AWS access key | |
| AWS_SECRET_ACCESS_KEY | AWS secret key | |
| AWS_REGION | AWS region | |
| AWS_S3_URL | S3 endpoint URL (for custom/MinIO endpoints) | |
| MAX_IMAGE_SIZE | Maximum image upload size in bytes | |
| MAX_VIDEO_SIZE | Maximum video upload size in bytes | |
| MAX_AUDIO_SIZE | Maximum audio upload size in bytes | |
| PINO_LOGGER_USE | false | Enable Pino structured logging |
| PINO_LOGGER_LEVEL | debug | Log level |
| PINO_LOGGER_AUTO_LOGGING | false | Enable/disable automatic request logging |
| ELASTIC_APM_ACTIVE | false | Enable Elastic APM agent |
| ELASTIC_APM_SERVER_URL | APM server URL | |
| ELASTIC_APM_SECRET_TOKEN | APM secret token | |
| ELASTIC_APM_SERVICE_NAME | hbf-media-manager | APM service name |
| ELASTIC_APM_ENVIRONMENT | local | APM 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).