Skip to content

Commit f98066f

Browse files
authored
Merge pull request #173 from Lemoncode/fix/front-cd
fix front cd
2 parents b06dc65 + fe8e2eb commit f98066f

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

front/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,23 @@ COPY package.json package-lock.json ./
1111
COPY front/package.json ./front/package.json
1212
COPY packages/db-model/package.json ./packages/db-model/package.json
1313

14-
# 2) Install all dependencies for the monorepo (npm workspaces)
14+
# 2) Remove packageManager field to prevent Corepack (Node 22) from
15+
# hijacking yarn calls that Next.js SWC patching makes internally.
16+
RUN node -e "const p='package.json',j=JSON.parse(require('fs').readFileSync(p));delete j.packageManager;require('fs').writeFileSync(p,JSON.stringify(j,null,2))"
17+
18+
# 3) Install all dependencies for the monorepo (npm workspaces)
1519
# We need dev deps here because Next build typically requires them.
1620
# --ignore-scripts: skip postinstall (env vars come from the cloud provider)
1721
RUN npm ci --ignore-scripts
1822

19-
# 3) Now copy the full source code
23+
# 4) Now copy the full source code
2024
COPY . .
2125

22-
# 4) Build the internal dependency used by the front (db-model)
26+
# 5) Build the internal dependency used by the front (db-model)
2327
# If your workspace name differs, adjust "-w db-model"
2428
RUN npm run -w db-model build --if-present
2529

26-
# 5) Build Next.js (standalone output will be generated)
30+
# 6) Build Next.js (standalone output will be generated)
2731
RUN npm run -w front build
2832

2933

0 commit comments

Comments
 (0)