KrishnaCosmic commited on
Commit
9f638d2
·
1 Parent(s): 693eb13

apply socket.io

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -8,7 +8,9 @@ WORKDIR /app
8
 
9
  # Copy package files
10
  COPY package.json package-lock.json* ./
11
- RUN npm ci --only=production
 
 
12
 
13
  # ---- Build Stage ----
14
  FROM base AS builder
@@ -21,6 +23,9 @@ COPY . .
21
  # Build the Next.js application
22
  RUN npm run build
23
 
 
 
 
24
  # ---- Production Stage ----
25
  FROM base AS runner
26
  WORKDIR /app
 
8
 
9
  # Copy package files
10
  COPY package.json package-lock.json* ./
11
+ # Install ALL dependencies (including devDependencies like typescript)
12
+ # needed for the build step
13
+ RUN npm ci
14
 
15
  # ---- Build Stage ----
16
  FROM base AS builder
 
23
  # Build the Next.js application
24
  RUN npm run build
25
 
26
+ # Remove devDependencies after build
27
+ RUN npm prune --omit=dev
28
+
29
  # ---- Production Stage ----
30
  FROM base AS runner
31
  WORKDIR /app