Skip to content

Improve Docker reliability and document compose usage#138

Merged
nullure merged 2 commits intoCaviraOSS:mainfrom
stevo1403:docs/docker-setup-fixes
Feb 24, 2026
Merged

Improve Docker reliability and document compose usage#138
nullure merged 2 commits intoCaviraOSS:mainfrom
stevo1403:docs/docker-setup-fixes

Conversation

@stevo1403
Copy link
Contributor

@stevo1403 stevo1403 commented Feb 20, 2026

Summary

  • make dashboard opt-in via compose profile (ui) so default startup focuses on API/MCP
  • remove obsolete version key from docker-compose.yml
  • switch packages/openmemory-js/Dockerfile to node:20-bookworm-slim + npm ci build flow
  • increase Node heap during TS build to avoid Docker OOM (NODE_OPTIONS=--max-old-space-size=4096)
  • document Docker usage in README (default API/MCP command, optional dashboard profile, health checks)

Validation

  • docker compose up --build -d
  • verified container starts on :8080 and server boots successfully

Copilot AI review requested due to automatic review settings February 20, 2026 18:52
Copy link

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 improves Docker reliability and usability by simplifying the build process and making the dashboard optional. The changes address issues from previous PRs (#4, #5) related to Docker build failures and streamline the container setup for production use.

Changes:

  • Switched from Alpine + Bun to Bookworm-slim + npm for more reliable builds
  • Made dashboard opt-in via Docker Compose profile to focus default startup on API/MCP
  • Documented Docker usage patterns including optional dashboard profile and health check commands

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/openmemory-js/Dockerfile Replaced Alpine+Bun with Bookworm-slim+npm, added NODE_OPTIONS heap increase, simplified user creation for Debian-based image
docker-compose.yml Removed deprecated version key, added ui profile to dashboard service for opt-in behavior
README.md Added documentation for Docker usage with profile examples and health check verification commands

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@stevo1403
Copy link
Contributor Author

Follow-up (clean formatting): addressed Copilot feedback in commit 4220bd1.

  • Dockerfile: scoped build memory option to the build command only: RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build
  • docker-compose.yml: replaced openmemory wget healthcheck with a Node-based healthcheck so it does not depend on wget in the runtime image

Validation rerun: docker compose up --build -d; service starts and healthcheck runs.

Copy link

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

hammashamzah added a commit to hammashamzah/OpenMemory that referenced this pull request Feb 23, 2026
- Remove dashboard service (source files missing from main branch due to
  botched merge in b04bf6e - Dockerfile exists but no Next.js source)
- Remove deprecated version: '3.8' key
- Replace wget healthcheck with Node.js inline healthcheck (more reliable
  in slim images, same fix as proposed in PR CaviraOSS#138)
- Clean up OM_IDE_ALLOWED_ORIGINS default (remove localhost refs)
@nullure nullure merged commit 30c1785 into CaviraOSS:main Feb 24, 2026
3 of 4 checks passed
@mirsella
Copy link

mirsella commented Feb 24, 2026

hello !

still having this issue when running with the ui profile:

✦ ❯ docker compose --profile ui up --build -d
[+] Building 2.8s (19/34)
 => [internal] load local bake definitions                                                                                                                                                 0.0s
 => => reading from stdin 1.04kB                                                                                                                                                           0.0s
 => [openmemory internal] load build definition from Dockerfile                                                                                                                            0.1s
 => => transferring dockerfile: 1.52kB                                                                                                                                                     0.0s
 => [dashboard internal] load build definition from Dockerfile                                                                                                                             0.1s
 => => transferring dockerfile: 915B                                                                                                                                                       0.0s
 => [openmemory internal] load metadata for docker.io/library/node:20-bookworm-slim                                                                                                        0.7s
 => [auth] library/node:pull token for registry-1.docker.io                                                                                                                                0.0s
 => [dashboard internal] load metadata for docker.io/library/node:20-alpine                                                                                                                0.6s
 => [dashboard internal] load .dockerignore                                                                                                                                                0.1s
 => => transferring context: 2B                                                                                                                                                            0.0s
 => [openmemory internal] load .dockerignore                                                                                                                                               0.1s
 => => transferring context: 2B                                                                                                                                                            0.0s
 => [dashboard builder 1/6] FROM docker.io/library/node:20-alpine@sha256:09e2b3d9726018aecf269bd35325f46bf75046a643a66d28360ec71132750ec8                                                  0.0s
 => [dashboard internal] load build context                                                                                                                                                0.1s
 => => transferring context: 32B                                                                                                                                                           0.0s
 => [openmemory internal] load build context                                                                                                                                               0.3s
 => => transferring context: 256.96kB                                                                                                                                                      0.1s
 => [openmemory builder 1/8] FROM docker.io/library/node:20-bookworm-slim@sha256:c6585df72c34172bebd8d36abed961e231d7d3b5cee2e01294c4495e8a03f687                                          0.0s
 => CACHED [dashboard builder 2/6] WORKDIR /app                                                                                                                                            0.0s
 => CACHED [dashboard builder 3/6] COPY package*.json ./                                                                                                                                   0.0s
 => ERROR [dashboard production 4/8] RUN npm install --omit=dev                                                                                                                            0.9s
 => ERROR [dashboard builder 4/6] RUN npm install                                                                                                                                          1.0s
 => CACHED [openmemory builder 2/8] WORKDIR /app                                                                                                                                           0.0s
 => [openmemory builder 3/8] COPY package*.json ./                                                                                                                                         0.3s
 => CANCELED [openmemory builder 4/8] RUN npm ci                                                                                                                                           1.1s
------
 > [dashboard production 4/8] RUN npm install --omit=dev:
0.766 npm error code ENOENT
0.766 npm error syscall open
0.766 npm error path /app/package.json
0.766 npm error errno -2
0.766 npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/app/package.json'
0.766 npm error enoent This is related to npm not being able to find a file.
0.766 npm error enoent
0.767 npm error A complete log of this run can be found in: /root/.npm/_logs/2026-02-24T08_35_55_872Z-debug-0.log
------
------
 > [dashboard builder 4/6] RUN npm install:
0.853 npm error code ENOENT
0.853 npm error syscall open
0.853 npm error path /app/package.json
0.854 npm error errno -2
0.854 npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/app/package.json'
0.854 npm error enoent This is related to npm not being able to find a file.
0.854 npm error enoent
0.854 npm error A complete log of this run can be found in: /root/.npm/_logs/2026-02-24T08_35_55_952Z-debug-0.log
------
[+] up 0/2
 ⠙ Image openmemory-dashboard  Building                                                                                                                                                     2.9s
 ⠙ Image openmemory-openmemory Building                                                                                                                                                     2.9s
Dockerfile:23

--------------------

  21 |     # Install only production dependencies

  22 |     COPY package*.json ./

  23 | >>> RUN npm install --omit=dev

  24 |

  25 |     # Copy built assets from builder

--------------------

target dashboard: failed to solve: process "/bin/sh -c npm install --omit=dev" did not complete successfully: exit code: 254

@stevo1403
Copy link
Contributor Author

stevo1403 commented Feb 24, 2026

@mirsella

I have gotten to the root of the bug.

Will push soon.

@stevo1403
Copy link
Contributor Author

Follow-up fix PR is now open: #143

Context: #138 merged before the dashboard restore commits were in its branch. #143 contains the missing dashboard source restore + dashboard memory listing fix, and is the one to test for --profile ui build issues.

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.

4 participants