fix: expose PostgreSQL SSL options in Docker Compose - #498
Open
Shriprasad-P wants to merge 1 commit into
Open
Conversation
run_goose.py already honored SSL settings, but compose never passed them through, so sslmode and mounted cert paths could not be configured without editing the file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
Fixes #421.
run_goose.pyand the metadata service already support PostgreSQL SSLconfiguration, but
docker-compose.ymldid not forward those environmentvariables into the metadata container.
This change exposes the existing SSL settings through Compose while preserving
the current non-SSL behavior.
Supported configuration includes:
MF_METADATA_DB_SSL_MODEMF_METADATA_DB_SSL_CERT_PATHMF_METADATA_DB_SSL_KEY_PATHrun_goose.pyalso accepts the root-certificate variable used by the metadataservice so migrations and the service can use the same mounted certificate
configuration.
Custom certificate files are not bundled into the image or repository. Users
continue to mount their own certificate files and provide container paths.
This PR does not change the existing Compose database host/user/password/name
defaults. Deployments using an external PostgreSQL/RDS endpoint can continue to
override those separately.
Backward Compatibility
When SSL variables are unset or empty:
sslmode=disableMF_METADATA_DB_SSL_MODEis intentionally passed through rather than defaultedto
prefer, so existing deployments do not change behavior.Verification
docker compose -f docker-compose.yml configwith SSL variables unsetsslmode=preferand mounted certificate pathsgit diff --checkNo live AWS RDS environment was used for validation.
AI Tool Usage
AI tools were used to assist with repository inspection, implementation review,
and test planning. I reviewed and tested the final changes and take
responsibility for the submitted code.