0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-04 13:50:12 -05:00

Init DB JDBC URI from base DB params

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
This commit is contained in:
mathieu.brunot 2019-07-19 14:36:23 +02:00 committed by Andrey Antukh
parent d17db88088
commit 9c61389830
2 changed files with 7 additions and 0 deletions

View file

@ -81,6 +81,7 @@ Available at runtime:
- `-e UXBOX_HTTP_SERVER_DEBUG=...` (defaults to `true`)
- `-e UXBOX_DATABASE_USERNAME="..."` (defaults to `nil`)
- `-e UXBOX_DATABASE_PASSWORD="..."` (defaults to `nil`)
- `-e UXBOX_DATABASE_URI="..."` (defaults to ` `, will be computed based on other DATABASE parameters if empty)
- `-e UXBOX_DATABASE_NAME="..."` (defaults to `"uxbox"`)
- `-e UXBOX_DATABASE_SERVER="..."` (defaults to `"localhost"`)
- `-e UXBOX_DATABASE_PORT=...` (defaults to `5432`)

View file

@ -4,5 +4,11 @@ set -e
echo "Synchronize static data..."
rsync -avr --delete ./resources/public/static/ ./data/static/
if [ -z "$UXBOX_DATABASE_URI" ]; then
echo "Initializing database connection string..."
UXBOX_DATABASE_URI="\"jdbc:postgresql://$(echo ${UXBOX_DATABASE_SERVER} | tr -d '"'):${UXBOX_DATABASE_PORT}/$(echo ${UXBOX_DATABASE_NAME} | tr -d '"')\""
echo "Database connection string: $UXBOX_DATABASE_URI"
fi
echo "Setting up UXBOX Backend..."
exec "$@"