Dolor David Prince commited on
Commit ·
1175a5c
1
Parent(s): 637b292
fix: replace broken multi-stage frontend copy with inline npm build
Browse files- Dockerfile +6 -3
Dockerfile
CHANGED
|
@@ -149,8 +149,11 @@ EXPOSE 7860
|
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
-
#
|
| 153 |
-
|
| 154 |
-
COPY
|
|
|
|
|
|
|
|
|
|
| 155 |
|
| 156 |
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
+
# Build Next.js frontend
|
| 153 |
+
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm && rm -rf /var/lib/apt/lists/*
|
| 154 |
+
COPY frontend/package.json frontend/package-lock.json ./frontend/
|
| 155 |
+
RUN cd frontend && npm install --legacy-peer-deps
|
| 156 |
+
COPY frontend/ ./frontend/
|
| 157 |
+
RUN cd frontend && npm run build
|
| 158 |
|
| 159 |
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|