graphiti/docker-compose.yml
Daniel Chalef 55ef6acb16
Add Azure OpenAI example with Neo4j (#1064)
* Add Azure OpenAI example with Neo4j

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Convert Azure OpenAI example to use uv

- Remove requirements.txt (uv uses pyproject.toml)
- Update README to use 'uv sync' and 'uv run'

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Update Azure OpenAI example to use gpt-4.1

- Change default deployment from gpt-4 to gpt-4.1
- Update README recommendations to prioritize gpt-4.1 models

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove model recommendations from Azure OpenAI example

Model recommendations quickly become outdated.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Add default Neo4j credentials to docker-compose

Set sensible defaults (neo4j/password) to prevent NEO4J_AUTH error
when .env file is not present.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Update Azure OpenAI documentation to use v1 API

- Simplified Azure OpenAI setup using AsyncOpenAI with v1 endpoint
- Updated main README with clearer Quick Start example
- Removed outdated API version configuration
- Updated example deployment to gpt-5-mini
- Added note about v1 API endpoint format

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Update LLMConfig to include both model and small_model

Both parameters are needed for proper LLM configuration.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Address PR review feedback

- Remove flawed validation check in azure_openai_neo4j.py
- Remove unused azure-identity dependency
- Update docstrings to reflect dual client support (AsyncAzureOpenAI and AsyncOpenAI)

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

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-14 08:34:35 -08:00

92 lines
2.2 KiB
YAML

services:
graph:
profiles: [""]
build:
context: .
ports:
- "8000:8000"
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8000/healthcheck')",
]
interval: 10s
timeout: 5s
retries: 3
depends_on:
neo4j:
condition: service_healthy
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- NEO4J_URI=bolt://neo4j:${NEO4J_PORT:-7687}
- NEO4J_USER=${NEO4J_USER:-neo4j}
- NEO4J_PASSWORD=${NEO4J_PASSWORD:-password}
- PORT=8000
- db_backend=neo4j
neo4j:
image: neo4j:5.26.2
profiles: [""]
healthcheck:
test:
[
"CMD-SHELL",
"wget -qO- http://localhost:${NEO4J_PORT:-7474} || exit 1",
]
interval: 1s
timeout: 10s
retries: 10
start_period: 3s
ports:
- "7474:7474" # HTTP
- "${NEO4J_PORT:-7687}:${NEO4J_PORT:-7687}" # Bolt
volumes:
- neo4j_data:/data
environment:
- NEO4J_AUTH=${NEO4J_USER:-neo4j}/${NEO4J_PASSWORD:-password}
falkordb:
image: falkordb/falkordb:latest
profiles: ["falkordb"]
ports:
- "6379:6379"
volumes:
- falkordb_data:/data
environment:
- FALKORDB_ARGS=--port 6379 --cluster-enabled no
healthcheck:
test: ["CMD", "redis-cli", "-p", "6379", "ping"]
interval: 1s
timeout: 10s
retries: 10
start_period: 3s
graph-falkordb:
build:
args:
INSTALL_FALKORDB: "true"
context: .
profiles: ["falkordb"]
ports:
- "8001:8001"
depends_on:
falkordb:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8001/healthcheck')"]
interval: 10s
timeout: 5s
retries: 3
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- FALKORDB_HOST=falkordb
- FALKORDB_PORT=6379
- FALKORDB_DATABASE=default_db
- GRAPHITI_BACKEND=falkordb
- PORT=8001
- db_backend=falkordb
volumes:
neo4j_data:
falkordb_data: