src/config.js.
Application Configuration
Service Identity
The service version, injected into your Docker container in CDP environments.Nullable: Yes
Server Configuration
The IP address to bind the server to.Format: Valid IP address
The port to bind the server to.Format: Valid port number (1-65535)
Environment
The CDP environment the application is running in.Allowed values:
local- Local developmentinfra-dev- Infrastructure developmentmanagement- Management environmentdev- Development environmenttest- Test environmentperf-test- Performance testingext-test- External testingprod- Production environment
Logging Configuration
Enable or disable logging.Default:
true (disabled in test mode)Logging level for the application.Allowed values:
fatal- Only fatal errorserror- Error messageswarn- Warning messagesinfo- Informational messagesdebug- Debug messagestrace- Trace messagessilent- No logging
Format to output logs in.Allowed values:
ecs- Elastic Common Schema format (used in production)pino-pretty- Human-readable format (used in development)
In production, sensitive paths like
req.headers.authorization, req.headers.cookie, and res.headers are automatically redacted from logs.MongoDB Configuration
URI for MongoDB connection.Format: Valid MongoDB connection stringExample:
mongodb://mongodb:27017/Database name for MongoDB.
MongoDB Options
These options are configured in code and cannot be set via environment variables:- retryWrites:
false- Disable MongoDB write retries - readPreference:
secondary- Use secondary nodes for read operations
Network Configuration
HTTP Proxy URL for outbound requests.Nullable: YesExample:
http://proxy.example.com:8080Monitoring and Observability
Enable metrics reporting.Default: Automatically enabled in production mode
CDP tracing header name for request tracking.
Authentication Configuration
URI for fetching the OpenID Connect metadata document.Used for the signup/signin policy configuration.
The expected issuer for JWT validation.Must match the issuer claim in access tokens.
FSS API Configuration
The Financial Shared Services (FSS) API is used to manage bank details.FSS API base URL for bank details operations.
API key to authenticate with the FSS API.
Base64-encoded encryption key for FSS bank details.
Business Configuration
Fiscal year range displayed to the frontend.Format:
YYYY to YYYYAuthorization Configuration
Role-based access control for various operations. Each variable accepts an array of role codes.Permission roles allowed to view full bank details.Format: JSON array of role codesExample:
["CEO", "CFO"]Permission roles allowed to confirm bank details.Format: JSON array of role codes
Permission roles allowed to create bank details.Format: JSON array of role codes
Permission roles allowed to list finance documents.Format: JSON array of role codes
Permission roles allowed to access finance documents.Format: JSON array of role codes
Environment Variable Examples
All configuration is validated on application startup using Convict. Invalid values will cause the application to fail to start with a validation error.
Next Steps
- Learn about Docker Deployment
- Set up Docker Compose for local development