Configuration
Asset reads its config from the host's environment. The host must provide the S3 vars below before mounting
ApplicationAssetComponent. Keys are declared inpackages/core/src/common/environments.ts(EnvironmentKeys).
1. Environment Variables
Service-specific (S3 / Minio)
| Name | Type | Default | Required | Scope | Description |
|---|---|---|---|---|---|
APP_ENV_S3_ENDPOINT | string | — | ✓ | runtime | S3/Minio endpoint URL — passed to BunS3Helper |
APP_ENV_S3_ACCESS_KEY | string | — | ✓ | runtime | S3/Minio access key |
APP_ENV_S3_SECRET_KEY | string | — | ✓ | runtime | S3/Minio secret key |
APP_ENV_S3_BUCKET | string | unknown (fallback) | ✓ | runtime | Default bucket for object/i18n routes |
APP_ENV_APPLICATION_EXPLORER_URL | string | — | runtime | Base used to absolutize bankLogoUrl in the VN bank registry |
APP_ENV_S3_HOST/APP_ENV_S3_API_PORTalso exist inEnvironmentKeysbut are not read by@nx/asset(it usesAPP_ENV_S3_ENDPOINTonly).
Core / DB / Redis / Kafka
N/A — provided and consumed by the host application, not by asset. Asset only requires the S3 vars above plus whatever the host needs to bind PostgresCoreDataSource for MetaLink.
2. Feature Flags
| Flag | Default | Owner | Description |
|---|---|---|---|
| — | — | — | None. The presigned-URL StaticAssetComponent path is gated by source-level commenting, not a runtime flag |
3. Seeded Data
No DB migrations or seeds — asset has no schema of its own. Static reference data ships in the bundle:
| File | Seeds | Idempotent | Notes |
|---|---|---|---|
src/resources/banks-vn.json | VN bank/payment-provider registry | ✓ (read-only) | Re-exported as FinanceBanksVN via banks-vn.ts |
src/resources/banks-vn/*.png | ~60 bank logos | ✓ (read-only) | Served by GET /assets/banks-vn/{filename} from resources/banks-vn next to the executable |
4. Configuration Storage (Configuration table)
| Configuration kind | Encryption | Read by |
|---|---|---|
| — | — | — |
N/A — asset stores no per-merchant runtime configuration.
5. DI Bindings
| Binding key | Bound value | Bound by |
|---|---|---|
BindingKeys.APPLICATION_S3_STORAGE_HELPER (@nx/commerce/storage/s3-helper) | BunS3Helper instance | ApplicationAssetComponent.binding() |
The binding key namespace is
@nx/commerce(BindingKeys.BASE), inherited regardless of which host mounts the component.