Fix seed script unreadable in image: COPY --chmod applied 0644 to the auto-created /app/scripts dir (unsearchable for the node user → MODULE_NOT_FOUND). Seed now lives at /app/pb-seed.mjs.
This commit is contained in:
+1
-2
@@ -60,8 +60,7 @@ RUN --mount=type=cache,target=/root/.npm \
|
||||
npm ci --omit=dev --no-audit --no-fund
|
||||
|
||||
COPY --from=builder --chown=root:root /app/dist ./dist
|
||||
COPY --chmod=0644 server.mjs entrypoint.sh ./
|
||||
COPY --chmod=0644 scripts/pb-seed.mjs ./scripts/pb-seed.mjs
|
||||
COPY --chmod=0644 server.mjs entrypoint.sh scripts/pb-seed.mjs ./
|
||||
|
||||
# Run as the unprivileged `node` user shipped with the base image.
|
||||
USER node
|
||||
|
||||
Reference in New Issue
Block a user