Setup
Use this page to apply your configuration and verify startup.
Pass Configuration
There are two ways to pass the configuration to the engine:
Environment Variable (JSON)
Pass the full JSON value directly in BSH_CONFIG:
export BSH_CONFIG='{"env":"PROD","datasource":{...},...}'services:
engine:
image: 'bshsolutions/engine'
environment:
- 'BSH_CONFIG={"env":"PROD","datasource":{...},...}'More secure ways to pass the configuration will be added as development progresses.
Validation
The engine validates the configuration at startup. The following fields are required:
- datasource.url (or host + database combination)
- datasource.user
- datasource.password
- admin.email
If any required field is missing, the engine fails to start with a SERVICE_UNAVAILABLE error indicating which fields are missing.
Security Best Practices
Follow these security guidelines when configuring your BSH Engine instance.
- Never commit real configuration credentials to version control.
- Use environment variables or a secret manager in production.
- Restrict CORS origins to specific domains in production.
- Use strong JWT secrets (at least 256 bits).
- Use app-specific passwords for email services.
- Rotate credentials regularly.