fix(installer): mount docker-compose config volume to appuser home#772
fix(installer): mount docker-compose config volume to appuser home#772phernandez merged 1 commit intomainfrom
Conversation
The Dockerfile creates and switches to `appuser` (home: /home/appuser), but docker-compose.yml mounted the persistent config volume at /root/.basic-memory. appuser cannot write there, so the basic-memory CLI silently re-creates config and database under /home/appuser/.basic-memory inside the container's writable layer instead of the volume — losing all state on container restart. Move the mount to /home/appuser/.basic-memory to match where the running process actually writes. Closes #729 Signed-off-by: phernandez <paul@basicmachines.co>
|
Claude finished @phernandez's task in 1m 28s —— View job PR Review
SummaryThe fix in Checklist Results
Issues Found1.
Examples that need updating in # Current (wrong — appuser can't write here)
-v basic-memory-config:/app/.basic-memory:rw
# Should be
-v basic-memory-config:/home/appuser/.basic-memory:rwAffected blocks: lines 18, 33, 70–71, 89–91, 93, 101, 212–213, 251. 2. RUN mkdir -p /app/data/basic-memory /app/.basic-memory && \
chown -R appuser:${GID} /appIf the actual CLI config dir is VerdictApprove the Suggest following up (can be a separate PR) to:
|
Summary
appuser(UID/GID 1000) and switches to it before launching basic-memory.docker-compose.ymlmounts the persistent config volume at/root/.basic-memory— a directoryappuserhas no write access to./home/appuser/.basic-memory(in the writable layer), and that state is wiped on restart.This PR moves the mount target to
/home/appuser/.basic-memoryso the volume actually persists.Test plan
Dockerfile:42runs asappuserandDockerfile:22creates--create-homefor that user.BASIC_MEMORY_HOME=/app/data/basic-memoryonly sets the project-data root, not the CLI config dir, so the CLI default of~/.basic-memoryresolves to/home/appuser/.basic-memoryforappuser.docker compose up -d, runbasic-memory project add ...,docker compose down && up, confirm config + db persist.Closes #729
🤖 Generated with Claude Code