fix: optional Postgres via compose-with-db overlay - #276
Conversation
017de44 to
1432f89
Compare
PR Summary by QodoFix optional PostgreSQL enablement via compose-with-db overlay
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1.
|
ac8411e to
ef01709
Compare
|
Code review by qodo was updated up to the latest commit ef01709 |
ef01709 to
aff3771
Compare
609adf1 to
3340b02
Compare
4f41462 to
d93911a
Compare
d93911a to
ea43ee6
Compare
ea43ee6 to
8fdd830
Compare
Avoid editing tracked compose.yaml for PostgreSQL by adding a compose-with-db.yaml merge file, matching other optional overlays.
Pin db image via POSTGRES_IMAGE and keep temporary POSTGRESQL_UPGRADE in a gitignored override so users never edit tracked compose-with-db.yaml.
Add a with-db matrix entry that authenticates to registry.redhat.io for docker and containerized Podman, and default POSTGRESQL_ADMIN_PASSWORD when compose interpolates it.
Avoid implying default.env can control Compose image interpolation.
Align the temporary upgrade override with compose-with-db.yaml so a missing .env password does not blank the admin password on merge.
Override POSTGRES_IMAGE like CORPORATE_PROXY_IMAGE so with-db CI works on pull_request without registry.redhat.io credentials.
Set WITH_POSTGRES on the overlay and generate backend.database config at startup so users no longer need manual app-config.local.yaml edits.
Use a shared file instead of a heredoc so docs and runtime share one source of truth, and slim the schema override example to pluginDivisionMode.
e6c99bf to
18d863d
Compare
|



Description
Fixes RHDHBUGS-1865: enabling the optional PostgreSQL service no longer requires uncommenting blocks in the default
compose.yaml(which caused merge conflicts on pull).compose-with-db.yamloverlay (same pattern ascompose-with-corporate-proxy.yaml/compose-dynamic-plugins-root.yaml)compose.yamlat the overlay instead of a commenteddbservice-f compose.yaml -f compose-with-db.yaml, including a combined example withcompose-with-corporate-proxy.yamlcompose.override.yaml+POSTGRES_IMAGE(do not edit trackedcompose-with-db.yaml)Stacked on #278 (
docs/pg16-to-pg18-upgrade) — GitHub stack #286 targetingdev.Which issue(s) does this PR fix or relate to
PR acceptance criteria
How to test changes / Special notes to the reviewer
compose.yamlfor Postgrespodman login registry.redhat.ioPOSTGRES_*into.env; switchapp-config.local.yamlfrom SQLite topgas in the guidepodman compose -f compose.yaml -f compose-with-db.yaml up -d→dbhealthy, RHDH uppodman compose -f compose.yaml -f compose-with-db.yaml -f compose-with-corporate-proxy.yaml configmergesdb+proxy+rhdh.depends_onnpx --yes dclint compose-with-db.yaml→ 0 errors