GeezerVison is showing github.com — Add SSL support for postgres containers by cristianrgreco · Pull Request #1224 · testcontainers/testcontainers-node
Conversation
Summary
- add opt-in SSL helpers to
PostgreSqlContainer: withSSL(certFile, keyFile, caCertFile?) and withSSLCert(caCertFile, certFile, keyFile)
- copy SSL material into the container and use a small entrypoint wrapper to fix postgres file ownership before startup
- enable postgres SSL via
-c flags only when SSL is configured
- add SSL integration coverage for postgres + postgis + pgvector + timescale variants
- add test cert fixtures plus a
test-certs/generate-certs.sh script and docs note/example
Verification
npm test -- packages/modules/postgresql/src/postgresql-container.test.ts packages/modules/postgresql/src/postgresql-container-snapshot.test.ts packages/modules/postgresql/src/postgis-container.test.ts packages/modules/postgresql/src/pgvector-container.test.ts packages/modules/postgresql/src/timescale-container.test.ts
- Coverage includes:
- PostgreSQL base container
- Snapshot/restore behavior
- PostGIS variant
- PGVector variant
- Timescale variant
Result
- Test files: 5 passed
- Tests: 21 passed
Closes #1113
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
netlify
Bot
commented
Feb 17, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
cristianrgreco
changed the title
feat(postgresql): add opt-in SSL support for postgres containers
Add opt-in SSL support for postgres containers
Feb 17, 2026
cristianrgreco
changed the title
Add opt-in SSL support for postgres containers
Add SSL support for postgres containers
Feb 17, 2026
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.