PeterPinetree commited on
Commit
86bd8df
·
1 Parent(s): e93f144

chore(docker): expose 3000 and honor with default; avoid conflicting port assumptions

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -6
Dockerfile CHANGED
@@ -14,14 +14,12 @@ COPY --chown=1000 . .
14
  # Build the app
15
  RUN npm run build
16
 
17
- # Expose the port expected by Hugging Face Docker Spaces
18
- EXPOSE 7860
19
 
20
  ENV HOST=0.0.0.0
21
- # Default to the Space port, but allow HF to override
22
- ENV PORT=7860
23
  # Disable telemetry and ensure production env
24
  ENV NEXT_TELEMETRY_DISABLED=1
25
  ENV NODE_ENV=production
26
- # Run Next directly and honor $PORT
27
- CMD ["sh", "-c", "node node_modules/next/dist/bin/next start -H 0.0.0.0 -p ${PORT}"]
 
14
  # Build the app
15
  RUN npm run build
16
 
17
+ # Expose default Next.js port; runtime will honor $PORT
18
+ EXPOSE 3000
19
 
20
  ENV HOST=0.0.0.0
 
 
21
  # Disable telemetry and ensure production env
22
  ENV NEXT_TELEMETRY_DISABLED=1
23
  ENV NODE_ENV=production
24
+ # Run Next directly and honor $PORT, defaulting to 3000
25
+ CMD ["sh", "-c", "node node_modules/next/dist/bin/next start -H 0.0.0.0 -p ${PORT:-3000}"]