diff --git a/conf/docker/app/Dockerfile b/conf/docker/app/Dockerfile index 2dfa6f3dbe4..359a4bd8377 100644 --- a/conf/docker/app/Dockerfile +++ b/conf/docker/app/Dockerfile @@ -7,4 +7,6 @@ ARG LIB_PATH="${PAYARA_DIR}/glassfish/domains/${DOMAIN_NAME}/lib/" COPY --chown=payara maven/lib/* ${LIB_PATH} -COPY maven/${project.build.finalName}.war ${DEPLOY_DIR} \ No newline at end of file +COPY maven/${project.build.finalName}.war ${DEPLOY_DIR} + +COPY --chown=payara init_2_configure.sh ${SCRIPT_DIR} \ No newline at end of file diff --git a/conf/docker/app/init_2_configure.sh b/conf/docker/app/init_2_configure.sh new file mode 100644 index 00000000000..35d1d0a1cf4 --- /dev/null +++ b/conf/docker/app/init_2_configure.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env sh + +# TEST FOR POSTBOOT: THIS WILL NEED TO BE ENHANCED WITH A) ENV VARS +# AND B) SECRETS FILE... + +echo "AS_ADMIN_ALIASPASSWORD=test1234" > ${PAYARA_DIR}/dbpass + +cat > ${POSTBOOT_COMMANDS}.tmp << 'EOF' +create-system-properties "postgres.host=postgres" +create-system-properties "postgres.port=5432" +create-system-properties "postgres.database=dataverse +create-system-properties "postgres.user=dataverse" +create-password-alias "postgres-pass" --passwordfile ${PAYARA_DIR}/dbpass +EOF + +echo "$(cat ${POSTBOOT_COMMANDS}.tmp | cat - ${POSTBOOT_COMMANDS} )" > ${POSTBOOT_COMMANDS} +cat ${POSTBOOT_COMMANDS} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 3f20d00c0b0..8be16a6dc24 100644 --- a/pom.xml +++ b/pom.xml @@ -706,7 +706,11 @@ + the installer a tiny bit simpler and make distribution easier. + Needs testing. See also: + https://github.com/eclipse-ee4j/glassfish/issues/19451 + https://github.com/eclipse-ee4j/glassfish/issues/20944 + --> org.postgresql postgresql diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index 8b4e33858ac..85da2f1c4d6 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -3,7 +3,7 @@ org.eclipse.persistence.jpa.PersistenceProvider - jdbc/VDCNetDS + java:app/DV/VDCNetDS diff --git a/src/main/webapp/WEB-INF/glassfish-resources.xml b/src/main/webapp/WEB-INF/glassfish-resources.xml new file mode 100644 index 00000000000..d5286b3c609 --- /dev/null +++ b/src/main/webapp/WEB-INF/glassfish-resources.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + \ No newline at end of file