forked from getzep/graphiti
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
126 lines (124 loc) · 4.39 KB
/
Copy pathdocker-compose.yml
File metadata and controls
126 lines (124 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
services:
graph:
profiles: [""]
build:
context: .
# Localhost-bound, not the bare "8000:8000": the key below is committed, so publishing on
# every interface would hand the graph to anyone on the network. Drop the prefix to reach
# this from another machine, and set your own key in the same edit.
ports:
- "127.0.0.1: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
# Everything else comes straight from .env, so the settings documented in .env.example
# reach the container. Listing them individually would pass a blank for each one left
# out, and blank is not unset: SEMAPHORE_LIMIT is read as int(os.getenv(...)), so '' is a
# crash on import.
env_file:
- path: .env
required: false
# Compose-specific wiring, which has to win over .env — these hostnames only exist on the
# compose network. environment takes precedence over env_file.
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
# Mandatory, so the stack needs one to boot. Named insecure- because it is committed and
# protects nothing; the localhost binding above is what does.
- GRAPHITI_API_KEY=${GRAPHITI_API_KEY:-insecure-local-dev-key}
- NEO4J_URI=bolt://neo4j:${NEO4J_PORT:-7687}
- NEO4J_USER=${NEO4J_USER:-neo4j}
- NEO4J_PASSWORD=${NEO4J_PASSWORD:-password}
- DB_BACKEND=neo4j
# Pinned because the CMD honours PORT: the mapping and healthcheck both name 8000, so a
# PORT inherited from .env would move the server out from under them. To publish
# elsewhere, change the left-hand side of the mapping.
- PORT=8000
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
# Localhost-bound, as above, with more at stake: the password defaults to `password` and
# Bolt is unmediated write access.
ports:
- "127.0.0.1:7474:7474" # HTTP
- "127.0.0.1:${NEO4J_PORT:-7687}:${NEO4J_PORT:-7687}" # Bolt
volumes:
- neo4j_data:/data
environment:
- NEO4J_AUTH=${NEO4J_USER:-neo4j}/${NEO4J_PASSWORD:-password}
falkordb:
# Kept in step with render.yaml so local dev matches what Render runs.
image: falkordb/falkordb:v4.20.1
profiles: ["falkordb"]
# Localhost-bound, as above, and FalkorDB has no password at all. On Render it's a pserv
# reachable only from graphiti-api; this is the closest local equivalent.
ports:
- "127.0.0.1:6379:6379"
volumes:
- falkordb_data:/var/lib/falkordb/data
environment:
# REDIS_ARGS goes to redis-server, FALKORDB_ARGS to the module. The flags that used to
# sit in FALKORDB_ARGS were redis-server flags in the module's slot, and both were
# already the defaults. Append-only matches render.yaml.
- REDIS_ARGS=--appendonly yes
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"]
# Localhost-bound, as above.
ports:
- "127.0.0.1:8001:8000"
depends_on:
falkordb:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/healthcheck')"]
interval: 10s
timeout: 5s
retries: 3
# See the note on the graph service above.
env_file:
- path: .env
required: false
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
# See the note on the graph service above.
- GRAPHITI_API_KEY=${GRAPHITI_API_KEY:-insecure-local-dev-key}
- FALKORDB_HOST=falkordb
- FALKORDB_PORT=6379
- FALKORDB_DATABASE=default_db
- DB_BACKEND=falkordb
# Pinned as on the graph service above. Published on 8001 to leave 8000 free for the
# neo4j profile; the container still listens on 8000.
- PORT=8000
volumes:
neo4j_data:
falkordb_data: