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)