Skip to content

Configuration

Asset reads its config from the host's environment. The host must provide the S3 vars below before mounting ApplicationAssetComponent. Keys are declared in packages/core/src/common/environments.ts (EnvironmentKeys).

1. Environment Variables

Service-specific (S3 / Minio)

NameTypeDefaultRequiredScopeDescription
APP_ENV_S3_ENDPOINTstringruntimeS3/Minio endpoint URL — passed to BunS3Helper
APP_ENV_S3_ACCESS_KEYstringruntimeS3/Minio access key
APP_ENV_S3_SECRET_KEYstringruntimeS3/Minio secret key
APP_ENV_S3_BUCKETstringunknown (fallback)runtimeDefault bucket for object/i18n routes
APP_ENV_APPLICATION_EXPLORER_URLstringruntimeBase used to absolutize bankLogoUrl in the VN bank registry

APP_ENV_S3_HOST / APP_ENV_S3_API_PORT also exist in EnvironmentKeys but are not read by @nx/asset (it uses APP_ENV_S3_ENDPOINT only).

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

FlagDefaultOwnerDescription
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:

FileSeedsIdempotentNotes
src/resources/banks-vn.jsonVN 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 kindEncryptionRead by

N/A — asset stores no per-merchant runtime configuration.

5. DI Bindings

Binding keyBound valueBound by
BindingKeys.APPLICATION_S3_STORAGE_HELPER (@nx/commerce/storage/s3-helper)BunS3Helper instanceApplicationAssetComponent.binding()

The binding key namespace is @nx/commerce (BindingKeys.BASE), inherited regardless of which host mounts the component.

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.