Spaces:
Sleeping
Sleeping
Commit ·
86bd8df
1
Parent(s): e93f144
chore(docker): expose 3000 and honor with default; avoid conflicting port assumptions
Browse files- Dockerfile +4 -6
Dockerfile
CHANGED
|
@@ -14,14 +14,12 @@ COPY --chown=1000 . .
|
|
| 14 |
# Build the app
|
| 15 |
RUN npm run build
|
| 16 |
|
| 17 |
-
# Expose
|
| 18 |
-
EXPOSE
|
| 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}"]
|