saucam commited on
Commit
82c5e76
·
verified ·
1 Parent(s): 8f6fffd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -2
Dockerfile CHANGED
@@ -19,7 +19,8 @@ RUN npm ci
19
  RUN npm run build
20
 
21
  # Copy static files to standalone directory (required for standalone mode)
22
- RUN cp -r public .next/standalone/ && cp -r .next/static .next/standalone/.next/
 
23
 
24
  ENV NODE_ENV=production
25
  ENV NEXT_TELEMETRY_DISABLED=1
@@ -30,4 +31,3 @@ EXPOSE 7860
30
 
31
  # Use standalone server for better performance
32
  CMD ["node", ".next/standalone/server.js"]
33
-
 
19
  RUN npm run build
20
 
21
  # Copy static files to standalone directory (required for standalone mode)
22
+ RUN cp -r .next/static .next/standalone/.next/ && \
23
+ (cp -r public .next/standalone/ 2>/dev/null || mkdir -p .next/standalone/public)
24
 
25
  ENV NODE_ENV=production
26
  ENV NEXT_TELEMETRY_DISABLED=1
 
31
 
32
  # Use standalone server for better performance
33
  CMD ["node", ".next/standalone/server.js"]