From 37e94eb7f0f3f1cdb6c7b2df7ffdd7048d59b6fc Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Mon, 6 Nov 2023 10:05:50 +0100 Subject: [PATCH] ci(dockerfile): :rocket: fix copy paths in dockerfile --- .npmrc | 5 +---- Dockerfile | 4 ++-- package.json | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.npmrc b/.npmrc index 7545c982..83252e62 100644 --- a/.npmrc +++ b/.npmrc @@ -1,6 +1,3 @@ auto-install-peers=true enable-pre-post-scripts=true -strict-peer-dependencies=false -public-hoist-pattern[]=*eslint* -public-hoist-pattern[]=*prisma* -public-hoist-pattern[]=*prettier* \ No newline at end of file +strict-peer-dependencies=false \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index eb3d36e4..4b3a86f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,9 +32,9 @@ COPY --chown=node:node --from=build /app/.npmrc /app/package.json /app/pnpm-lock RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile # Copy Prisma Generated Client -COPY --chown=node:node --from=build ./app/node_modules/.pnpm/@prisma+client* ./node_modules/.pnpm/ +COPY --chown=node:node --from=build /app/node_modules/.pnpm/@prisma+client* ./node_modules/.pnpm/ # Copy Prisma Schema & Migrations -COPY --chown=node:node --from=build ./app/tools/prisma ./tools/prisma +COPY --chown=node:node --from=build /app/tools/prisma ./tools/prisma CMD [ "dumb-init", "pnpm", "start" ] diff --git a/package.json b/package.json index 633b5ac9..f2f61b1c 100644 --- a/package.json +++ b/package.json @@ -16,12 +16,12 @@ "scripts": { "dev": "nx run-many -t serve", "test": "nx run-many -t test", - "prebuild": "pnpm exec prisma generate", + "prebuild": "pnpm dlx prisma generate", "build": "nx run-many -t build", "prestart": "pnpm dlx prisma migrate deploy", "start": "node dist/apps/server/main", "lint": "nx run-many -t lint --fix", - "format": "pnpm exec prettier -w .", + "format": "pnpm dlx prettier -w .", "prepare": "pnpm dlx husky install" }, "devDependencies": {