We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 323c001 commit 889f97aCopy full SHA for 889f97a
docker-entrypoint.sh
@@ -3,8 +3,8 @@ set -e
3
4
# Check if Redis is available before starting Sidekiq
5
REDIS_URL=${REDIS_URL:-redis://redis:6379/0}
6
-REDIS_HOST=$(echo $REDIS_URL | sed -E 's|redis://([^:/]+).*|\1|')
7
-REDIS_PORT=$(echo $REDIS_URL | sed -E 's|.*:([0-9]+).*|\1|')
+REDIS_HOST=$(echo $REDIS_URL | sed -E 's|redis://(:.*@)?([^:/@]+).*|\2|')
+REDIS_PORT=$(echo $REDIS_URL | sed -E 's|.*:([0-9]+)(/.*)?$|\1|')
8
9
if nc -z -w 2 ${REDIS_HOST} ${REDIS_PORT} 2>/dev/null; then
10
echo "✓ Redis is available at ${REDIS_HOST}:${REDIS_PORT}, starting Sidekiq..."
0 commit comments