Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Daniel Chalef
c69a12ccba default to browser enabled 2025-11-05 10:49:04 -08:00
claude[bot]
f12bfd6a5f Fix: Add missing port 3000 mapping to BROWSER=0 example
The docker run example for disabling the browser was missing the -p 3000:3000
port mapping, which should be included for reference even when BROWSER=0.

Co-authored-by: Daniel Chalef <danielchalef@users.noreply.github.com>
2025-11-05 10:34:24 -08:00
claude[bot]
4d886fb929 Fix: Enable FalkorDB Browser startup in MCP Server Docker image
This fix addresses issue #1041 where the FalkorDB Browser web UI was not
starting automatically in the combined FalkorDB + MCP Server Docker image.

Changes:
- Modified start-services.sh script in Dockerfile to include browser startup logic
- Browser now starts automatically when BROWSER=1 (default behavior)
- Can be disabled by setting BROWSER=0 environment variable
- Browser logs are written to /var/log/graphiti/browser.log
- Added safety checks to verify browser files exist before starting

Updated documentation:
- Added BROWSER environment variable to docker-compose.yml
- Documented BROWSER variable in README-falkordb-combined.md
- Added section explaining how to disable the browser
- Updated architecture diagrams to show browser process

The fix follows the upstream FalkorDB image pattern where the browser
starts with HOSTNAME="0.0.0.0" on port 3000.

Resolves #1041

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Daniel Chalef <danielchalef@users.noreply.github.com>
2025-11-05 10:34:24 -08:00
4 changed files with 43 additions and 3 deletions

View file

@ -85,6 +85,20 @@ until redis-cli -h localhost -p 6379 ping > /dev/null 2>&1; do
done
echo "FalkorDB is ready!"
# Start FalkorDB Browser if enabled (default: enabled)
if [ "${BROWSER:-1}" = "1" ]; then
if [ -d "/var/lib/falkordb/browser" ] && [ -f "/var/lib/falkordb/browser/server.js" ]; then
echo "Starting FalkorDB Browser on port 3000..."
cd /var/lib/falkordb/browser
HOSTNAME="0.0.0.0" node server.js > /var/log/graphiti/browser.log 2>&1 &
echo "FalkorDB Browser started in background"
else
echo "Warning: FalkorDB Browser files not found, skipping browser startup"
fi
else
echo "FalkorDB Browser disabled (BROWSER=${BROWSER})"
fi
# Start MCP server in foreground
echo "Starting MCP server..."
cd /app/mcp

View file

@ -83,6 +83,7 @@ All environment variables from the standard MCP server are supported:
- `OPENAI_API_KEY`: OpenAI API key for LLM operations
**Optional:**
- `BROWSER`: Enable FalkorDB Browser web UI on port 3000 (default: "1", set to "0" to disable)
- `GRAPHITI_GROUP_ID`: Namespace for graph data (default: "main")
- `SEMAPHORE_LIMIT`: Concurrency limit for episode processing (default: 10)
- `FALKORDB_PASSWORD`: Password for FalkorDB (optional)
@ -96,7 +97,7 @@ All environment variables from the standard MCP server are supported:
### Volumes
- `/var/lib/falkordb/data`: Persistent storage for graph data
- `/var/log/graphiti`: MCP server logs
- `/var/log/graphiti`: MCP server and FalkorDB Browser logs
## Service Management
@ -123,6 +124,27 @@ docker compose -f docker/docker-compose-falkordb-combined.yml exec graphiti-falk
curl http://localhost:8000/health
```
### Disabling the FalkorDB Browser
To disable the FalkorDB Browser web UI (port 3000), set the `BROWSER` environment variable to `0`:
```bash
# Using docker run
docker run -d \
-p 6379:6379 \
-p 3000:3000 \
-p 8000:8000 \
-e BROWSER=0 \
-e OPENAI_API_KEY=your_key \
zepai/graphiti-falkordb:latest
# Using docker-compose
# Add to your .env file:
BROWSER=0
```
When disabled, only FalkorDB (port 6379) and the MCP server (port 8000) will run.
## Health Checks
The container includes a health check that verifies:
@ -140,10 +162,11 @@ docker compose -f docker/docker-compose-falkordb-combined.yml ps
```
start-services.sh (PID 1)
├── redis-server (FalkorDB daemon)
├── node server.js (FalkorDB Browser - background, if BROWSER=1)
└── uv run main.py (MCP server - foreground)
```
The startup script launches FalkorDB as a background daemon, waits for it to be ready, then starts the MCP server in the foreground. When the MCP server stops, the container exits.
The startup script launches FalkorDB as a background daemon, waits for it to be ready, optionally starts the FalkorDB Browser (if `BROWSER=1`), then starts the MCP server in the foreground. When the MCP server stops, the container exits.
### Directory Structure
```
@ -155,7 +178,8 @@ The startup script launches FalkorDB as a background daemon, waits for it to be
└── .graphiti-core-version # Installed version info
/var/lib/falkordb/data/ # Persistent graph storage
/var/log/graphiti/ # MCP server logs
/var/lib/falkordb/browser/ # FalkorDB Browser web UI
/var/log/graphiti/ # MCP server and Browser logs
/start-services.sh # Startup script
```

View file

@ -6,6 +6,7 @@ services:
- "3000:3000" # FalkorDB web UI
environment:
- FALKORDB_PASSWORD=${FALKORDB_PASSWORD:-}
- BROWSER=${BROWSER:-1} # Enable FalkorDB Browser UI (set to 0 to disable)
volumes:
- falkordb_data:/data
healthcheck:

View file

@ -15,6 +15,7 @@ services:
environment:
# FalkorDB configuration
- FALKORDB_PASSWORD=${FALKORDB_PASSWORD:-}
- BROWSER=${BROWSER:-1} # Enable FalkorDB Browser UI (set to 0 to disable)
# MCP Server configuration
- FALKORDB_URI=redis://localhost:6379
- FALKORDB_DATABASE=${FALKORDB_DATABASE:-default_db}