Genericize personal references; add Docker Compose deployment#47
Merged
Conversation
Replace the single-user identity baked into docs, examples, and code defaults (collection name, default user id, OAuth subject, static token client_id) with generic, configurable values so anyone can self-host. Add a docker-compose.yml that bundles Qdrant and the app for users who don't run CapRover, plus User Guide / README / developer docs covering the new method. CapRover deployment docs are retained. https://claude.ai/code/session_01NbtHh4JhSBcc7AjLH2SjWB
Update the PRD's stale dependency pins (Appendix B + §4) to mirror the actual requirements.txt, mark the project Implemented, and generalize the deployment/vector-backend framing to cover Docker Compose. Genericize the owner-specific "Hermes Agent" client references to generic custom-agent wording across the PRD and README. https://claude.ai/code/session_01NbtHh4JhSBcc7AjLH2SjWB
There was a problem hiding this comment.
Pull request overview
This PR removes hardcoded personal identifiers from defaults/docs/tests and adds a Docker Compose-based deployment option so the service can be self-hosted without CapRover.
Changes:
- Replaced hardcoded user/collection references with configurable defaults (
MEM0_COLLECTION=memories,MEM0_DEFAULT_USER_ID=default-user) across code, tests, scripts, and docs. - Updated auth/OAuth token issuance so JWT
suband static-tokenclient_idderive fromMEM0_DEFAULT_USER_ID. - Added
docker-compose.ymlplus documentation updates describing Docker Compose as an additional supported deployment method.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_rest.py | Updates REST tests to assert the new default user id. |
| tests/test_oauth.py | Updates OAuth flow test expectations for sub. |
| tests/test_mcp.py | Updates MCP tool tests to assert the new default user id. |
| tests/test_config.py | Updates config test to match new default user id. |
| tests/test_auth.py | Updates auth tests for JWT sub and static-token client_id. |
| tests/conftest.py | Updates test environment defaults for MEM0_DEFAULT_USER_ID. |
| scripts/smoke.sh | Genericizes smoke-test example content/queries. |
| scripts/smoke_mcp.py | Genericizes MCP smoke-test example content/queries. |
| README.md | Adds Docker Compose deployment section and genericizes client wording. |
| docs/USER_GUIDE.md | Adds deployment-method selection guidance and Docker Compose deployment instructions. |
| docs/PRD.md | Genericizes PRD language and refreshes dependency/status/deployment framing. |
| docs/DEVELOPER_GUIDE.md | Documents Docker Compose as an additional deployment path. |
| docker-compose.yml | Introduces a self-contained Qdrant + app compose stack. |
| CLAUDE.md | Updates deployment notes to include Docker Compose. |
| app/oauth.py | Issues OAuth JWTs with sub derived from MEM0_DEFAULT_USER_ID. |
| app/config.py | Changes default mem0 collection name to memories. |
| app/auth.py | Makes static-token client_id derive from settings instead of a hardcoded value. |
| .env.example | Updates example env defaults for collection and default user id. |
Comments suppressed due to low confidence (1)
README.md:11
- The README still states the server "uses an existing external Qdrant instance" and "deploys to CapRover" as if those are required. With the new Docker Compose deployment (bundled Qdrant + app), this description is now inaccurate and may confuse new users. Update this sentence to describe both supported deployment modes (CapRover/external Qdrant vs Docker Compose/bundled Qdrant) or reword it to avoid implying external Qdrant/CapRover are mandatory.
It uses an existing external **Qdrant** instance as the vector backend, deploys to **CapRover**
on push to `main`, and ships a companion `mem0-backup` app that snapshots Qdrant to S3 nightly.
This is a **single-user** system: `MEM0_DEFAULT_USER_ID` is the only user.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| services: | ||
| qdrant: | ||
| image: qdrant/qdrant:latest |
Owner
Author
There was a problem hiding this comment.
Pinned to qdrant/qdrant:v1.18.0 (aligned with the qdrant-client==1.18.0 pin in requirements.txt) in 72a73e7, with a comment to bump both together.
Generated by Claude Code
| @@ -0,0 +1,44 @@ | |||
| # Self-contained mem0-server stack: Qdrant + the app in one process group. | |||
Owner
Author
There was a problem hiding this comment.
Add a User Guide section with copy-paste instruction blocks for CLAUDE.md, ChatGPT custom instructions, and a generic AGENTS.md, so agents reliably recall and save memory each session. Link it from the README. https://claude.ai/code/session_01NbtHh4JhSBcc7AjLH2SjWB
Pin qdrant/qdrant to v1.18.0 (aligned with the qdrant-client pin) for reproducible Docker Compose builds, reword the compose header to reflect that it runs two containers, and update the README intro so neither external Qdrant nor CapRover reads as mandatory now that Compose bundles Qdrant. https://claude.ai/code/session_01NbtHh4JhSBcc7AjLH2SjWB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related changes to make the project easy for any user to self-host:
1. Remove personal references
ian/ian_memories) everywhere it appeared — docs, examples, smoke scripts, and code defaults — with generic, configurable values.MEM0_COLLECTIONdefaults tomemories; the exampleMEM0_DEFAULT_USER_IDisdefault-user.suband the static-tokenclient_idnow derive fromMEM0_DEFAULT_USER_IDinstead of a hardcoded name (previously they were the literal"ian"). Tests updated accordingly.Ownerand "Ian's machines" wording genericized; example memory content rewritten.2. New Docker Compose deployment method
docker-compose.ymlthat brings up Qdrant + the app together in one stack for users who don't run CapRover. It overridesQDRANT_HOST/QDRANT_PORT/QDRANT_HTTPSto the in-stack Qdrant service and pulls secrets from.env.Test plan
ruff check app/— cleanpytest -q— 73 passeddocker compose configvalidates (with env present)docker compose up -dagainst real Anthropic/OpenAI keyshttps://claude.ai/code/session_01NbtHh4JhSBcc7AjLH2SjWB
Generated by Claude Code