Spaces:
Sleeping
Sleeping
yuvrajsingh6 commited on
Commit ·
4bd4d1c
1
Parent(s): fdbb0ce
Fix: Update Node.js to v20 for Next.js 16 compatibility
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# Multi-stage build for production
|
| 2 |
|
| 3 |
# Stage 1: Build Frontend
|
| 4 |
-
FROM node:
|
| 5 |
|
| 6 |
WORKDIR /app/frontend
|
| 7 |
|
|
@@ -36,9 +36,9 @@ COPY --from=frontend-builder /app/frontend/node_modules ./frontend/node_modules
|
|
| 36 |
|
| 37 |
# Create startup script
|
| 38 |
RUN echo '#!/bin/bash\n\
|
| 39 |
-
cd /app/backend && uvicorn main:app --host 0.0.0.0 --port 8000 &\n\
|
| 40 |
-
cd /app/frontend && npm start -- -p 7860\n\
|
| 41 |
-
wait' > /app/start.sh && chmod +x /app/start.sh
|
| 42 |
|
| 43 |
# Expose port
|
| 44 |
EXPOSE 7860
|
|
|
|
| 1 |
# Multi-stage build for production
|
| 2 |
|
| 3 |
# Stage 1: Build Frontend
|
| 4 |
+
FROM node:20-alpine AS frontend-builder
|
| 5 |
|
| 6 |
WORKDIR /app/frontend
|
| 7 |
|
|
|
|
| 36 |
|
| 37 |
# Create startup script
|
| 38 |
RUN echo '#!/bin/bash\n\
|
| 39 |
+
cd /app/backend && uvicorn main:app --host 0.0.0.0 --port 8000 &\n\
|
| 40 |
+
cd /app/frontend && npm start -- -p 7860\n\
|
| 41 |
+
wait' > /app/start.sh && chmod +x /app/start.sh
|
| 42 |
|
| 43 |
# Expose port
|
| 44 |
EXPOSE 7860
|