Skip to content

fix: use npm ci instead of npm install in Docker and deployment configs - #1377

Open
omoh5 wants to merge 2 commits into
LabsCrypt:mainfrom
omoh5:fix/1256-use-npm-ci-in-docker-and-render
Open

fix: use npm ci instead of npm install in Docker and deployment configs#1377
omoh5 wants to merge 2 commits into
LabsCrypt:mainfrom
omoh5:fix/1256-use-npm-ci-in-docker-and-render

Conversation

@omoh5

@omoh5 omoh5 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces npm install with npm ci in all production build/deployment configurations to ensure deterministic, lockfile-pinned dependency installs that match CI.

Motivation

Both the backend Docker build (backend/Dockerfile:14) and the Render.com production build command (render.yaml:8) used npm install, which can resolve to different dependency versions than what CI tested with npm ci. For a financial application, this "works in CI, different in prod" dependency drift is a real risk.

Changes

File Change
backend/Dockerfile:14 npm installnpm ci (builder stage)
backend/Dockerfile:37 npm install --omit=dev --ignore-scriptsnpm ci --omit=dev --ignore-scripts (runner stage)
render.yaml:8 npm install && ...npm ci && ... (Render build command)
vercel.json installCommand: npm installinstallCommand: npm ci (Vercel deploy)

Acceptance Criteria

  • Docker build uses npm ci
  • Render build uses npm ci
  • Vercel deploy uses npm ci
  • All production install paths now pin to lockfile versions, matching CI

Additional Notes

  • Also fixed vercel.json which had the same npm install issue but wasn't mentioned in the original issue
  • Updated the Dockerfile comment to reference npm ci instead of npm install

Closes #1256

🤖 Generated with Codebuff
Co-Authored-By: Codebuff noreply@codebuff.com

dedukpe and others added 2 commits August 30, 2026 15:05
Replace npm install with npm ci in backend/Dockerfile (both builder and
runner stages), render.yaml, and vercel.json to ensure deterministic,
lockfile-pinned dependency installs in production builds. This eliminates
the risk of dependency drift between CI-tested and deployed versions.

Closes LabsCrypt#1256

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
The backend Dockerfile uses npm ci (from PR LabsCrypt#1256) which requires a
package-lock.json. Since this is an npm workspaces monorepo, the
lockfile lived only at the root and wasn't available in the backend/
build context. Generated a standalone backend/package-lock.json so
npm ci can resolve exact dependency versions in the Docker build.

Also added a root .dockerignore for future-proofing.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
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.

[Audit] Docker/production build uses npm install instead of the CI-tested npm ci

2 participants