Skip to content

Commit

Permalink
Update start.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
sagararyal authored Nov 18, 2024
1 parent 1488cf4 commit d300336
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,17 @@ export DB_POSTGRESDB_PASSWORD=$N8N_DB_PASSWORD
# parse REDIS_URL if present
if [ "$REDIS_URL" ]
then
echo "Redis config detected"
echo "redis config detected"
PREFIX="N8N_REDIS_" parse_url "$REDIS_URL"

# Extract host and port
# Separate host and port
N8N_REDIS_HOST="$(echo $N8N_REDIS_HOSTPORT | sed -e 's,:.*,,g')"
N8N_REDIS_PORT="$(echo $N8N_REDIS_HOSTPORT | sed -e 's,^.*:,:,g' -e 's,.*:\([0-9]*\).*,\1,g' -e 's,[^0-9],,g')"

export QUEUE_BULL_REDIS_HOST=$N8N_REDIS_HOST
export QUEUE_BULL_REDIS_PORT=$N8N_REDIS_PORT
export QUEUE_BULL_REDIS_PASSWORD=$N8N_REDIS_PASSWORD

# Check if URL starts with rediss:// for TLS support
if [ "${URL_SCHEME}" = "rediss" ]; then
# Check if URL starts with rediss://
if [ "${N8N_REDIS_SCHEME}" = "rediss" ]; then
export QUEUE_BULL_REDIS_TLS=true
echo "Redis connection over TLS detected, setting QUEUE_BULL_REDIS_TLS=true"
fi
Expand Down

0 comments on commit d300336

Please sign in to comment.