From c8ef39e3cbdac36c118b34163a679c49f4e9f7a3 Mon Sep 17 00:00:00 2001 From: Bento Silveira Date: Sun, 23 Jul 2023 12:44:00 -0300 Subject: [PATCH] Added the script that set the database before starting the backend --- entrypoint.d/backend-startup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 entrypoint.d/backend-startup.sh diff --git a/entrypoint.d/backend-startup.sh b/entrypoint.d/backend-startup.sh new file mode 100755 index 0000000..267ef06 --- /dev/null +++ b/entrypoint.d/backend-startup.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +echo "hibernate.connection.url: jdbc:postgresql://${POSTGRES_DB}:5432/piped" > /app/config.properties +echo "hibernate.connection.username: ${POSTGRES_USER}" >> /app/config.properties +echo "hibernate.connection.password: ${POSTGRES_PASSWORD}" >> /app/config.properties +echo "hibernate.connection.driver_class: org.postgresql.Driver" >> /app/config.properties +echo "hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect" >> /app/config.properties + +exec java -server -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+UseG1GC -Xshare:on -jar /app/piped.jar