Documentation navigation

Build a twin

Configuration

Configure feeds, modelling and access without embedding a region in code.

On this page

Configuration files#

Copy .env.example to .env in the twin repository. Set GIS_REGION_CONFIG to a region YAML file. Docker Compose reads .env; the website does not read it.

Never commit deployment secrets. Use .env.example as the inventory of published environment settings and inspect the module source for additional model settings and defaults.

Main settings#

SettingPurpose
GIS_REGION_CONFIGGIS catalogue, layers and extent
MARKET_DISPATCH_URL, MARKET_REGIONMarket adapter endpoint and region identifier
HYDRO_URL, HYDRO_SITESHydrometry endpoint and selected gauges
STORAGE_URL, STORAGE_BBOXStorage endpoint and local extent filter
CONSOLE_PORT, CONSOLE_BASEMAPLocal console port and optional starting basemap
SIM_MAX_PIPES, SIM_MAX_SNAP_MSupplied subgraph cap and reservoir snap limit
SIM_RESIDUAL_MIN_SAMPLESMinimum residual baseline count
SIM_RESULT_RETENTION_HOURSPer-element result retention

Changing the model subgraph settings requires applying them to both the seeder and simulator, then reseeding and rebuilding. Reseeding replaces synthetic registries.

Console secrets#

bash
./scripts/init-secrets.sh

Add --totp when you want an authenticator secret. The script fills blank entries without printing the secrets. Public admin access requires the password hash, relay URL and separate admin token. Set secure cookies for an HTTPS deployment and configure allowed hosts appropriately.

External Elasticsearch#

Use ELASTICSEARCH_URL, network, credentials and CA settings for an existing cluster. Run scripts/elk-up.sh to select and validate the target. A TLS or authentication error needs correction; do not bypass the script by starting Logstash directly.

Flink SQL does not substitute environment variables. Its JDBC URL and credentials in flink/sql/02_sinks.sql must agree with Compose. Logstash does support environment substitution. Changing .env alone does not rewrite Flink SQL.

Repository documentation snapshot, source-checked 2 November 2026. Commands describe the twin repository; runtime availability has not been assessed by this website.