Spaces:
Sleeping
Sleeping
Commit
·
7bb4f7a
1
Parent(s):
f35f8c5
Use npm ci with fallback to npm install --force
Browse filesTry npm ci first for faster/reliable installs, fall back to npm install --force if that fails.
Co-Authored-By: Claude <noreply@anthropic.com>
- Dockerfile +4 -4
Dockerfile
CHANGED
|
@@ -2,7 +2,7 @@ FROM node:20-slim
|
|
| 2 |
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
| 5 |
-
# Build timestamp: 2026-01-12T23:
|
| 6 |
|
| 7 |
RUN apt-get update && apt-get install -y curl git git-lfs && rm -rf /var/lib/apt/lists/*
|
| 8 |
|
|
@@ -22,10 +22,10 @@ COPY trigo-web/backend/package-lock.json ./backend/package-lock.json
|
|
| 22 |
RUN npm install -g tsx esbuild
|
| 23 |
|
| 24 |
# Install root deps (production only)
|
| 25 |
-
RUN npm install --omit=dev
|
| 26 |
|
| 27 |
-
# Install backend deps
|
| 28 |
-
RUN cd backend && npm install
|
| 29 |
|
| 30 |
# Copy backend source
|
| 31 |
COPY trigo-web/backend/src/ ./backend/src/
|
|
|
|
| 2 |
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
| 5 |
+
# Build timestamp: 2026-01-12T23:30
|
| 6 |
|
| 7 |
RUN apt-get update && apt-get install -y curl git git-lfs && rm -rf /var/lib/apt/lists/*
|
| 8 |
|
|
|
|
| 22 |
RUN npm install -g tsx esbuild
|
| 23 |
|
| 24 |
# Install root deps (production only)
|
| 25 |
+
RUN npm ci --omit=dev || npm install --omit=dev --force
|
| 26 |
|
| 27 |
+
# Install backend deps with retry
|
| 28 |
+
RUN cd backend && (npm ci || npm install --force)
|
| 29 |
|
| 30 |
# Copy backend source
|
| 31 |
COPY trigo-web/backend/src/ ./backend/src/
|