Fix combined FalkorDB image to run both services successfully
- Override FalkorDB ENTRYPOINT to use custom startup script - Use correct FalkorDB module path: /var/lib/falkordb/bin/falkordb.so - Create config-docker-falkordb-combined.yaml with localhost URI - Create /var/lib/falkordb/data directory for persistence - Both FalkorDB and MCP server now start successfully - Tested: FalkorDB ready, MCP server running on port 8000
This commit is contained in:
parent
ff4f4793d3
commit
26b14045f2
2 changed files with 110 additions and 8 deletions
101
mcp_server/config/config-docker-falkordb-combined.yaml
Normal file
101
mcp_server/config/config-docker-falkordb-combined.yaml
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
# Graphiti MCP Server Configuration for Combined FalkorDB + MCP Image
|
||||||
|
# This configuration is for the combined single-container deployment
|
||||||
|
|
||||||
|
server:
|
||||||
|
transport: "http" # HTTP transport (SSE is deprecated)
|
||||||
|
host: "0.0.0.0"
|
||||||
|
port: 8000
|
||||||
|
|
||||||
|
llm:
|
||||||
|
provider: "openai" # Options: openai, azure_openai, anthropic, gemini, groq
|
||||||
|
model: "gpt-5-mini"
|
||||||
|
max_tokens: 4096
|
||||||
|
|
||||||
|
providers:
|
||||||
|
openai:
|
||||||
|
api_key: ${OPENAI_API_KEY}
|
||||||
|
api_url: ${OPENAI_API_URL:https://api.openai.com/v1}
|
||||||
|
organization_id: ${OPENAI_ORGANIZATION_ID:}
|
||||||
|
|
||||||
|
azure_openai:
|
||||||
|
api_key: ${AZURE_OPENAI_API_KEY}
|
||||||
|
api_url: ${AZURE_OPENAI_ENDPOINT}
|
||||||
|
api_version: ${AZURE_OPENAI_API_VERSION:2024-10-21}
|
||||||
|
deployment_name: ${AZURE_OPENAI_DEPLOYMENT}
|
||||||
|
use_azure_ad: ${USE_AZURE_AD:false}
|
||||||
|
|
||||||
|
anthropic:
|
||||||
|
api_key: ${ANTHROPIC_API_KEY}
|
||||||
|
api_url: ${ANTHROPIC_API_URL:https://api.anthropic.com}
|
||||||
|
max_retries: 3
|
||||||
|
|
||||||
|
gemini:
|
||||||
|
api_key: ${GOOGLE_API_KEY}
|
||||||
|
project_id: ${GOOGLE_PROJECT_ID:}
|
||||||
|
location: ${GOOGLE_LOCATION:us-central1}
|
||||||
|
|
||||||
|
groq:
|
||||||
|
api_key: ${GROQ_API_KEY}
|
||||||
|
api_url: ${GROQ_API_URL:https://api.groq.com/openai/v1}
|
||||||
|
|
||||||
|
embedder:
|
||||||
|
provider: "openai" # Options: openai, azure_openai, gemini, voyage
|
||||||
|
model: "text-embedding-3-small"
|
||||||
|
dimensions: 1536
|
||||||
|
|
||||||
|
providers:
|
||||||
|
openai:
|
||||||
|
api_key: ${OPENAI_API_KEY}
|
||||||
|
api_url: ${OPENAI_API_URL:https://api.openai.com/v1}
|
||||||
|
organization_id: ${OPENAI_ORGANIZATION_ID:}
|
||||||
|
|
||||||
|
azure_openai:
|
||||||
|
api_key: ${AZURE_OPENAI_API_KEY}
|
||||||
|
api_url: ${AZURE_OPENAI_EMBEDDINGS_ENDPOINT}
|
||||||
|
api_version: ${AZURE_OPENAI_API_VERSION:2024-10-21}
|
||||||
|
deployment_name: ${AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT}
|
||||||
|
use_azure_ad: ${USE_AZURE_AD:false}
|
||||||
|
|
||||||
|
gemini:
|
||||||
|
api_key: ${GOOGLE_API_KEY}
|
||||||
|
project_id: ${GOOGLE_PROJECT_ID:}
|
||||||
|
location: ${GOOGLE_LOCATION:us-central1}
|
||||||
|
|
||||||
|
voyage:
|
||||||
|
api_key: ${VOYAGE_API_KEY}
|
||||||
|
api_url: ${VOYAGE_API_URL:https://api.voyageai.com/v1}
|
||||||
|
model: "voyage-3"
|
||||||
|
|
||||||
|
database:
|
||||||
|
provider: "falkordb" # Using FalkorDB for this configuration
|
||||||
|
|
||||||
|
providers:
|
||||||
|
falkordb:
|
||||||
|
# For combined image, both services run in same container - use localhost
|
||||||
|
uri: ${FALKORDB_URI:redis://localhost:6379}
|
||||||
|
password: ${FALKORDB_PASSWORD:}
|
||||||
|
database: ${FALKORDB_DATABASE:default_db}
|
||||||
|
|
||||||
|
graphiti:
|
||||||
|
group_id: ${GRAPHITI_GROUP_ID:main}
|
||||||
|
episode_id_prefix: ${EPISODE_ID_PREFIX:}
|
||||||
|
user_id: ${USER_ID:mcp_user}
|
||||||
|
entity_types:
|
||||||
|
- name: "Preference"
|
||||||
|
description: "User preferences, choices, opinions, or selections (PRIORITIZE over most other types except User/Assistant)"
|
||||||
|
- name: "Requirement"
|
||||||
|
description: "Specific needs, features, or functionality that must be fulfilled"
|
||||||
|
- name: "Procedure"
|
||||||
|
description: "Standard operating procedures and sequential instructions"
|
||||||
|
- name: "Location"
|
||||||
|
description: "Physical or virtual places where activities occur"
|
||||||
|
- name: "Event"
|
||||||
|
description: "Time-bound activities, occurrences, or experiences"
|
||||||
|
- name: "Organization"
|
||||||
|
description: "Companies, institutions, groups, or formal entities"
|
||||||
|
- name: "Document"
|
||||||
|
description: "Information content in various forms (books, articles, reports, etc.)"
|
||||||
|
- name: "Topic"
|
||||||
|
description: "Subject of conversation, interest, or knowledge domain (use as last resort)"
|
||||||
|
- name: "Object"
|
||||||
|
description: "Physical items, tools, devices, or possessions (use as last resort)"
|
||||||
|
|
@ -56,21 +56,21 @@ COPY main.py ./
|
||||||
COPY src/ ./src/
|
COPY src/ ./src/
|
||||||
COPY config/ ./config/
|
COPY config/ ./config/
|
||||||
|
|
||||||
# Copy FalkorDB-specific config as default
|
# Copy FalkorDB combined config (uses localhost since both services in same container)
|
||||||
COPY config/config-docker-falkordb.yaml /app/mcp/config/config.yaml
|
COPY config/config-docker-falkordb-combined.yaml /app/mcp/config/config.yaml
|
||||||
|
|
||||||
# Create log directory
|
# Create log and data directories
|
||||||
RUN mkdir -p /var/log/graphiti
|
RUN mkdir -p /var/log/graphiti /var/lib/falkordb/data
|
||||||
|
|
||||||
# Create startup script that runs both services
|
# Create startup script that runs both services
|
||||||
RUN cat > /start-services.sh <<'EOF'
|
RUN cat > /start-services.sh <<'EOF'
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Start FalkorDB in background
|
# Start FalkorDB in background using the correct module path
|
||||||
echo "Starting FalkorDB..."
|
echo "Starting FalkorDB..."
|
||||||
redis-server \
|
redis-server \
|
||||||
--loadmodule /FalkorDB/bin/linux-x64-release/src/falkordb.so \
|
--loadmodule /var/lib/falkordb/bin/falkordb.so \
|
||||||
--protected-mode no \
|
--protected-mode no \
|
||||||
--bind 0.0.0.0 \
|
--bind 0.0.0.0 \
|
||||||
--port 6379 \
|
--port 6379 \
|
||||||
|
|
@ -113,5 +113,6 @@ EXPOSE 6379 3000 8000
|
||||||
HEALTHCHECK --interval=10s --timeout=5s --start-period=15s --retries=3 \
|
HEALTHCHECK --interval=10s --timeout=5s --start-period=15s --retries=3 \
|
||||||
CMD redis-cli -p 6379 ping && curl -f http://localhost:8000/health || exit 1
|
CMD redis-cli -p 6379 ping && curl -f http://localhost:8000/health || exit 1
|
||||||
|
|
||||||
# Run the startup script
|
# Override the FalkorDB entrypoint and use our startup script
|
||||||
CMD ["/start-services.sh"]
|
ENTRYPOINT ["/start-services.sh"]
|
||||||
|
CMD []
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue