-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
266 lines (247 loc) · 11.5 KB
/
Copy pathcompose.yaml
File metadata and controls
266 lines (247 loc) · 11.5 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
name: rememberstack
x-app: &app
build:
context: .
dockerfile: Dockerfile
args:
# Stamped into the image so the benchmark can verify what actually ran.
# Empty when the caller does not supply it; released images get the tag's
# commit from CI.
REMEMBERSTACK_BUILD_REVISION: ${REMEMBERSTACK_BUILD_REVISION:-}
image: ghcr.io/writeitai/remember-stack:0.16.0
environment:
REMEMBERSTACK_DATABASE_URL: postgresql+psycopg://${REMEMBERSTACK_POSTGRES_USER}:${REMEMBERSTACK_POSTGRES_PASSWORD}@postgres:5432/${REMEMBERSTACK_POSTGRES_DB}
REMEMBERSTACK_MINIO_ENDPOINT_URL: http://minio:9000
REMEMBERSTACK_MINIO_ACCESS_KEY: ${REMEMBERSTACK_MINIO_ACCESS_KEY}
REMEMBERSTACK_MINIO_SECRET_KEY: ${REMEMBERSTACK_MINIO_SECRET_KEY}
REMEMBERSTACK_OPENROUTER_API_KEY: ${REMEMBERSTACK_OPENROUTER_API_KEY}
REMEMBERSTACK_OPENROUTER_EMBEDDING_PROVIDER: ${REMEMBERSTACK_OPENROUTER_EMBEDDING_PROVIDER:-}
REMEMBERSTACK_OPENROUTER_EMBEDDING_PROVIDER_ORDER: ${REMEMBERSTACK_OPENROUTER_EMBEDDING_PROVIDER_ORDER:-}
REMEMBERSTACK_OPENROUTER_MAX_COMPLETION_TOKENS: ${REMEMBERSTACK_OPENROUTER_MAX_COMPLETION_TOKENS:-}
REMEMBERSTACK_OPENROUTER_REASONING_EFFORT: ${REMEMBERSTACK_OPENROUTER_REASONING_EFFORT:-}
REMEMBERSTACK_OPENROUTER_REASONING_EFFORT_MAP: ${REMEMBERSTACK_OPENROUTER_REASONING_EFFORT_MAP:-}
REMEMBERSTACK_OPENROUTER_INVALID_COMPLETION_CAPTURE_DIR: ${REMEMBERSTACK_OPENROUTER_INVALID_COMPLETION_CAPTURE_DIR:-}
REMEMBERSTACK_SELFHOST_DEPLOYMENT_ID: ${REMEMBERSTACK_SELFHOST_DEPLOYMENT_ID}
REMEMBERSTACK_SELFHOST_DEPLOYMENT_SLUG: ${REMEMBERSTACK_SELFHOST_DEPLOYMENT_SLUG}
REMEMBERSTACK_SELFHOST_DEPLOYMENT_NAME: ${REMEMBERSTACK_SELFHOST_DEPLOYMENT_NAME}
REMEMBERSTACK_SELFHOST_API_PORT: "8000"
# Believe X-Ingest-Principal-* on POST /ingest (D101). Leave false unless
# this deployment is reachable ONLY by a control plane that already
# authenticated the actor it names; on a public perimeter attribution
# would be meaningless. Untrusted claims are ignored, never rejected.
REMEMBERSTACK_SELFHOST_TRUSTED_PRINCIPAL_SOURCE: "${REMEMBERSTACK_SELFHOST_TRUSTED_PRINCIPAL_SOURCE:-false}"
REMEMBERSTACK_SELFHOST_API_BEARER_BIND: ${REMEMBERSTACK_SELFHOST_API_BEARER_BIND:-}
REMEMBERSTACK_SELFHOST_API_BEARER_TOKEN: ${REMEMBERSTACK_SELFHOST_API_BEARER_TOKEN:-}
REMEMBERSTACK_SELFHOST_REQUIRE_API_AUTH: ${REMEMBERSTACK_SELFHOST_REQUIRE_API_AUTH:-false}
# Browser origins allowed to call this deployment. Empty advertises no
# CORS at all, which is the right default for a deployment no app points at.
REMEMBERSTACK_SELFHOST_BROWSER_ORIGINS: ${REMEMBERSTACK_SELFHOST_BROWSER_ORIGINS:-}
REMEMBERSTACK_SELFHOST_SPEND_LEASE_URL: ${REMEMBERSTACK_SELFHOST_SPEND_LEASE_URL:-}
REMEMBERSTACK_SELFHOST_METER_INGEST_URL: ${REMEMBERSTACK_SELFHOST_METER_INGEST_URL:-}
REMEMBERSTACK_SELFHOST_METER_INGEST_TOKEN: ${REMEMBERSTACK_SELFHOST_METER_INGEST_TOKEN:-}
REMEMBERSTACK_SELFHOST_METER_IDENTITY_KEY: ${REMEMBERSTACK_SELFHOST_METER_IDENTITY_KEY:-}
REMEMBERSTACK_SELFHOST_METER_ORG_ID: ${REMEMBERSTACK_SELFHOST_METER_ORG_ID:-}
REMEMBERSTACK_SELFHOST_METER_PROJECT_ID: ${REMEMBERSTACK_SELFHOST_METER_PROJECT_ID:-}
REMEMBERSTACK_SELFHOST_REQUIRE_METERING: ${REMEMBERSTACK_SELFHOST_REQUIRE_METERING:-false}
REMEMBERSTACK_SELFHOST_CONVERSION_ROUTES: ${REMEMBERSTACK_SELFHOST_CONVERSION_ROUTES:-}
REMEMBERSTACK_SELFHOST_INGEST_BODY_MAX_BYTES: ${REMEMBERSTACK_SELFHOST_INGEST_BODY_MAX_BYTES:-}
REMEMBERSTACK_MISTRAL_OCR_API_KEY: ${REMEMBERSTACK_MISTRAL_OCR_API_KEY:-}
REMEMBERSTACK_MISTRAL_OCR_BASE_URL: ${REMEMBERSTACK_MISTRAL_OCR_BASE_URL:-https://api.mistral.ai}
REMEMBERSTACK_MISTRAL_OCR_MODEL: ${REMEMBERSTACK_MISTRAL_OCR_MODEL:-mistral-ocr-latest}
REMEMBERSTACK_MISTRAL_OCR_TIMEOUT_S: ${REMEMBERSTACK_MISTRAL_OCR_TIMEOUT_S:-300}
REMEMBERSTACK_MISTRAL_OCR_MAX_DOCUMENT_BYTES: ${REMEMBERSTACK_MISTRAL_OCR_MAX_DOCUMENT_BYTES:-50000000}
REMEMBERSTACK_MISTRAL_OCR_INCLUDE_IMAGES: ${REMEMBERSTACK_MISTRAL_OCR_INCLUDE_IMAGES:-true}
REMEMBERSTACK_MISTRAL_OCR_TABLE_FORMAT: ${REMEMBERSTACK_MISTRAL_OCR_TABLE_FORMAT:-markdown}
REMEMBERSTACK_MISTRAL_OCR_EXTRACT_HEADERS_AND_FOOTERS: ${REMEMBERSTACK_MISTRAL_OCR_EXTRACT_HEADERS_AND_FOOTERS:-true}
REMEMBERSTACK_MISTRAL_OCR_CONFIDENCE_GRANULARITY: ${REMEMBERSTACK_MISTRAL_OCR_CONFIDENCE_GRANULARITY:-word}
REMEMBERSTACK_MISTRAL_OCR_KEEP_PROVIDER_RESPONSE: ${REMEMBERSTACK_MISTRAL_OCR_KEEP_PROVIDER_RESPONSE:-true}
REMEMBERSTACK_MISTRAL_OCR_PRICE_USD_PER_1000_PAGES: ${REMEMBERSTACK_MISTRAL_OCR_PRICE_USD_PER_1000_PAGES:-1}
REMEMBERSTACK_SELFHOST_GRAPH_POOL_SIZE: ${REMEMBERSTACK_SELFHOST_GRAPH_POOL_SIZE:-4}
REMEMBERSTACK_SELFHOST_GRAPH_POOL_TIMEOUT_S: ${REMEMBERSTACK_SELFHOST_GRAPH_POOL_TIMEOUT_S:-1}
REMEMBERSTACK_SELFHOST_GRAPH_MAX_CONCURRENCY: ${REMEMBERSTACK_SELFHOST_GRAPH_MAX_CONCURRENCY:-2}
REMEMBERSTACK_SELFHOST_GRAPH_WORK_MEM_KIB: ${REMEMBERSTACK_SELFHOST_GRAPH_WORK_MEM_KIB:-16384}
REMEMBERSTACK_SELFHOST_RETRIEVAL_POOL_SIZE: ${REMEMBERSTACK_SELFHOST_RETRIEVAL_POOL_SIZE:-4}
REMEMBERSTACK_SELFHOST_RETRIEVAL_POOL_TIMEOUT_S: ${REMEMBERSTACK_SELFHOST_RETRIEVAL_POOL_TIMEOUT_S:-1}
REMEMBERSTACK_SELFHOST_RETRIEVAL_MAX_CONCURRENCY: ${REMEMBERSTACK_SELFHOST_RETRIEVAL_MAX_CONCURRENCY:-4}
REMEMBERSTACK_SENTRY_DSN: ${REMEMBERSTACK_SENTRY_DSN:-}
REMEMBERSTACK_SENTRY_ENVIRONMENT: ${REMEMBERSTACK_SENTRY_ENVIRONMENT:-}
REMEMBERSTACK_SENTRY_SAMPLE_RATE: ${REMEMBERSTACK_SENTRY_SAMPLE_RATE:-}
LANGFUSE_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY:-}
LANGFUSE_SECRET_KEY: ${LANGFUSE_SECRET_KEY:-}
LANGFUSE_HOST: ${LANGFUSE_HOST:-}
# D79: STRUCTURER now names only the anchor-proposal fallback seat.
REMEMBERSTACK_STRUCTURER_MODEL: ${REMEMBERSTACK_STRUCTURER_MODEL:-openai/gpt-5.6-luna}
REMEMBERSTACK_SKELETON_CHECK_MODEL: ${REMEMBERSTACK_SKELETON_CHECK_MODEL:-z-ai/glm-4.7-flash}
REMEMBERSTACK_ROLE_MODEL: ${REMEMBERSTACK_ROLE_MODEL:-z-ai/glm-4.7-flash}
REMEMBERSTACK_SUMMARY_MODEL: ${REMEMBERSTACK_SUMMARY_MODEL:-z-ai/glm-4.7-flash}
REMEMBERSTACK_E1_EMBEDDING_MODEL: ${REMEMBERSTACK_E1_EMBEDDING_MODEL:-qwen/qwen3-embedding-8b}
REMEMBERSTACK_E1_PREFIX_MODEL: ${REMEMBERSTACK_E1_PREFIX_MODEL:-openai/gpt-5.6-luna}
REMEMBERSTACK_E2_EXTRACT_MODEL: ${REMEMBERSTACK_E2_EXTRACT_MODEL:-openai/gpt-5.6-luna}
REMEMBERSTACK_E3_NORMALIZE_MODEL: ${REMEMBERSTACK_E3_NORMALIZE_MODEL:-openai/gpt-5.6-luna}
REMEMBERSTACK_OBS_SMALL_MODEL: ${REMEMBERSTACK_OBS_SMALL_MODEL:-openai/gpt-5.6-luna}
REMEMBERSTACK_OBS_FRONTIER_MODEL: ${REMEMBERSTACK_OBS_FRONTIER_MODEL:-openai/gpt-5.6-sol}
REMEMBERSTACK_OBS_EMBEDDING_MODEL: ${REMEMBERSTACK_OBS_EMBEDDING_MODEL:-qwen/qwen3-embedding-8b}
REMEMBERSTACK_ADJUDICATOR_SMALL_MODEL: ${REMEMBERSTACK_ADJUDICATOR_SMALL_MODEL:-openai/gpt-5.6-luna}
REMEMBERSTACK_ADJUDICATOR_FRONTIER_MODEL: ${REMEMBERSTACK_ADJUDICATOR_FRONTIER_MODEL:-openai/gpt-5.6-sol}
REMEMBERSTACK_P1_EMBEDDING_MODEL: ${REMEMBERSTACK_P1_EMBEDDING_MODEL:-qwen/qwen3-embedding-8b}
REMEMBERSTACK_P1_LABEL_MODEL: ${REMEMBERSTACK_P1_LABEL_MODEL:-openai/gpt-5.6-luna}
volumes:
- app-state:/var/lib/rememberstack
- forget-manifests:/var/lib/rememberstack/forget-manifests
services:
postgres:
build:
context: .
dockerfile: Dockerfile.postgres
image: rememberstack-postgres:19beta3
command:
- postgres
- -c
- shared_preload_libraries=pg_textsearch,pg_partman_bgw
- -c
- pg_partman_bgw.dbname=${REMEMBERSTACK_POSTGRES_DB}
- -c
- pg_partman_bgw.role=${REMEMBERSTACK_POSTGRES_USER}
environment:
POSTGRES_USER: ${REMEMBERSTACK_POSTGRES_USER}
POSTGRES_PASSWORD: ${REMEMBERSTACK_POSTGRES_PASSWORD}
POSTGRES_DB: ${REMEMBERSTACK_POSTGRES_DB}
healthcheck:
test:
- CMD-SHELL
- >-
psql --username ${REMEMBERSTACK_POSTGRES_USER}
--dbname ${REMEMBERSTACK_POSTGRES_DB}
--tuples-only --command 'SELECT 1' >/dev/null
interval: 2s
timeout: 5s
retries: 30
volumes:
# Official PostgreSQL 18+ images keep major-version directories below
# this mount so pg_upgrade can link across a version boundary.
- postgres-data:/var/lib/postgresql
minio:
image: quay.io/minio/minio:RELEASE.2025-09-07T16-13-09Z@sha256:14cea493d9a34af32f524e538b8346cf79f3321eff8e708c1e2960462bd8936e
command: server /data --console-address :9001
environment:
MINIO_ROOT_USER: ${REMEMBERSTACK_MINIO_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${REMEMBERSTACK_MINIO_SECRET_KEY}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 2s
timeout: 5s
retries: 30
ports:
- "9001:9001"
volumes:
- minio-data:/data
setup:
<<: *app
command: ["setup"]
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
api:
<<: *app
command: ["api"]
depends_on:
setup:
condition: service_completed_successfully
healthcheck:
test:
- CMD
- python
- -c
- "import urllib.request; urllib.request.urlopen('http://localhost:8000/healthz', timeout=2).read()"
interval: 10s
timeout: 5s
retries: 30
ports:
- "${REMEMBERSTACK_SELFHOST_API_PORT}:8000"
worker-convert:
<<: *app
command: ["worker", "--stage", "convert"]
depends_on:
setup:
condition: service_completed_successfully
worker-structure:
<<: *app
command: ["worker", "--stage", "structure"]
depends_on:
setup:
condition: service_completed_successfully
worker-chunk:
<<: *app
command: ["worker", "--stage", "chunk"]
depends_on:
setup:
condition: service_completed_successfully
worker-embed-chunk:
<<: *app
command: ["worker", "--stage", "embed_chunk"]
depends_on:
setup:
condition: service_completed_successfully
worker-extract-claims:
<<: *app
command: ["worker", "--stage", "extract_claims"]
depends_on:
setup:
condition: service_completed_successfully
worker-normalize-relations:
<<: *app
command: ["worker", "--stage", "normalize_relations"]
depends_on:
setup:
condition: service_completed_successfully
worker-adjudicate-observations:
<<: *app
command: ["worker", "--stage", "adjudicate_observations"]
depends_on:
setup:
condition: service_completed_successfully
worker-adjudicate-supersession:
<<: *app
command: ["worker", "--stage", "adjudicate_supersession"]
depends_on:
setup:
condition: service_completed_successfully
worker-embed-claim:
<<: *app
command: ["worker", "--stage", "embed_claim"]
depends_on:
setup:
condition: service_completed_successfully
worker-reconcile:
<<: *app
command: ["worker", "--stage", "reconcile"]
depends_on:
setup:
condition: service_completed_successfully
worker-label-relation:
<<: *app
command: ["worker", "--stage", "label_relation"]
depends_on:
setup:
condition: service_completed_successfully
meter-receipts:
<<: *app
command: ["meter-receipts"]
profiles: ["managed"]
depends_on:
setup:
condition: service_completed_successfully
projections:
<<: *app
command: ["project", "--plane", "p3"]
profiles: ["operations"]
depends_on:
setup:
condition: service_completed_successfully
volumes:
app-state:
forget-manifests:
minio-data:
postgres-data: