Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

PostgreSQL And Bootstrap Jobs

The supported Compose distributions use one PostgreSQL container while keeping Portal, Knowledge and operational responsibilities logically separated.

Databases and ownership

Database classTypical nameOwner
Portal control planeconfigserverPortal command/query services, OAuth and configuration services
Knowledge planeknowledgeLight Knowledge API, admin and worker identities
Operational planeoperations and optional host-specific variantsController, Workflow, Gateway, Agent, A2A and evidence publishers through bounded roles
LLM auditDeployment-specific database or operational sinkLLM audit publisher/runtime contract

Sharing a PostgreSQL container does not authorize cross-database or cross-schema queries. Service database roles carry explicit search paths and grants.

Compose services

postgres owns the durable volume. The one-shot helpers normally include:

  • knowledge-schema-migration, which installs or upgrades Knowledge objects;
  • operational-store-bootstrap, which installs the versioned operational bundle and creates bounded runtime roles;
  • operational-runtime-secrets-init, which materializes database URLs and related runtime keys into protected files where required;
  • operational-schema-validation, which verifies the expected database, schema generation and grants before runtime services start; and
  • config-cache/artifact initialization jobs needed to correct volume ownership.

The runtime services should depend on successful completion of the relevant bootstrap and validation jobs, not merely on the PostgreSQL TCP port opening.

Important environment variables

VariableSecretPurpose
POSTGRES_PASSWORDYesPostgreSQL administrative bootstrap password.
PORTAL_DB_NAMENoPortal database name.
PORTAL_DB_KNOWLEDGE_NAMENoKnowledge database name.
PORTAL_DB_OPERATIONAL_NAMESNoOperational database set created for the deployment.
PORTAL_DB_TOPOLOGYNoSelects the supported logical layout.
OPERATIONAL_BUNDLE_VERSIONNoRequired migration bundle version.
OPERATIONAL_CONTRACT_GENERATIONNoMinimum operational contract generation.
OPERATIONAL_DATABASE_URL, WORKFLOW_DATABASE_URL, GATEWAY_DATABASE_URLYesRole-specific operational database credentials used during materialization.
EXECUTION_DATABASE_URL, A2A_DATABASE_URL, AUDIT_DATABASE_URL, ARTIFACT_DATABASE_URLYesAdditional bounded operational identities.

Some distributions mount secret sources; local/install distributions may inject development-only values and write protected files in an initialization step. Consumers should receive only their own URL or key.

Persistence and reset

The PostgreSQL named volume is authoritative runtime state. docker compose down preserves it; a volume-removal or deployment-specific clean flag destroys it. Recreate event-backed Portal projections through the signed event bundle and supported importer, not through direct SQL seeding.

Before a reset, identify which release bundle will be imported. Refresh and database deletion are separate actions in the deployment wrappers.