From a02104eb02a6bcd082225e67f4c7d1d6e9408bda Mon Sep 17 00:00:00 2001 From: Tommaso Borgato Date: Thu, 7 Nov 2024 12:04:16 +0100 Subject: [PATCH] PostgreSQL: fix JNDI name jboss/datasources/testdb_postgres -> jboss/datasources/testdb_postgresql --- builder/src/main/java/cz/xtf/builder/db/PostgreSQL.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/builder/src/main/java/cz/xtf/builder/db/PostgreSQL.java b/builder/src/main/java/cz/xtf/builder/db/PostgreSQL.java index 040b3f86..74a8a79c 100644 --- a/builder/src/main/java/cz/xtf/builder/db/PostgreSQL.java +++ b/builder/src/main/java/cz/xtf/builder/db/PostgreSQL.java @@ -11,14 +11,13 @@ public class PostgreSQL extends AbstractSQLDatabase { private static final String DEFAULT_SYMBOLIC_NAME = "POSTGRESQL"; - private static final String OFFICIAL_IMAGE_DEFAULT_SYMBOLIC_NAME = "POSTGRES"; // data directory for the Red Hat image private static final String DEFAULT_DATA_DIR = "/var/lib/pgsql/data"; // data directory for the Official Docker PostgreSQL image - private static final String OFFICIAL_IMAGE_DATA_DIR = "/var/lib/postgresql"; - private static final String OFFICIAL_IMAGE_PGDATA_DIR = "/var/lib/postgresql/data"; + private static final String OFFICIAL_IMAGE_DATA_DIR = "/var/lib/postgresql/data"; + private static final String OFFICIAL_IMAGE_PGDATA_DIR = "/var/lib/postgresql/data/pgdata"; // env variables names for the Red Hat image private static final String DEFAULT_POSTGRESQL_USER_ENV_VAR = "POSTGRESQL_USER"; @@ -76,7 +75,7 @@ public class PostgreSQL extends AbstractSQLDatabase { public PostgreSQL(PostgreSQLBuilder postgreSQLBuilder) { super( (postgreSQLBuilder.symbolicName == null || postgreSQLBuilder.symbolicName.isEmpty()) - ? (postgreSQLBuilder.isOfficialImage ? OFFICIAL_IMAGE_DEFAULT_SYMBOLIC_NAME : DEFAULT_SYMBOLIC_NAME) + ? DEFAULT_SYMBOLIC_NAME : postgreSQLBuilder.symbolicName, (postgreSQLBuilder.dataDir == null || postgreSQLBuilder.dataDir.isEmpty()) ? (postgreSQLBuilder.isOfficialImage ? OFFICIAL_IMAGE_DATA_DIR : DEFAULT_DATA_DIR)