Skip to content

Genericize personal references; add Docker Compose deployment#47

Merged
imonroe merged 4 commits into
mainfrom
claude/vigilant-maxwell-UJcNj
May 24, 2026
Merged

Genericize personal references; add Docker Compose deployment#47
imonroe merged 4 commits into
mainfrom
claude/vigilant-maxwell-UJcNj

Conversation

@imonroe
Copy link
Copy Markdown
Owner

@imonroe imonroe commented May 24, 2026

Summary

Two related changes to make the project easy for any user to self-host:

1. Remove personal references

  • Replaced the hardcoded user identity (ian / ian_memories) everywhere it appeared — docs, examples, smoke scripts, and code defaults — with generic, configurable values.
  • Code defaults now: MEM0_COLLECTION defaults to memories; the example MEM0_DEFAULT_USER_ID is default-user.
  • The OAuth JWT sub and the static-token client_id now derive from MEM0_DEFAULT_USER_ID instead of a hardcoded name (previously they were the literal "ian"). Tests updated accordingly.
  • PRD Owner and "Ian's machines" wording genericized; example memory content rewritten.

2. New Docker Compose deployment method

  • Added docker-compose.yml that brings up Qdrant + the app together in one stack for users who don't run CapRover. It overrides QDRANT_HOST/QDRANT_PORT/QDRANT_HTTPS to the in-stack Qdrant service and pulls secrets from .env.
  • New User Guide sections: "Choosing a deployment method" and "Deploying with Docker Compose". README and Developer Guide updated. CapRover docs are retained as the second method.

Test plan

  • ruff check app/ — clean
  • pytest -q — 73 passed
  • docker compose config validates (with env present)
  • Smoke test docker compose up -d against real Anthropic/OpenAI keys

https://claude.ai/code/session_01NbtHh4JhSBcc7AjLH2SjWB


Generated by Claude Code

claude added 2 commits May 24, 2026 16:00
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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 sub and static-token client_id derive from MEM0_DEFAULT_USER_ID.
  • Added docker-compose.yml plus 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.

Comment thread docker-compose.yml Outdated

services:
qdrant:
image: qdrant/qdrant:latest
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docker-compose.yml Outdated
@@ -0,0 +1,44 @@
# Self-contained mem0-server stack: Qdrant + the app in one process group.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded to "one Docker Compose project (two containers)" in 72a73e7.


Generated by Claude Code

claude added 2 commits May 24, 2026 16:17
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
@imonroe imonroe merged commit d1afbd1 into main May 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants