From 6fe15acc9a461ab09f76439df36175581da740a7 Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Tue, 21 Nov 2023 13:19:44 -0600 Subject: [PATCH] Add support for Bitnami environment variables. --- .../cassandra/CassandraEnvironment.java | 2 +- .../mariadb/MariaDbEnvironment.java | 3 +- .../connection/mongo/MongoEnvironment.java | 5 ++- .../connection/mysql/MySqlEnvironment.java | 3 +- .../postgres/PostgresEnvironment.java | 9 ++-- .../connection/rabbit/RabbitEnvironment.java | 5 ++- ...nectionDetailsFactoryIntegrationTests.java | 2 +- ...nectionDetailsFactoryIntegrationTests.java | 2 +- .../cassandra/CassandraEnvironmentTests.java | 10 ++++- .../mariadb/MariaDbEnvironmentTests.java | 8 ++++ .../mysql/MySqlEnvironmentTests.java | 8 ++++ .../postgres/PostgresEnvironmentTests.java | 42 ++++++++++++++++++- .../rabbit/RabbitEnvironmentTests.java | 13 ++++++ .../cassandra/cassandra-bitnami-compose.yaml | 2 +- .../cassandra/cassandra-compose.yaml | 2 +- .../mongo/mongo-bitnami-compose.yaml | 6 +-- .../postgres/postgres-bitnami-compose.yaml | 6 +-- 17 files changed, 104 insertions(+), 24 deletions(-) diff --git a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraEnvironment.java b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraEnvironment.java index 84ed5f970444..143baf3f0a9b 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraEnvironment.java +++ b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraEnvironment.java @@ -28,7 +28,7 @@ class CassandraEnvironment { private final String datacenter; CassandraEnvironment(Map env) { - this.datacenter = env.getOrDefault("CASSANDRA_DC", "datacenter1"); + this.datacenter = env.getOrDefault("CASSANDRA_DC", env.getOrDefault("CASSANDRA_DATACENTER", "datacenter1")); } String getDatacenter() { diff --git a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironment.java b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironment.java index 388d77d95281..537a55b04bb2 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironment.java +++ b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironment.java @@ -27,6 +27,7 @@ * @author Moritz Halbritter * @author Andy Wilkinson * @author Phillip Webb + * @author Scott Frederick */ class MariaDbEnvironment { @@ -52,7 +53,7 @@ private String extractPassword(Map env) { Assert.state(!env.containsKey("MYSQL_RANDOM_ROOT_PASSWORD"), "MYSQL_RANDOM_ROOT_PASSWORD is not supported"); Assert.state(!env.containsKey("MARIADB_ROOT_PASSWORD_HASH"), "MARIADB_ROOT_PASSWORD_HASH is not supported"); boolean allowEmpty = env.containsKey("MARIADB_ALLOW_EMPTY_PASSWORD") - || env.containsKey("MYSQL_ALLOW_EMPTY_PASSWORD"); + || env.containsKey("MYSQL_ALLOW_EMPTY_PASSWORD") || env.containsKey("ALLOW_EMPTY_PASSWORD"); String password = env.get("MARIADB_PASSWORD"); password = (password != null) ? password : env.get("MYSQL_PASSWORD"); password = (password != null) ? password : env.get("MARIADB_ROOT_PASSWORD"); diff --git a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mongo/MongoEnvironment.java b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mongo/MongoEnvironment.java index 9b881fdab6ca..82eabd31c934 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mongo/MongoEnvironment.java +++ b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mongo/MongoEnvironment.java @@ -26,6 +26,7 @@ * @author Moritz Halbritter * @author Andy Wilkinson * @author Phillip Webb + * @author Scott Frederick */ class MongoEnvironment { @@ -40,8 +41,8 @@ class MongoEnvironment { "MONGO_INITDB_ROOT_USERNAME_FILE is not supported"); Assert.state(!env.containsKey("MONGO_INITDB_ROOT_PASSWORD_FILE"), "MONGO_INITDB_ROOT_PASSWORD_FILE is not supported"); - this.username = env.get("MONGO_INITDB_ROOT_USERNAME"); - this.password = env.get("MONGO_INITDB_ROOT_PASSWORD"); + this.username = env.getOrDefault("MONGO_INITDB_ROOT_USERNAME", env.get("MONGO_ROOT_USERNAME")); + this.password = env.getOrDefault("MONGO_INITDB_ROOT_PASSWORD", env.get("MONGO_ROOT_PASSWORD")); this.database = env.get("MONGO_INITDB_DATABASE"); } diff --git a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironment.java b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironment.java index ceb8afe5aa0d..9b6c49420992 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironment.java +++ b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironment.java @@ -27,6 +27,7 @@ * @author Moritz Halbritter * @author Andy Wilkinson * @author Phillip Webb + * @author Scott Frederick */ class MySqlEnvironment { @@ -44,7 +45,7 @@ class MySqlEnvironment { private String extractPassword(Map env) { Assert.state(!env.containsKey("MYSQL_RANDOM_ROOT_PASSWORD"), "MYSQL_RANDOM_ROOT_PASSWORD is not supported"); - boolean allowEmpty = env.containsKey("MYSQL_ALLOW_EMPTY_PASSWORD"); + boolean allowEmpty = env.containsKey("MYSQL_ALLOW_EMPTY_PASSWORD") || env.containsKey("ALLOW_EMPTY_PASSWORD"); String password = env.get("MYSQL_PASSWORD"); password = (password != null) ? password : env.get("MYSQL_ROOT_PASSWORD"); Assert.state(StringUtils.hasLength(password) || allowEmpty, "No MySQL password found"); diff --git a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresEnvironment.java b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresEnvironment.java index 435a936e51c0..94e98eda7957 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresEnvironment.java +++ b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresEnvironment.java @@ -27,6 +27,7 @@ * @author Moritz Halbritter * @author Andy Wilkinson * @author Phillip Webb + * @author Scott Frederick */ class PostgresEnvironment { @@ -37,14 +38,14 @@ class PostgresEnvironment { private final String database; PostgresEnvironment(Map env) { - this.username = env.getOrDefault("POSTGRES_USER", "postgres"); + this.username = env.getOrDefault("POSTGRES_USER", env.getOrDefault("POSTGRESQL_USER", "postgres")); this.password = extractPassword(env); - this.database = env.getOrDefault("POSTGRES_DB", this.username); + this.database = env.getOrDefault("POSTGRES_DB", env.getOrDefault("POSTGRESQL_DB", this.username)); } private String extractPassword(Map env) { - String password = env.get("POSTGRES_PASSWORD"); - Assert.state(StringUtils.hasLength(password), "No POSTGRES_PASSWORD defined"); + String password = env.getOrDefault("POSTGRES_PASSWORD", env.get("POSTGRESQL_PASSWORD")); + Assert.state(StringUtils.hasLength(password), "PostgreSQL password must be provided"); return password; } diff --git a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/rabbit/RabbitEnvironment.java b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/rabbit/RabbitEnvironment.java index 4cc471149f4e..30b1df59121a 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/rabbit/RabbitEnvironment.java +++ b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/rabbit/RabbitEnvironment.java @@ -24,6 +24,7 @@ * @author Moritz Halbritter * @author Andy Wilkinson * @author Phillip Webb + * @author Scott Frederick */ class RabbitEnvironment { @@ -32,8 +33,8 @@ class RabbitEnvironment { private final String password; RabbitEnvironment(Map env) { - this.username = env.getOrDefault("RABBITMQ_DEFAULT_USER", "guest"); - this.password = env.getOrDefault("RABBITMQ_DEFAULT_PASS", "guest"); + this.username = env.getOrDefault("RABBITMQ_DEFAULT_USER", env.getOrDefault("RABBITMQ_USERNAME", "guest")); + this.password = env.getOrDefault("RABBITMQ_DEFAULT_PASS", env.getOrDefault("RABBITMQ_PASSWORD", "guest")); } String getUsername() { diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraBitnamiDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraBitnamiDockerComposeConnectionDetailsFactoryIntegrationTests.java index 922c555a2ba9..5f5ef695ac2a 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraBitnamiDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraBitnamiDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -49,7 +49,7 @@ void runCreatesConnectionDetails() { assertThat(node.port()).isGreaterThan(0); assertThat(connectionDetails.getUsername()).isNull(); assertThat(connectionDetails.getPassword()).isNull(); - assertThat(connectionDetails.getLocalDatacenter()).isEqualTo("dc1"); + assertThat(connectionDetails.getLocalDatacenter()).isEqualTo("testdc1"); } } diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraDockerComposeConnectionDetailsFactoryIntegrationTests.java index 8df562e23111..3b0a085a4ab8 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -48,7 +48,7 @@ void runCreatesConnectionDetails() { assertThat(node.port()).isGreaterThan(0); assertThat(connectionDetails.getUsername()).isNull(); assertThat(connectionDetails.getPassword()).isNull(); - assertThat(connectionDetails.getLocalDatacenter()).isEqualTo("dc1"); + assertThat(connectionDetails.getLocalDatacenter()).isEqualTo("testdc1"); } } diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraEnvironmentTests.java b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraEnvironmentTests.java index 9344df66548f..eeeaa4bc64a4 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraEnvironmentTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraEnvironmentTests.java @@ -36,10 +36,16 @@ void getDatacenterWhenDatacenterIsNotSet() { assertThat(environment.getDatacenter()).isEqualTo("datacenter1"); } + @Test + void getDatacenterWhenDcIsSet() { + CassandraEnvironment environment = new CassandraEnvironment(Map.of("CASSANDRA_DC", "testdc1")); + assertThat(environment.getDatacenter()).isEqualTo("testdc1"); + } + @Test void getDatacenterWhenDatacenterIsSet() { - CassandraEnvironment environment = new CassandraEnvironment(Map.of("CASSANDRA_DC", "dc1")); - assertThat(environment.getDatacenter()).isEqualTo("dc1"); + CassandraEnvironment environment = new CassandraEnvironment(Map.of("CASSANDRA_DATACENTER", "testdc1")); + assertThat(environment.getDatacenter()).isEqualTo("testdc1"); } } diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironmentTests.java b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironmentTests.java index d291bfab1d82..ef7bfab0f227 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironmentTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironmentTests.java @@ -31,6 +31,7 @@ * @author Andy Wilkinson * @author Phillip Webb * @author Jinseong Hwang + * @author Scott Frederick */ class MariaDbEnvironmentTests { @@ -130,6 +131,13 @@ void getPasswordWhenHasMariadbPasswordAndMysqlRootPassword() { assertThat(environment.getPassword()).isEqualTo("secret"); } + @Test + void getPasswordWhenHasNoPasswordAndAllowEmptyPassword() { + MariaDbEnvironment environment = new MariaDbEnvironment( + Map.of("ALLOW_EMPTY_PASSWORD", "true", "MARIADB_DATABASE", "db")); + assertThat(environment.getPassword()).isEmpty(); + } + @Test void getPasswordWhenHasNoPasswordAndMariadbAllowEmptyPassword() { MariaDbEnvironment environment = new MariaDbEnvironment( diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironmentTests.java b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironmentTests.java index 819d2ebd1359..6a18c9a8da35 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironmentTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironmentTests.java @@ -31,6 +31,7 @@ * @author Andy Wilkinson * @author Phillip Webb * @author Jinseong Hwang + * @author Scott Frederick */ class MySqlEnvironmentTests { @@ -86,6 +87,13 @@ void getPasswordWhenHasNoPasswordAndMysqlAllowEmptyPassword() { assertThat(environment.getPassword()).isEmpty(); } + @Test + void getPasswordWhenHasNoPasswordAndAllowEmptyPassword() { + MySqlEnvironment environment = new MySqlEnvironment( + Map.of("ALLOW_EMPTY_PASSWORD", "true", "MYSQL_DATABASE", "db")); + assertThat(environment.getPassword()).isEmpty(); + } + @Test void getDatabaseWhenHasMysqlDatabase() { MySqlEnvironment environment = new MySqlEnvironment( diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresEnvironmentTests.java b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresEnvironmentTests.java index 58d590de53ed..8e8e1851718b 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresEnvironmentTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresEnvironmentTests.java @@ -30,13 +30,14 @@ * @author Moritz Halbritter * @author Andy Wilkinson * @author Phillip Webb + * @author Scott Frederick */ class PostgresEnvironmentTests { @Test void createWhenNoPostgresPasswordThrowsException() { assertThatIllegalStateException().isThrownBy(() -> new PostgresEnvironment(Collections.emptyMap())) - .withMessage("No POSTGRES_PASSWORD defined"); + .withMessage("PostgreSQL password must be provided"); } @Test @@ -45,6 +46,12 @@ void getUsernameWhenNoPostgresUser() { assertThat(environment.getUsername()).isEqualTo("postgres"); } + @Test + void getUsernameWhenNoPostgresqlUser() { + PostgresEnvironment environment = new PostgresEnvironment(Map.of("POSTGRESQL_PASSWORD", "secret")); + assertThat(environment.getUsername()).isEqualTo("postgres"); + } + @Test void getUsernameWhenHasPostgresUser() { PostgresEnvironment environment = new PostgresEnvironment( @@ -52,18 +59,37 @@ void getUsernameWhenHasPostgresUser() { assertThat(environment.getUsername()).isEqualTo("me"); } + @Test + void getUsernameWhenHasPostgresqlUser() { + PostgresEnvironment environment = new PostgresEnvironment( + Map.of("POSTGRESQL_USER", "me", "POSTGRESQL_PASSWORD", "secret")); + assertThat(environment.getUsername()).isEqualTo("me"); + } + @Test void getPasswordWhenHasPostgresPassword() { PostgresEnvironment environment = new PostgresEnvironment(Map.of("POSTGRES_PASSWORD", "secret")); assertThat(environment.getPassword()).isEqualTo("secret"); } + @Test + void getPasswordWhenHasPostgresqlPassword() { + PostgresEnvironment environment = new PostgresEnvironment(Map.of("POSTGRESQL_PASSWORD", "secret")); + assertThat(environment.getPassword()).isEqualTo("secret"); + } + @Test void getDatabaseWhenNoPostgresDbOrPostgresUser() { PostgresEnvironment environment = new PostgresEnvironment(Map.of("POSTGRES_PASSWORD", "secret")); assertThat(environment.getDatabase()).isEqualTo("postgres"); } + @Test + void getDatabaseWhenNoPostgresqlDbOrPostgresUser() { + PostgresEnvironment environment = new PostgresEnvironment(Map.of("POSTGRESQL_PASSWORD", "secret")); + assertThat(environment.getDatabase()).isEqualTo("postgres"); + } + @Test void getDatabaseWhenNoPostgresDbAndPostgresUser() { PostgresEnvironment environment = new PostgresEnvironment( @@ -71,6 +97,13 @@ void getDatabaseWhenNoPostgresDbAndPostgresUser() { assertThat(environment.getDatabase()).isEqualTo("me"); } + @Test + void getDatabaseWhenNoPostgresqlDbAndPostgresUser() { + PostgresEnvironment environment = new PostgresEnvironment( + Map.of("POSTGRESQL_USER", "me", "POSTGRESQL_PASSWORD", "secret")); + assertThat(environment.getDatabase()).isEqualTo("me"); + } + @Test void getDatabaseWhenHasPostgresDb() { PostgresEnvironment environment = new PostgresEnvironment( @@ -78,4 +111,11 @@ void getDatabaseWhenHasPostgresDb() { assertThat(environment.getDatabase()).isEqualTo("db"); } + @Test + void getDatabaseWhenHasPostgresqlDb() { + PostgresEnvironment environment = new PostgresEnvironment( + Map.of("POSTGRESQL_DB", "db", "POSTGRESQL_PASSWORD", "secret")); + assertThat(environment.getDatabase()).isEqualTo("db"); + } + } diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/rabbit/RabbitEnvironmentTests.java b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/rabbit/RabbitEnvironmentTests.java index fdac67e5cedc..8262bec4aaa4 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/rabbit/RabbitEnvironmentTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/rabbit/RabbitEnvironmentTests.java @@ -29,6 +29,7 @@ * @author Moritz Halbritter * @author Andy Wilkinson * @author Phillip Webb + * @author Scott Frederick */ class RabbitEnvironmentTests { @@ -44,6 +45,12 @@ void getUsernameWhenHasRabbitmqDefaultUser() { assertThat(environment.getUsername()).isEqualTo("me"); } + @Test + void getUsernameWhenHasRabbitmqUsername() { + RabbitEnvironment environment = new RabbitEnvironment(Map.of("RABBITMQ_USERNAME", "me")); + assertThat(environment.getUsername()).isEqualTo("me"); + } + @Test void getUsernameWhenNoRabbitmqDefaultPass() { RabbitEnvironment environment = new RabbitEnvironment(Collections.emptyMap()); @@ -56,4 +63,10 @@ void getUsernameWhenHasRabbitmqDefaultPass() { assertThat(environment.getPassword()).isEqualTo("secret"); } + @Test + void getUsernameWhenHasRabbitmqPassword() { + RabbitEnvironment environment = new RabbitEnvironment(Map.of("RABBITMQ_PASSWORD", "secret")); + assertThat(environment.getPassword()).isEqualTo("secret"); + } + } diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/cassandra/cassandra-bitnami-compose.yaml b/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/cassandra/cassandra-bitnami-compose.yaml index 893bc6de6f7d..fc9c3d6d8ff2 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/cassandra/cassandra-bitnami-compose.yaml +++ b/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/cassandra/cassandra-bitnami-compose.yaml @@ -5,4 +5,4 @@ services: - '9042' environment: - 'CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch' - - 'CASSANDRA_DC=dc1' + - 'CASSANDRA_DATACENTER=testdc1' diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/cassandra/cassandra-compose.yaml b/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/cassandra/cassandra-compose.yaml index b8d5ffd528e4..946fd4fd3590 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/cassandra/cassandra-compose.yaml +++ b/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/cassandra/cassandra-compose.yaml @@ -9,4 +9,4 @@ services: - 'HEAP_NEWSIZE=128M' - 'MAX_HEAP_SIZE=1024M' - 'CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch' - - 'CASSANDRA_DC=dc1' + - 'CASSANDRA_DC=testdc1' diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/mongo/mongo-bitnami-compose.yaml b/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/mongo/mongo-bitnami-compose.yaml index 8f92465ac2d2..83f4be8fd393 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/mongo/mongo-bitnami-compose.yaml +++ b/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/mongo/mongo-bitnami-compose.yaml @@ -4,6 +4,6 @@ services: ports: - '27017' environment: - - 'MONGO_INITDB_ROOT_USERNAME=root' - - 'MONGO_INITDB_ROOT_PASSWORD=secret' - - 'MONGO_INITDB_DATABASE=mydatabase' + - 'MONGO_ROOT_USERNAME=root' + - 'MONGO_ROOT_PASSWORD=secret' + - 'MONGO_DATABASE=mydatabase' diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/postgres/postgres-bitnami-compose.yaml b/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/postgres/postgres-bitnami-compose.yaml index cb721c823b23..cb34245ec140 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/postgres/postgres-bitnami-compose.yaml +++ b/spring-boot-project/spring-boot-docker-compose/src/test/resources/org/springframework/boot/docker/compose/service/connection/postgres/postgres-bitnami-compose.yaml @@ -4,6 +4,6 @@ services: ports: - '5432' environment: - - 'POSTGRES_USER=myuser' - - 'POSTGRES_DB=mydatabase' - - 'POSTGRES_PASSWORD=secret' + - 'POSTGRESQL_USER=myuser' + - 'POSTGRESQL_DB=mydatabase' + - 'POSTGRESQL_PASSWORD=secret'