|
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 |
2 | 12 |
|
3 | | -## Start one-node mode |
4 | 13 | ```bash |
5 | 14 | 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 |
6 | 25 | docker compose -f compose.one.yml up -d |
7 | 26 | ``` |
8 | 27 |
|
9 | | -## Health checks |
| 28 | +## 3) Validate service health |
| 29 | + |
10 | 30 | ```bash |
11 | 31 | curl -s http://localhost:8081/health |
12 | 32 | curl -s http://localhost:8082/health |
13 | 33 | ``` |
14 | 34 |
|
15 | | -## Basic memory write/search |
| 35 | +Expected: both return JSON with `ok: true`. |
| 36 | + |
| 37 | +## 4) Validate memory path |
| 38 | + |
| 39 | +Write: |
| 40 | + |
16 | 41 | ```bash |
17 | 42 | curl -s -X POST http://localhost:8082/v1/memories \ |
18 | 43 | -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 | +``` |
20 | 46 |
|
| 47 | +Search: |
| 48 | + |
| 49 | +```bash |
21 | 50 | curl -s -X POST http://localhost:8082/v1/memories/search \ |
22 | 51 | -H 'content-type: application/json' \ |
23 | 52 | -d '{"user_id":"demo","query":"response preference","top_k":5}' |
24 | 53 | ``` |
25 | 54 |
|
26 | | -## Stop |
| 55 | +## 5) Tear down |
| 56 | + |
27 | 57 | ```bash |
28 | | -docker compose -f compose.one.yml down |
| 58 | +docker compose -f compose.one.yml down -v |
| 59 | +rm -f .env |
29 | 60 | ``` |
| 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