Skip to content

Commit 22b1727

Browse files
committed
Update notes.Dockerfile to include logger.js and package.json for runtime dependencies:
- Add `logger.js` to ensure the shared logger module is available. - Include `package.json` to enable Node.js module recognition (ESM: `type: module`).
1 parent 9623701 commit 22b1727

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

notes.Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ WORKDIR /app
1818
COPY --from=builder --chown=node:node /app/node_modules ./node_modules
1919

2020
# Copy the application code to the container (only what's needed to run)
21+
# Include package.json so Node recognizes ESM (type: module)
22+
COPY --chown=node:node package.json ./
2123
COPY --chown=node:node src/notes-api-server.js .
24+
# Include the shared logger module required at runtime
25+
COPY --chown=node:node src/logger.js .
2226
COPY --chown=node:node src/public ./public
2327
COPY --chown=node:node src/db ./db
2428
COPY --chown=node:node src/models ./models

0 commit comments

Comments
 (0)