Update Dockerfile
Browse files- Dockerfile +9 -1
Dockerfile
CHANGED
|
@@ -14,9 +14,17 @@ COPY . .
|
|
| 14 |
# Build the Next.js app
|
| 15 |
RUN npm run build
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
# Expose port 7860 (Required for Hugging Face Spaces)
|
| 18 |
EXPOSE 7860
|
| 19 |
ENV PORT=7860
|
| 20 |
|
|
|
|
|
|
|
|
|
|
| 21 |
# Start the application
|
| 22 |
-
CMD ["
|
|
|
|
| 14 |
# Build the Next.js app
|
| 15 |
RUN npm run build
|
| 16 |
|
| 17 |
+
# Copy standalone output
|
| 18 |
+
RUN cp -r .next/standalone ./standalone
|
| 19 |
+
RUN cp -r .next/static ./standalone/.next/static
|
| 20 |
+
RUN cp -r public ./standalone/public
|
| 21 |
+
|
| 22 |
# Expose port 7860 (Required for Hugging Face Spaces)
|
| 23 |
EXPOSE 7860
|
| 24 |
ENV PORT=7860
|
| 25 |
|
| 26 |
+
# Switch to standalone directory
|
| 27 |
+
WORKDIR /app/standalone
|
| 28 |
+
|
| 29 |
# Start the application
|
| 30 |
+
CMD ["node", "server.js"]
|