Soha85 commited on
Commit
4a822db
·
verified ·
1 Parent(s): 2468886

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -6
Dockerfile CHANGED
@@ -6,17 +6,19 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
6
 
7
  WORKDIR /app
8
 
9
- # Copy lockfile and package.json first for better caching
10
  COPY package.json pnpm-lock.yaml* ./
11
 
12
- # Install dependencies
13
- # We use --no-frozen-lockfile to bypass the strict version conflict you encountered
 
 
14
  RUN pnpm install --no-frozen-lockfile
15
 
16
- # Copy the rest of the source code
17
  COPY . .
18
 
19
- # Build the frontend (Vite)
20
  RUN pnpm run build
21
 
22
  # --- STEP 2: Runtime Stage ---
@@ -33,5 +35,4 @@ ENV PORT=7860
33
  ENV NODE_ENV=production
34
 
35
  # Start the application
36
- # Ensure your package.json has a "start" script that runs your server
37
  CMD ["npm", "start"]
 
6
 
7
  WORKDIR /app
8
 
9
+ # 1. Copy package files
10
  COPY package.json pnpm-lock.yaml* ./
11
 
12
+ # 2. IMPORTANT: Copy the patches folder so pnpm can find the wouter patch
13
+ COPY patches/ ./patches/
14
+
15
+ # 3. Install dependencies
16
  RUN pnpm install --no-frozen-lockfile
17
 
18
+ # 4. Copy the rest of the source code
19
  COPY . .
20
 
21
+ # 5. Build the frontend (Vite)
22
  RUN pnpm run build
23
 
24
  # --- STEP 2: Runtime Stage ---
 
35
  ENV NODE_ENV=production
36
 
37
  # Start the application
 
38
  CMD ["npm", "start"]