Skip to content

[Enhancement]: Support postgresql version of bitnami variant #9502

@rajadilipkolli

Description

@rajadilipkolli

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions