-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed as not planned
Labels
Description
Module
PostgreSQL
Proposal
When attempting to utilize a Bitnami PostgreSQL container within a Spring Boot application's test environment (specifically, with Testcontainers), we're encountering an issue related to custom configuration.
The core problem arises from the necessity to set the fsync=off parameter for PostgreSQL. It looks like that Bitnami's version does not support this configuration, or at least the entrypoint cannot handle it.
Below is the sample which I want to work with testcontainers.
Map<String, String> envMap = new HashMap<>();
envMap.put("POSTGRESQL_REPLICATION_MODE", "slave");
envMap.put("POSTGRESQL_REPLICATION_USER", "repl_user");
envMap.put("POSTGRESQL_REPLICATION_PASSWORD", "repl_password");
envMap.put("POSTGRESQL_USERNAME", "postgres_write");
envMap.put("POSTGRESQL_PASSWORD", "postgres_write");
PostgreSQLContainer<?> slave =
new PostgreSQLContainer<>(
DockerImageName.parse("bitnami/postgresql:latest")
.asCompatibleSubstituteFor("postgres"))
.withEnv(envMap)Request to support bitnami version of postgresql