Skip to content

Commit

Permalink
Add DISCOURSE_REDIS_DB to make it configurable
Browse files Browse the repository at this point in the history
Signed-off-by: nenych <[email protected]>
  • Loading branch information
nenych committed Sep 3, 2024
1 parent 6b62521 commit 9776adc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ discourse_env_vars=(
DISCOURSE_REDIS_HOST
DISCOURSE_REDIS_PORT_NUMBER
DISCOURSE_REDIS_PASSWORD
DISCOURSE_REDIS_DB
DISCOURSE_REDIS_USE_SSL
DISCOURSE_HOSTNAME
DISCOURSE_SKIP_INSTALL
Expand All @@ -79,6 +80,7 @@ discourse_env_vars=(
REDIS_HOST
REDIS_PORT_NUMBER
REDIS_PASSWORD
REDIS_DB
REDIS_USE_SSL
)
for env_var in "${discourse_env_vars[@]}"; do
Expand Down Expand Up @@ -172,6 +174,8 @@ DISCOURSE_REDIS_PORT_NUMBER="${DISCOURSE_REDIS_PORT_NUMBER:-"${REDIS_PORT_NUMBER
export DISCOURSE_REDIS_PORT_NUMBER="${DISCOURSE_REDIS_PORT_NUMBER:-6379}"
DISCOURSE_REDIS_PASSWORD="${DISCOURSE_REDIS_PASSWORD:-"${REDIS_PASSWORD:-}"}"
export DISCOURSE_REDIS_PASSWORD="${DISCOURSE_REDIS_PASSWORD:-}"
DISCOURSE_REDIS_DB="${DISCOURSE_REDIS_DB:-"${REDIS_DB:-}"}"
export DISCOURSE_REDIS_DB="${DISCOURSE_REDIS_DB:-}"
DISCOURSE_REDIS_USE_SSL="${DISCOURSE_REDIS_USE_SSL:-"${REDIS_USE_SSL:-}"}"
export DISCOURSE_REDIS_USE_SSL="${DISCOURSE_REDIS_USE_SSL:-no}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ discourse_create_conf_file() {
discourse_conf_set "redis_host" "$DISCOURSE_REDIS_HOST"
discourse_conf_set "redis_port" "$DISCOURSE_REDIS_PORT_NUMBER"
discourse_conf_set "redis_password" "$DISCOURSE_REDIS_PASSWORD"
discourse_conf_set "redis_db" "$DISCOURSE_REDIS_DB"
is_boolean_yes "$DISCOURSE_REDIS_USE_SSL" && discourse_conf_set "redis_use_ssl" true
# SMTP credentials
if ! is_empty_value "$DISCOURSE_SMTP_HOST"; then
Expand Down

0 comments on commit 9776adc

Please sign in to comment.