Override redis creds with addon provided vars
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"description": "Next-gen knowledge base that blends docs, whiteboards, and databases for self-hosted teams.",
|
||||
"website": "https://affine.pro",
|
||||
"contactEmail": "support@affine.pro",
|
||||
"version": "0.1.12",
|
||||
"version": "0.1.13",
|
||||
"changelog": "Initial Cloudron packaging",
|
||||
"manifestVersion": 2,
|
||||
"minBoxVersion": "7.0.0",
|
||||
|
||||
14
start.sh
14
start.sh
@@ -99,6 +99,20 @@ print(f"{host}\n{port}\n{password}\n{db}\n{username}")
|
||||
PY
|
||||
)
|
||||
IFS=$'\n' read -r host port password db username <<<"$redis_info"
|
||||
if [ -n "${CLOUDRON_REDIS_HOST:-}" ]; then
|
||||
host="$CLOUDRON_REDIS_HOST"
|
||||
fi
|
||||
if [ -n "${CLOUDRON_REDIS_PORT:-}" ]; then
|
||||
port="$CLOUDRON_REDIS_PORT"
|
||||
fi
|
||||
if [ -n "${CLOUDRON_REDIS_PASSWORD:-}" ]; then
|
||||
password="$CLOUDRON_REDIS_PASSWORD"
|
||||
fi
|
||||
if [ -n "${CLOUDRON_REDIS_USERNAME:-}" ]; then
|
||||
username="$CLOUDRON_REDIS_USERNAME"
|
||||
elif [ -z "$username" ]; then
|
||||
username="default"
|
||||
fi
|
||||
export REDIS_SERVER_HOST="$host"
|
||||
export REDIS_SERVER_PORT="$port"
|
||||
export REDIS_SERVER_PASSWORD="$password"
|
||||
|
||||
Reference in New Issue
Block a user