-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
38 lines (36 loc) · 1.33 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
38 lines (36 loc) · 1.33 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
# memnos production stack — Postgres(pgvector) + memnos memory server, both managed
# (healthchecks + restart). Self-hostable, one command: docker compose -f docker-compose.prod.yml up -d
services:
db:
image: pgvector/pgvector:pg16
environment:
POSTGRES_USER: memnos
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me}
POSTGRES_DB: memnos
volumes:
- memnos_pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U memnos -d memnos"]
interval: 5s
timeout: 3s
retries: 20
restart: unless-stopped
memnos:
build: { context: ., dockerfile: Dockerfile }
environment:
MEMNOS_DSN: postgresql://memnos:${POSTGRES_PASSWORD:-change-me}@db:5432/memnos
MEMNOS_PORT: "8900"
MEMNOS_POOL_MAX: "16"
OPENAI_API_KEY: ${OPENAI_API_KEY:-} # set → 1536-d + extraction; unset → free local
ports:
- "127.0.0.1:8900:8900" # bind localhost; put TLS reverse proxy in front for remote
depends_on:
db: { condition: service_healthy }
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8900/readyz').status==200 else 1)\""]
interval: 15s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
memnos_pgdata: