Skip to content

Commit a63f626

Browse files
Thomas TupperThomas Tupper
authored andcommitted
docs: significantly expand deployment runbook for beginners
1 parent 4867ba8 commit a63f626

2 files changed

Lines changed: 143 additions & 24 deletions

File tree

README.md

Lines changed: 63 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,82 @@
11
# foxmemory-deploy
22

3-
Deployment pack for FoxMemory.
3+
Deployment recipes for the FoxMemory stack.
44

5-
## Modes
6-
1. `compose.one.yml` — one-node (infer + store-with-embedded-qdrant)
7-
2. `compose.split.yml` — split topology (infer and store on different infrastructure)
8-
3. `compose.external.yml` — store only; inference via external OpenAI-compatible API
5+
If you’re new to infra: this repo is the "how to run it" layer. It does not contain core API code; it contains Docker Compose topologies and runbooks.
6+
7+
## What this repo is for
8+
9+
- Start FoxMemory services with sane defaults
10+
- Choose a topology based on your environment
11+
- Provide smoke tests and operations runbooks
12+
13+
## Topologies
14+
15+
1. **`compose.one.yml`** — one-node stack (`infer` + `store`)
16+
2. **`compose.split.yml`** — split deployment across environments
17+
3. **`compose.external.yml`** — only `store`; inference from an external OpenAI-compatible provider
18+
19+
---
920

1021
## Quick start (one-node)
22+
1123
```bash
1224
cp .env.example .env
1325
docker compose -f compose.one.yml up -d
1426
```
1527

16-
## Verify
28+
Health checks:
29+
1730
```bash
1831
curl -s http://localhost:8081/health
1932
curl -s http://localhost:8082/health
2033
```
2134

22-
## Smoke test
35+
Stop:
36+
2337
```bash
24-
curl -s -X POST http://localhost:8082/v1/memories \
25-
-H 'content-type: application/json' \
26-
-d '{"user_id":"demo","messages":[{"role":"user","content":"I like sci-fi movies"}]}'
38+
docker compose -f compose.one.yml down -v
39+
```
40+
41+
---
42+
43+
## Smoke tests
2744

28-
curl -s -X POST http://localhost:8082/v1/memories/search \
29-
-H 'content-type: application/json' \
30-
-d '{"user_id":"demo","query":"movie preference","top_k":5}'
45+
### One-node smoke
46+
47+
```bash
48+
bash scripts/smoke-one.sh
3149
```
3250

33-
## Design contract
34-
- `foxmemory-store` requires no external container other than optional `foxmemory-infer`.
35-
- Inference integration uses OpenAI-compatible API shape.
36-
- Embedded Qdrant is included in store container for two-container deployments.
51+
### External-provider smoke
52+
53+
```bash
54+
cp .env.example .env
55+
# set OPENAI_BASE_URL and OPENAI_API_KEY for your provider
56+
bash scripts/smoke-external.sh
57+
```
58+
59+
---
60+
61+
## Env file basics
62+
63+
The `.env` file configures image tags, model names, and provider keys.
64+
65+
Most important fields:
66+
67+
- `FOXMEMORY_INFER_IMAGE`
68+
- `FOXMEMORY_STORE_IMAGE`
69+
- `OPENAI_BASE_URL`
70+
- `OPENAI_API_KEY`
71+
- `MEM0_LLM_MODEL`
72+
- `MEM0_EMBED_MODEL`
73+
74+
---
75+
76+
## Docs to read next
77+
78+
- `docs/RUNBOOK.md` — step-by-step operations guide
79+
80+
## License
81+
82+
MIT (see `LICENSE` in service repos)

docs/RUNBOOK.md

Lines changed: 80 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,102 @@
1-
# Runbook
1+
# FoxMemory Deploy Runbook (n00b-friendly)
2+
3+
This runbook assumes you are new to containers and just want a reliable checklist.
4+
5+
## 0) Prerequisites
6+
7+
- Docker Desktop (or Docker Engine + Compose plugin)
8+
- Ports available: `8081` and `8082`
9+
- Internet access if pulling images from Docker Hub
10+
11+
## 1) Prepare env
212

3-
## Start one-node mode
413
```bash
514
cp .env.example .env
15+
```
16+
17+
Open `.env` and verify values:
18+
- image names point to valid images
19+
- `OPENAI_BASE_URL` points where you think it does
20+
- model names exist in your inference backend
21+
22+
## 2) Start one-node stack
23+
24+
```bash
625
docker compose -f compose.one.yml up -d
726
```
827

9-
## Health checks
28+
## 3) Validate service health
29+
1030
```bash
1131
curl -s http://localhost:8081/health
1232
curl -s http://localhost:8082/health
1333
```
1434

15-
## Basic memory write/search
35+
Expected: both return JSON with `ok: true`.
36+
37+
## 4) Validate memory path
38+
39+
Write:
40+
1641
```bash
1742
curl -s -X POST http://localhost:8082/v1/memories \
1843
-H 'content-type: application/json' \
19-
-d '{"user_id":"demo","messages":[{"role":"user","content":"remember I prefer concise responses"}]}'
44+
-d '{"user_id":"demo","messages":[{"role":"user","content":"remember I prefer concise replies"}]}'
45+
```
2046

47+
Search:
48+
49+
```bash
2150
curl -s -X POST http://localhost:8082/v1/memories/search \
2251
-H 'content-type: application/json' \
2352
-d '{"user_id":"demo","query":"response preference","top_k":5}'
2453
```
2554

26-
## Stop
55+
## 5) Tear down
56+
2757
```bash
28-
docker compose -f compose.one.yml down
58+
docker compose -f compose.one.yml down -v
59+
rm -f .env
2960
```
61+
62+
---
63+
64+
## Common failures and fixes
65+
66+
### A) `service has neither an image nor a build context`
67+
68+
Cause: env vars for image names are missing.
69+
70+
Fix: ensure `.env` exists and includes `FOXMEMORY_INFER_IMAGE` + `FOXMEMORY_STORE_IMAGE`.
71+
72+
### B) `401 Incorrect API key` during memory write
73+
74+
Cause: store is calling a provider that requires a real key, or provider base URL not correctly applied.
75+
76+
Fix:
77+
- verify `OPENAI_BASE_URL`
78+
- verify `OPENAI_API_KEY`
79+
- verify provider accepts OpenAI-compatible API shape
80+
81+
### C) Qdrant connection refused (`127.0.0.1:6333`)
82+
83+
Cause: embedded Qdrant not started or not reachable from store process.
84+
85+
Fix:
86+
- check store logs
87+
- verify image version and entrypoint behavior
88+
- verify qdrant-related env vars
89+
90+
Logs:
91+
92+
```bash
93+
docker compose -f compose.one.yml logs --tail=200 store infer
94+
```
95+
96+
---
97+
98+
## Operational tips
99+
100+
- Pin images to explicit tags in production (avoid `latest`)
101+
- Keep a known-good `.env` template per environment
102+
- Add CI smoke tests for every image publish

0 commit comments

Comments
 (0)