Skip to content

Commit 0096860

Browse files
gkorlandCopilot
andcommitted
fix: also detect loopback IPs (127.x.x.x) as local FalkorDB
The previous check only matched 'localhost'. Any loopback address like 127.0.0.1 should also start the internal FalkorDB instance instead of waiting on an unreachable external host. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5e0f585 commit 0096860

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

start.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ set -e
55
FALKORDB_HOST="${FALKORDB_HOST:-localhost}"
66
FALKORDB_PORT="${FALKORDB_PORT:-6379}"
77

8-
# Start FalkorDB Redis server in background only if using localhost (not an external instance)
9-
if [ "${FALKORDB_HOST}" = "localhost" ]; then
8+
# Start FalkorDB Redis server in background only if using a local address (not an external instance)
9+
if [ "${FALKORDB_HOST}" = "localhost" ] || [[ "${FALKORDB_HOST}" =~ ^127\.0\.0\.[0-9]+$ ]]; then
1010
redis-server --loadmodule /var/lib/falkordb/bin/falkordb.so | cat &
1111
fi
1212

0 commit comments

Comments
 (0)