Skip to content

Commit 5e0f585

Browse files
gkorlandCopilot
andcommitted
fix: skip internal FalkorDB when FALKORDB_HOST is external
When running via docker-compose, FalkorDB is a separate service and FALKORDB_HOST is set to its service name (not localhost). Previously start.sh always started an internal FalkorDB instance regardless, wasting resources. Now it only starts the internal instance when FALKORDB_HOST is localhost (standalone container mode). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 17d1471 commit 5e0f585

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

start.sh

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

8-
# Start FalkorDB Redis server in background
9-
redis-server --loadmodule /var/lib/falkordb/bin/falkordb.so | cat &
8+
# Start FalkorDB Redis server in background only if using localhost (not an external instance)
9+
if [ "${FALKORDB_HOST}" = "localhost" ]; then
10+
redis-server --loadmodule /var/lib/falkordb/bin/falkordb.so | cat &
11+
fi
1012

1113
# Wait until FalkorDB is ready
1214
echo "Waiting for FalkorDB to start on $FALKORDB_HOST:$FALKORDB_PORT..."

0 commit comments

Comments
 (0)