k-l-lambda Claude commited on
Commit
196976e
·
1 Parent(s): ba018b4

Split frontend copy to identify LFS file issue

Browse files

Copy non-LFS files first, then LFS files (WASM, ONNX) separately
to identify exactly which copy fails.

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. Dockerfile +27 -10
Dockerfile CHANGED
@@ -2,18 +2,17 @@ FROM node:20-slim
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
- # Build timestamp: 2026-01-13T00:20
6
 
7
  WORKDIR /app
8
 
9
  # Install esbuild globally
10
  RUN npm install -g esbuild
11
 
12
- # Copy only the backend package.json and install backend deps at root level
13
- # This avoids the nested npm install issue
14
  COPY trigo-web/backend/package.json ./package.json
15
  RUN npm install --omit=dev
16
- RUN echo "Step 1: Dependencies installed" && ls -la node_modules/ | head -10
17
 
18
  # Copy backend source
19
  RUN mkdir -p backend
@@ -27,18 +26,36 @@ RUN mkdir -p backend/dist/backend/src && \
27
  --external:express --external:socket.io --external:cors --external:dotenv --external:uuid
28
  RUN echo "Step 3: Backend built"
29
 
30
- # Copy pre-built frontend
31
- RUN mkdir -p app
32
- COPY trigo-web/app/dist/ ./app/dist/
33
- RUN echo "Step 4: Frontend copied" && ls -la app/dist/
34
 
35
- # Copy public and other files
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  COPY trigo-web/public/ ./public/
37
  COPY trigo-web/.env ./.env
38
  COPY trigo-web/backend/.env ./backend/.env
39
  COPY trigo-web/backend/.env.local ./backend/.env.local
40
  COPY trigo-web/inc/ ./inc/
41
- RUN echo "Step 5: All files copied"
42
 
43
  ENV PORT=7860
44
  ENV HOST=0.0.0.0
 
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
+ # Build timestamp: 2026-01-13T00:25
6
 
7
  WORKDIR /app
8
 
9
  # Install esbuild globally
10
  RUN npm install -g esbuild
11
 
12
+ # Copy backend package.json and install deps at root level
 
13
  COPY trigo-web/backend/package.json ./package.json
14
  RUN npm install --omit=dev
15
+ RUN echo "Step 1: Dependencies installed"
16
 
17
  # Copy backend source
18
  RUN mkdir -p backend
 
26
  --external:express --external:socket.io --external:cors --external:dotenv --external:uuid
27
  RUN echo "Step 3: Backend built"
28
 
29
+ # Copy frontend dist - test with explicit file listing
30
+ # First create directories
31
+ RUN mkdir -p app/dist/assets app/dist/lib
 
32
 
33
+ # Copy non-LFS files first (JS, CSS, HTML)
34
+ COPY trigo-web/app/dist/index.html ./app/dist/
35
+ COPY trigo-web/app/dist/assets/*.js ./app/dist/assets/
36
+ COPY trigo-web/app/dist/assets/*.css ./app/dist/assets/
37
+ COPY trigo-web/app/dist/assets/*.png ./app/dist/assets/
38
+ COPY trigo-web/app/dist/lib/ ./app/dist/lib/
39
+ RUN echo "Step 4a: Non-LFS frontend files copied"
40
+
41
+ # Try to copy LFS files (WASM) - this might fail
42
+ COPY trigo-web/app/dist/assets/*.wasm ./app/dist/assets/
43
+ RUN echo "Step 4b: WASM file copied"
44
+
45
+ # Copy ONNX directories (LFS)
46
+ COPY trigo-web/app/dist/onnx/ ./app/dist/onnx/
47
+ RUN echo "Step 4c: ONNX files copied"
48
+
49
+ # Check what we have
50
+ RUN echo "Step 5: Checking dist contents" && ls -la app/dist/ && ls -la app/dist/assets/ | head -5
51
+
52
+ # Copy other files
53
  COPY trigo-web/public/ ./public/
54
  COPY trigo-web/.env ./.env
55
  COPY trigo-web/backend/.env ./backend/.env
56
  COPY trigo-web/backend/.env.local ./backend/.env.local
57
  COPY trigo-web/inc/ ./inc/
58
+ RUN echo "Step 6: All files copied"
59
 
60
  ENV PORT=7860
61
  ENV HOST=0.0.0.0