Spaces:
Sleeping
Sleeping
Commit ·
e747ec5
1
Parent(s): 8b601f8
fix(docker): bind Next to 7860 and expose 7860 for HF Spaces health checks
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
|
@@ -14,13 +14,13 @@ COPY --chown=1000 . .
|
|
| 14 |
# Build the app
|
| 15 |
RUN npm run build
|
| 16 |
|
| 17 |
-
# Expose
|
| 18 |
-
EXPOSE
|
| 19 |
|
| 20 |
# HF Spaces provides $PORT. Start Next.js on that port and bind to all interfaces.
|
| 21 |
ENV HOST=0.0.0.0
|
| 22 |
# Disable telemetry and ensure production env
|
| 23 |
ENV NEXT_TELEMETRY_DISABLED=1
|
| 24 |
ENV NODE_ENV=production
|
| 25 |
-
# Run Next directly
|
| 26 |
-
CMD ["sh", "-c", "node node_modules/next/dist/bin/next start -H 0.0.0.0 -p
|
|
|
|
| 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 |
# HF Spaces provides $PORT. Start Next.js on that port and bind to all interfaces.
|
| 21 |
ENV HOST=0.0.0.0
|
| 22 |
# Disable telemetry and ensure production env
|
| 23 |
ENV NEXT_TELEMETRY_DISABLED=1
|
| 24 |
ENV NODE_ENV=production
|
| 25 |
+
# Run Next directly on the fixed port used by Spaces
|
| 26 |
+
CMD ["sh", "-c", "node node_modules/next/dist/bin/next start -H 0.0.0.0 -p 7860"]
|