mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -05:00
✨ Init DB JDBC URI from base DB params
Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
This commit is contained in:
parent
d17db88088
commit
9c61389830
2 changed files with 7 additions and 0 deletions
|
@ -81,6 +81,7 @@ Available at runtime:
|
||||||
- `-e UXBOX_HTTP_SERVER_DEBUG=...` (defaults to `true`)
|
- `-e UXBOX_HTTP_SERVER_DEBUG=...` (defaults to `true`)
|
||||||
- `-e UXBOX_DATABASE_USERNAME="..."` (defaults to `nil`)
|
- `-e UXBOX_DATABASE_USERNAME="..."` (defaults to `nil`)
|
||||||
- `-e UXBOX_DATABASE_PASSWORD="..."` (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_NAME="..."` (defaults to `"uxbox"`)
|
||||||
- `-e UXBOX_DATABASE_SERVER="..."` (defaults to `"localhost"`)
|
- `-e UXBOX_DATABASE_SERVER="..."` (defaults to `"localhost"`)
|
||||||
- `-e UXBOX_DATABASE_PORT=...` (defaults to `5432`)
|
- `-e UXBOX_DATABASE_PORT=...` (defaults to `5432`)
|
||||||
|
|
|
@ -4,5 +4,11 @@ set -e
|
||||||
echo "Synchronize static data..."
|
echo "Synchronize static data..."
|
||||||
rsync -avr --delete ./resources/public/static/ ./data/static/
|
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..."
|
echo "Setting up UXBOX Backend..."
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|
Loading…
Reference in a new issue