Dolor David Prince commited on
Commit
1175a5c
·
1 Parent(s): 637b292

fix: replace broken multi-stage frontend copy with inline npm build

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -149,8 +149,11 @@ EXPOSE 7860
149
 
150
 
151
 
152
- # TRAVELER_DEV_FRONTEND_RUNTIME_COPY
153
- # Next.js static export generated by traveler_frontend_builder.
154
- COPY --from=traveler_frontend_builder /workspace/frontend/out ./frontend/out
 
 
 
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"]