Environment And Production Use environment-specific config files, inheritance, environment variables, and production defaults. configure reference configure/environment-production configure/environment-production.md

Environment And Production

Use environment-specific config files, inheritance, environment variables, and production defaults.

Config selection

GraphJin uses environment-specific files:

EnvironmentFile
developmentdev.yml
productionprod.yml
agenticagentic.yml

GO_ENV=agentic requires agentic.yml; agentic configs can inherit production settings.

YAML
# config/agentic.yml
inherits: prod
mode: agentic

sources:
  - name: graphjin
    kind: graphjin
    catalog: true
    metadata: true
    access:
      roots:
        gj_catalog: authenticated
        gj_security: admin
        gj_runtime: admin
Verified by TestReadInConfigAgenticCanInheritProd serv/serv_test.go:56

Production recommendations

SettingDevelopmentProduction
modedevprod
web_uitruefalse
auth_fail_blockfalsetrue
disable_allow_listtruefalse
debugtruefalse

Verified by TestNormalizeMode core/validate_test.go:71
Verified by TestNewConfigCatalogEnabledAutoProduction serv/config_test.go:26

Production query model

Production should run reviewed saved queries and disable raw ad hoc operations unless a deployment deliberately opts out for a trusted environment.

YAML
mode: prod
disable_production_security: false

mcp:
  allow_raw_queries: false
  allow_mutations: false

Environment variables

Secrets and connection strings should come from environment variables, not checked-in config.

YAML
sources:
  - name: app
    kind: database
    type: postgres
    default: true
    connection_string: ${DATABASE_URL}
admin_secret_key: ${GJ_ADMIN_SECRET_KEY}

When updating config through the control plane, plaintext secret updates require keystore support; runtime events and errors should redact secrets before they reach the agent-facing graph.

Verified by TestHandleUpdateCurrentConfig_RejectsPlaintextSecretWithoutKeystoreKey serv/mcp_config_transaction_test.go:186
Verified by TestGraphQLControlPlaneConfigRuntimeEventsAreRedacted serv/control_plane_graphql_test.go:2234

Docs