Merge pull request 'Fix Docker build' (#57) from adilallo/FixDockerBuild into main
Reviewed-on: #57
This commit was merged in pull request #57.
This commit is contained in:
+12
-5
@@ -10,16 +10,23 @@ ENV NEXT_TELEMETRY_DISABLED=1
|
||||
FROM base AS deps
|
||||
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
|
||||
COPY package.json package-lock.json ./
|
||||
# --ignore-scripts: skips the project `postinstall` (`npm rebuild lightningcss
|
||||
# && prisma generate`). The Prisma schema is not yet present in this stage;
|
||||
# the builder stage runs `prisma generate` after `COPY . .`.
|
||||
RUN npm ci --no-audit --fund=false --ignore-scripts
|
||||
# Copy the Prisma schema so the project's `postinstall` (which runs
|
||||
# `prisma generate`) succeeds during install.
|
||||
COPY prisma ./prisma
|
||||
# `npm install` rather than `npm ci`:
|
||||
# 1. `npm ci` strictly validates the lockfile and refuses when sub-tree
|
||||
# resolutions drift (a recurring nuisance because the lockfile is
|
||||
# generated on darwin-arm64 by default).
|
||||
# 2. `npm install` reuses the lockfile when it can but tolerates
|
||||
# platform-specific reshuffles for Linux-only optional deps
|
||||
# (`lightningcss-linux-*-gnu`, `@tailwindcss/oxide-linux-*-gnu`,
|
||||
# `@next/swc-linux-*-gnu`, etc.) that Next.js needs at build time.
|
||||
RUN npm install --no-audit --fund=false
|
||||
|
||||
FROM base AS builder
|
||||
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN npx prisma generate
|
||||
RUN npm run build
|
||||
|
||||
FROM base AS runner
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
"@types/mdx",
|
||||
"eslint-config-next",
|
||||
"typescript-eslint",
|
||||
"@storybook/react",
|
||||
"@storybook/nextjs-vite",
|
||||
"@eslint/js",
|
||||
"@next/eslint-plugin-next",
|
||||
|
||||
Generated
+4031
-3106
File diff suppressed because it is too large
Load Diff
+3
-1
@@ -68,8 +68,10 @@
|
||||
"@playwright/test": "^1.55.0",
|
||||
"@storybook/addon-a11y": "^10.2.0",
|
||||
"@storybook/nextjs": "^10.2.0",
|
||||
"@storybook/react": "^10.2.0",
|
||||
"@svgr/webpack": "^8.1.0",
|
||||
"@tailwindcss/postcss": "^4.1.11",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/jest-dom": "^6.8.0",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@testing-library/user-event": "^14.6.1",
|
||||
@@ -82,7 +84,7 @@
|
||||
"@vitest/coverage-v8": "^3.2.4",
|
||||
"eslint": "^9",
|
||||
"eslint-config-next": "^16.0.0",
|
||||
"eslint-plugin-storybook": "^9.0.7",
|
||||
"eslint-plugin-storybook": "^10.4.1",
|
||||
"globals": "^17.1.0",
|
||||
"jest-axe": "^10.0.0",
|
||||
"jsdom": "^26.1.0",
|
||||
|
||||
Reference in New Issue
Block a user