Set redis username/database env

This commit is contained in:
Codex
2025-11-12 09:22:59 -06:00
parent e49fd47c6d
commit 6720e936c2
2 changed files with 6 additions and 3 deletions

View File

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

View File

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