Skip to main content

Configuration Reference

All configuration surfaces in Konsolidat, from environment variables to dbt project settings to Excel workbook properties.

Environment Variables (.env)

Read by docker-compose.yml (and docker-compose.cluster.yml) and can be overridden at runtime. Copy .env.example to .env, or run ./deploy.sh, which auto-generates .env with random secrets on first run.

Required secrets

Four variables are guarded in docker-compose.yml with ${VAR:?...} and have no fallback — the stack refuses to start until they are set: CLICKHOUSE_PASSWORD, DB_ROOT_PASSWORD, ADMIN_PASSWORD, and CUBEJS_API_SECRET. Run ./deploy.sh to generate them. The placeholder values in .env.example are intentionally non-functional.

Frappe

VariableDefaultRequiredDescription
ADMIN_PASSWORDadmin123 (placeholder)Frappe Administrator password (:? guarded in compose)
SITE_NAMEkonsolidat.localFrappe site name; also used in the backend health-check Host header
FRAPPE_PORT8069Host port mapped to the Frappe backend
FRAPPE_BRANCHversion-15Frappe Framework branch to build

MariaDB

VariableDefaultRequiredDescription
DB_ROOT_PASSWORDrootpassword (placeholder)MariaDB root password (:? guarded in compose)

ClickHouse

VariableDefaultRequiredDescription
CLICKHOUSE_USERdefaultClickHouse login user
CLICKHOUSE_PASSWORDopen_epm_dev (placeholder)ClickHouse password (:? guarded; deploy.sh overwrites with a random secret)
CLICKHOUSE_HTTP_PORT8123Host port for the ClickHouse HTTP API
CLICKHOUSE_NATIVE_PORT9000Host port for the ClickHouse native protocol
EXCEL_ODBC_PORT15432Host port for the PostgreSQL wire protocol (Excel/ODBC)
CLICKHOUSE_BIND127.0.0.1Host interface the ClickHouse ports bind to. Loopback by default so the DB is not publicly exposed; set 0.0.0.0 only with TLS and a strong password
DBT_TARGETdevdbt ClickHouse transport: dev (plaintext loopback) or prod (TLS). Set prod for any networked deployment. The konsol app's own ClickHouse TLS is configured separately in EPM Settings

Cube.js

VariableDefaultRequiredDescription
CUBEJS_PORT4000Host port for the Cube.js API
CUBEJS_API_SECRETCHANGE_ME_run_deploy_sh (placeholder)Cube.js API signing secret (:? guarded in compose)
CUBEJS_DEV_MODEfalseEnables the Cube.js developer playground

Caddy reverse proxy

VariableDefaultRequiredDescription
HTTP_PORT80Host HTTP port for Caddy
HTTPS_PORT443Host HTTPS port for Caddy
SITE_DOMAINlocalhostPublic domain. Setting a real domain enables Caddy auto-SSL

Backup

VariableDefaultRequiredDescription
BACKUP_RETENTION_DAYS7Days of backups to retain
BACKUP_PATH./backupsHost directory mounted into the backup service at /backups
BACKUP_S3_BUCKET(unset)Optional S3 bucket for off-host backups

Optional overrides

These are commented out in .env.example. The D365 and Airbyte values are normally configured in the Frappe UI (EPM Settings) rather than as env vars.

VariableDescription
KONSOL_REPOOverride the konsol app Git repository URL
KONSOL_BRANCHOverride the konsol app branch
D365_TENANT_IDAzure AD tenant ID for D365 F&O
D365_CLIENT_IDD365 OAuth client ID
D365_CLIENT_SECRETD365 OAuth client secret
D365_ENVIRONMENT_URLD365 F&O environment URL
AIRBYTE_API_URLAirbyte API base URL (Airbyte installs as a separate stack via scripts/setup-airbyte.sh)

Frappe EPM Settings

A Single DocType (issingle: 1) named EPM Settings, in the Pipeline module, edited from the Frappe Desk UI. Stores connection and access-control details read by the konsol app at runtime. Defined in epm_settings.json.

ClickHouse Connection

FieldTypeDefaultDescription
clickhouse_hostDatalocalhostClickHouse server hostname
clickhouse_portData8123ClickHouse port
clickhouse_userDatadefaultClickHouse user for API queries
clickhouse_passwordPasswordClickHouse password
clickhouse_secureCheck0Use HTTPS (TLS) so credentials and results are encrypted in transit. Required over any non-loopback network
clickhouse_verify_tlsCheck1Validate the server certificate (shown only when clickhouse_secure is on). Disable only for self-signed certs on a trusted network

Airbyte Connection

FieldTypeDefaultDescription
airbyte_api_urlDatahttp://localhost:8000Airbyte API base URL
airbyte_connection_idDataAirbyte connection UUID
airbyte_client_idDataAirbyte API client ID
airbyte_client_secretPasswordAirbyte API client secret
webhook_secretPasswordShared secret for Airbyte webhook auth (X-Webhook-Secret header)

The Airbyte Sync Status section additionally exposes read-only fields last_airbyte_sync_at (Datetime), last_airbyte_sync_status (Select: Success / Failed / Partial / Running), and last_airbyte_sync_rows (Int).

D365 F&O Budget Write-Back (OAuth)

One-way push of approved budgets to D365 BudgetRegisterEntries; ClickHouse stays the source of truth.

FieldTypeDefaultDescription
enable_d365_budget_writebackCheck0Master switch for budget write-back
d365_resource_urlDataD365 resource URL, e.g. https://yourorg.operations.dynamics.com
d365_tenant_idDataAzure AD tenant ID
d365_client_idDataD365 OAuth client ID
d365_client_secretPasswordD365 OAuth client secret
d365_fiscal_year_start_monthInt1Month the D365 fiscal year begins (1=Jan, 4=Apr, 7=Jul, 10=Oct). Maps budget period numbers to OData AccountingDate. Shown only when write-back is enabled. Must match the D365 fiscal calendar for the target legal entity

dbt Configuration

FieldTypeDefaultDescription
dbt_project_pathData/home/pd/open_epm/dbt_projectAbsolute path to the dbt project directory

Access Control

Permission scoping is driven by Frappe User Permissions on the linked DocTypes. Leave a field blank to allow all authenticated users.

FieldTypeDescription
entity_permission_doctypeLink (DocType)DocType whose User Permissions restrict which entities (data areas) a user may query via the EPM API. Blank = all entities allowed
account_permission_doctypeLink (DocType)DocType (typically a Virtual DocType proxying main account categories) whose User Permissions restrict which account categories a user may write budgets for. Blank = all accounts allowed

Permission: System Manager role only (read / write / create).

dbt Project Variables (dbt_project.yml)

dimensions

A list of dimension definitions that auto-propagate through all Gold models via dimension helper macros.

vars:
dimensions:
- name: dim_cost_center
source_column: CostCenter # D365 OData field name
label: "Cost Center"
cube_type: string
in_budget: true # Include in budget models
allocation_role: cost_center # Used by allocation engine
- name: dim_department
source_column: Department
label: "Department"
cube_type: string
in_budget: true
- name: dim_business_unit
source_column: BusinessUnit
label: "Business Unit"
cube_type: string
in_budget: false

base_measures

Aggregate expressions applied in gold_trial_balance. Referenced by measure_select() and measure_passthrough() macros.

vars:
base_measures:
- name: period_debit
expression: "sum(debit_amount)"
label: "Debit"
cube_type: sum
- name: period_credit
expression: "sum(credit_amount)"
label: "Credit"
cube_type: sum
- name: period_net_amount
expression: "sum(accounting_currency_amount)"
label: "Net Amount"
cube_type: sum
- name: transaction_count
expression: "count(*)"
label: "Transaction Count"
cube_type: sum

fiscal_extra_periods

Special fiscal periods beyond the standard 1–12.

vars:
fiscal_extra_periods:
- { period: 0, label: OPN, quarter: OPN, half: OPN }
- { period: 13, label: CLS, quarter: CLS, half: CLS }

fiscal_quarter_mapping / fiscal_half_mapping

Maps fiscal period numbers to quarter/half labels. Calendar-aligned by default.

vars:
fiscal_quarter_mapping:
1: Q1
2: Q1
3: Q1
4: Q2
# ... through 12: Q4
fiscal_half_mapping:
1: H1
2: H1
# ... 6: H1, 7: H2 ... 12: H2

Model Materialization

LayerSchemaMaterializationTags
stagingstagingviewstaging
bronzebronzetablebronze
silversilvertablesilver
goldgoldtablegold

Seed Column Types

Custom column types are specified per seed in dbt_project.yml:

  • consolidation_groups: ownership_pctDecimal(5,2)
  • consolidation_adjustments: All columns typed — consolidation_group (String), fiscal_year (UInt16), fiscal_period (UInt8), debit_amount / credit_amount (Decimal(18,2)), etc.

Excel VBA Configuration

EPM_API_URL (Custom Document Property)

The VBA module reads the API base URL from a workbook-level Custom Document Property named EPM_API_URL.

PropertyTypeDefaultSet By
EPM_API_URLStringhttp://localhost:8069EPM_SetServer macro

To set programmatically: run EPM_SetServer from the Excel macro menu, or set via VBA:

ActiveWorkbook.CustomDocumentProperties.Add _
Name:="EPM_API_URL", _
LinkToContent:=False, _
Type:=msoPropertyTypeString, _
Value:="https://your-frappe-server.com"

VBA Module Constants

ConstantValueDescription
DEFAULT_API_URLhttp://localhost:8069Fallback when no Custom Document Property is set
LOG_SHEET_NAME_EPM_LogHidden sheet for debug logging

ClickHouse Databases

Created by clickhouse/init-db.sql on first startup:

DatabasePurpose
epm_bronzeAirbyte-managed raw tables
epm_stagingdbt staging views
epm_silverdbt silver tables
epm_golddbt gold tables (consumed by API)

Docker Compose Services

ServiceImagePorts
clickhouseclickhouse/clickhouse-server:24.8-alpine8123 (HTTP), 9000 (native), 15432 (PostgreSQL wire)

Volumes: clickhouse_data, clickhouse_logs Health check: clickhouse-client --query "SELECT 1" every 10s.

D365 Airbyte Connection

15 OData entities extracted with cross_company=true:

GeneralJournalAccountEntries, GeneralJournalEntries, MainAccounts, MainAccountCategories, LegalEntities, FiscalCalendars, FiscalCalendarYears, FinancialDimensions, FinancialDimensionValues, ExchangeRateCurrencyPairs, ExchangeRateTypes, BudgetRegisterEntries, BudgetTransactionLines, ConsolidationAccountGroups, LedgerTrialBalanceFiscalYearSnapshotDataEntity

Destination: ClickHouse at host.docker.internal:8123, database epm_bronze.