Deployment: hbf-reports
Infrastructure config for this service. Full platform deployment:
docs/architecture/deployment.md
Runtime
- Port: 3000
- Base image: node:22 (multi-stage)
- Start command:
npm run start:prod - Health check: none defined
Required Environment Variables
| Variable | Example | Description |
|---|---|---|
| ENV | production | Environment name |
| PORT | 3000 | HTTP listening port |
| RUN_MIGRATIONS | true | Run DB migrations on startup |
| CORE_URL | http://hbf-core:8080 | hbf-core API base URL |
| CORE_TOKEN | token | Auth token for hbf-core |
| CONSOLE_URL | https://console.helvia.ai | Console frontend URL |
| DB_HOST | localhost | MySQL host |
| DB_PORT | 3306 | MySQL port |
| DB_USERNAME | root | MySQL user |
| DB_PASSWORD | secret | MySQL password |
| DB_NAME | hbf-reports | MySQL database name |
| DB_LOGGING | false | Enable TypeORM query logging |
| EMAIL_HOST | smtp.example.com | SMTP host |
| EMAIL_PORT | 587 | SMTP port |
| EMAIL_SECURE | false | Use TLS for SMTP |
| EMAIL_USERNAME | user | SMTP username |
| EMAIL_PASSWORD | pass | SMTP password |
| EMAIL_FROM_ADDRESS | noreply@helvia.ai | Sender email address |
| EMAIL_FROM_NAME | Helvia | Sender display name |
| PINO_LOGGER_USE | true | Enable Pino logger |
| PINO_LOGGER_LEVEL | info | Pino log level |
| ELASTIC_APM_ACTIVE | true | Enable Elastic APM |
| ELASTIC_APM_SERVER_URL | http://apm:8200 | APM server URL |
| ELASTIC_APM_SECRET_TOKEN | token | APM auth token |
| ELASTIC_APM_SERVICE_NAME | hbf-reports | APM service identifier |
| ELASTIC_APM_ENVIRONMENT | production | APM environment label |
Docker
# Build
docker build -t hbf-reports .
# Run (local dev)
docker compose up
docker-compose includes MySQL 8.0.34 (DB name: hbf-reports).
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
- Sends scheduled report emails via SMTP.
- Supports Elastic APM for distributed tracing and performance monitoring.