[PR #3202] [MERGED] [codex] Fix lite Docker runtime dependencies #5839

Closed
opened 2026-10-22 04:20:03 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3202
Author: @SpicyMarinara
Created: 7/4/2026
Status: ✅ Merged
Merged: 7/4/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/fix-lite-docker-fastify


📝 Commits (1)

  • 7b16c61 Fix lite Docker pnpm runtime deps

📊 Changes

1 file changed (+7 additions, -1 deletions)

View changed files

📝 Dockerfile.lite (+7 -1)

📄 Description

Linked issue

Closes #3201

Why this change

The lite Docker image installed production dependencies with pnpm's repo-local virtual store (virtual-store-dir=.pnpm), but the runtime dependency archive only copied node_modules and package-level node_modules folders. Server package symlinks such as packages/server/node_modules/fastify -> ../../../.pnpm/... became dangling links in the final image, so the container crashed at startup with ERR_MODULE_NOT_FOUND for fastify.

What changed

  • Include the root .pnpm virtual store in the lite runtime dependency archive so pnpm symlinks resolve inside the final image.
  • Prune onnxruntime packages from the actual .pnpm virtual store as well as the legacy node_modules/.pnpm path.
  • Add a Dockerfile build-time module-resolution smoke check for lite runtime dependencies (fastify, @fastify/cors, sharp) so broken symlink archives fail during image build instead of after release.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Reproduced the failure on current staging with docker build -f Dockerfile.lite -t marinara-lite-3201 . followed by docker run; startup exited with ERR_MODULE_NOT_FOUND: Cannot find package 'fastify' imported from /app/packages/server/dist/app.js.
  • Inspected the broken image and confirmed packages/server/node_modules/fastify pointed at ../../../.pnpm/... while /app/.pnpm was missing from the runtime image.
  • Built the fixed lite image with docker build -f Dockerfile.lite -t marinara-lite-3201-fixed --progress=plain .; the new dependency smoke check passed.
  • Started the fixed image with docker run -d -p 127.0.0.1::7860 -e AUTO_CREATE_DEFAULT_CONNECTION=false -e ALLOW_UNAUTHENTICATED_PRIVATE_NETWORK=true marinara-lite-3201-fixed and confirmed / served the app over HTTP.
  • Ran pnpm check locally.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Not applicable; Docker runtime fix only.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3202 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/4/2026 **Status:** ✅ Merged **Merged:** 7/4/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/fix-lite-docker-fastify` --- ### 📝 Commits (1) - [`7b16c61`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7b16c61c1317f7639764223eabcc386c305c606e) Fix lite Docker pnpm runtime deps ### 📊 Changes **1 file changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile.lite` (+7 -1) </details> ### 📄 Description ## Linked issue Closes #3201 ## Why this change The lite Docker image installed production dependencies with pnpm's repo-local virtual store (`virtual-store-dir=.pnpm`), but the runtime dependency archive only copied `node_modules` and package-level `node_modules` folders. Server package symlinks such as `packages/server/node_modules/fastify -> ../../../.pnpm/...` became dangling links in the final image, so the container crashed at startup with `ERR_MODULE_NOT_FOUND` for `fastify`. ## What changed - Include the root `.pnpm` virtual store in the lite runtime dependency archive so pnpm symlinks resolve inside the final image. - Prune onnxruntime packages from the actual `.pnpm` virtual store as well as the legacy `node_modules/.pnpm` path. - Add a Dockerfile build-time module-resolution smoke check for lite runtime dependencies (`fastify`, `@fastify/cors`, `sharp`) so broken symlink archives fail during image build instead of after release. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Reproduced the failure on current `staging` with `docker build -f Dockerfile.lite -t marinara-lite-3201 .` followed by `docker run`; startup exited with `ERR_MODULE_NOT_FOUND: Cannot find package 'fastify' imported from /app/packages/server/dist/app.js`. - Inspected the broken image and confirmed `packages/server/node_modules/fastify` pointed at `../../../.pnpm/...` while `/app/.pnpm` was missing from the runtime image. - Built the fixed lite image with `docker build -f Dockerfile.lite -t marinara-lite-3201-fixed --progress=plain .`; the new dependency smoke check passed. - Started the fixed image with `docker run -d -p 127.0.0.1::7860 -e AUTO_CREATE_DEFAULT_CONNECTION=false -e ALLOW_UNAUTHENTICATED_PRIVATE_NETWORK=true marinara-lite-3201-fixed` and confirmed `/` served the app over HTTP. - Ran `pnpm check` locally. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Not applicable; Docker runtime fix only. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:20:03 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5839
No description provided.