Prism A Service Notes
OVERVIEW
Prism A is the baseline Prism stack. Compose-time overrides live in backend.env, backend startup settings live in prism-config/config.json, and the gateway, app containers, and internal Postgres are wired through the service-local compose and nginx config.
WHERE TO LOOK
backend.env.example, for compose-time overrides such as the published gateway port.config.json.example, for the current Prism bootstrap contract that the backend reads at startup.compose.yml, for the Postgres, backend, frontend, gateway, healthchecks, and image tags.nginx.conf, for exact gateway routing.
CONVENTIONS
- Copy
config.json.exampletoprism-config/config.jsonbefore deploy. - Copy
backend.env.exampletobackend.envonly when you need non-default compose-time overrides such asPRISM_A_PORT. - Keep
PRISM_A_PORTinbackend.envwhen overriding it, and keep the bootstrapdatabase.url, auth secrets, bundle key, and CORS values aligned inprism-config/config.json. - The backend reads
PRISM_CONFIG_PATH=/etc/prism/config.jsonfrom the compose file; the mounted directory provides the steady-state startup contract and lets Prism replace the file atomically. - Old encrypted Prism bootstrap files are unsupported; replace them with the plaintext
config.jsonlayout before deploy. - Postgres stays internal-only with
expose: 5432; only the nginx gateway publishes a host port. - nginx sends
/api/,/v1/,/v1beta/,/docs,/redoc, and/openapi.jsonto backend. - nginx upgrades
/api/realtime/wsas a websocket path and sends everything else to frontend. - The gateway health endpoint is local to nginx at
/health.
ANTI-PATTERNS
- Don't edit the example file in place as the runtime file.
- Don't publish assumptions from Prism B here, because the two stacks are intentionally separate.
- Don't rename
backend.env;deploy.shlooks for that service-local env file when applying compose overrides. - Don't publish Postgres from Prism A unless you also update the root port documentation and deployment assumptions.