Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Install with pnpm; npm deadlocks on the Spaces builder
Browse filesThree builds died at exactly 8:00 in npm ci. Probes ruled out the obvious
causes: the registry answers in under a second, and tarballs pull at
163MB/s, so it is neither reachability nor throughput. npm itself hangs
there and the builder kills it at its limit; "Exit handler never called"
is what npm prints when SIGTERMed mid-install.
pnpm installs the same tree in 10s locally. Lockfile imported from
package-lock.json so versions are unchanged, then package-lock.json
removed to avoid two lockfiles drifting apart.
- Dockerfile +30 -25
- package-lock.json +0 -0
- package.json +2 -1
- pnpm-lock.yaml +0 -0
Dockerfile
CHANGED
|
@@ -1,26 +1,31 @@
|
|
| 1 |
# syntax=docker/dockerfile:1
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
RUN
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# syntax=docker/dockerfile:1
|
| 2 |
+
|
| 3 |
+
FROM node:22-slim AS deps
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
RUN corepack enable
|
| 6 |
+
COPY package.json pnpm-lock.yaml ./
|
| 7 |
+
RUN pnpm install --frozen-lockfile
|
| 8 |
+
|
| 9 |
+
FROM node:22-slim AS builder
|
| 10 |
+
WORKDIR /app
|
| 11 |
+
RUN corepack enable
|
| 12 |
+
COPY --from=deps /app/node_modules ./node_modules
|
| 13 |
+
COPY . .
|
| 14 |
+
ENV NEXT_TELEMETRY_DISABLED=1
|
| 15 |
+
RUN pnpm run build
|
| 16 |
+
|
| 17 |
+
FROM node:22-slim AS runner
|
| 18 |
+
WORKDIR /app
|
| 19 |
+
ENV NODE_ENV=production
|
| 20 |
+
ENV NEXT_TELEMETRY_DISABLED=1
|
| 21 |
+
# Spaces routes traffic to 7860 and runs the container as uid 1000.
|
| 22 |
+
ENV PORT=7860
|
| 23 |
+
ENV HOSTNAME=0.0.0.0
|
| 24 |
+
EXPOSE 7860
|
| 25 |
+
|
| 26 |
+
COPY --from=builder /app/public ./public
|
| 27 |
+
COPY --from=builder --chown=node:node /app/.next/standalone ./
|
| 28 |
+
COPY --from=builder --chown=node:node /app/.next/static ./.next/static
|
| 29 |
+
|
| 30 |
+
USER node
|
| 31 |
+
CMD ["node", "server.js"]
|
package-lock.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
package.json
CHANGED
|
@@ -27,5 +27,6 @@
|
|
| 27 |
"eslint-config-next": "16.3.4",
|
| 28 |
"tailwindcss": "^4",
|
| 29 |
"typescript": "^5"
|
| 30 |
-
}
|
|
|
|
| 31 |
}
|
|
|
|
| 27 |
"eslint-config-next": "16.3.4",
|
| 28 |
"tailwindcss": "^4",
|
| 29 |
"typescript": "^5"
|
| 30 |
+
},
|
| 31 |
+
"packageManager": "pnpm@10.34.5"
|
| 32 |
}
|
pnpm-lock.yaml
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|