Set redis username/database env
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
"description": "Next-gen knowledge base that blends docs, whiteboards, and databases for self-hosted teams.",
|
"description": "Next-gen knowledge base that blends docs, whiteboards, and databases for self-hosted teams.",
|
||||||
"website": "https://affine.pro",
|
"website": "https://affine.pro",
|
||||||
"contactEmail": "support@affine.pro",
|
"contactEmail": "support@affine.pro",
|
||||||
"version": "0.1.2",
|
"version": "0.1.3",
|
||||||
"changelog": "Initial Cloudron packaging",
|
"changelog": "Initial Cloudron packaging",
|
||||||
"manifestVersion": 2,
|
"manifestVersion": 2,
|
||||||
"minBoxVersion": "7.0.0",
|
"minBoxVersion": "7.0.0",
|
||||||
|
|||||||
7
start.sh
7
start.sh
@@ -71,13 +71,16 @@ host = parsed.hostname or 'localhost'
|
|||||||
port = parsed.port or 6379
|
port = parsed.port or 6379
|
||||||
password = parsed.password or ''
|
password = parsed.password or ''
|
||||||
db = (parsed.path or '/0').lstrip('/') or '0'
|
db = (parsed.path or '/0').lstrip('/') or '0'
|
||||||
print(f"{host}\n{port}\n{password}\n{db}")
|
username = parsed.username or ''
|
||||||
|
print(f"{host}\n{port}\n{password}\n{db}\n{username}")
|
||||||
PY
|
PY
|
||||||
)
|
)
|
||||||
IFS=$'\n' read -r host port password db <<<"$redis_info"
|
IFS=$'\n' read -r host port password db username <<<"$redis_info"
|
||||||
export REDIS_SERVER_HOST="$host"
|
export REDIS_SERVER_HOST="$host"
|
||||||
export REDIS_SERVER_PORT="$port"
|
export REDIS_SERVER_PORT="$port"
|
||||||
export REDIS_SERVER_PASSWORD="$password"
|
export REDIS_SERVER_PASSWORD="$password"
|
||||||
|
export REDIS_SERVER_DATABASE="$db"
|
||||||
|
export REDIS_SERVER_USERNAME="$username"
|
||||||
export REDIS_URL="$CLOUDRON_REDIS_URL"
|
export REDIS_URL="$CLOUDRON_REDIS_URL"
|
||||||
export REDIS_SERVER_URL="$CLOUDRON_REDIS_URL"
|
export REDIS_SERVER_URL="$CLOUDRON_REDIS_URL"
|
||||||
log "Configured Redis endpoint"
|
log "Configured Redis endpoint"
|
||||||
|
|||||||
Reference in New Issue
Block a user