Added the script that set the database before starting the backend

This commit is contained in:
Bento Silveira 2023-07-23 12:44:00 -03:00 committed by Nerdeiro da Silva
parent 2aff2aa49b
commit c8ef39e3cb
No known key found for this signature in database
GPG Key ID: E50EFBA12C1ED3CD
1 changed files with 9 additions and 0 deletions

View File

@ -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