7c2489ea5c
Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
578 B
Docker
25 lines
578 B
Docker
# Stage 1 — build Vue SPA
|
|
FROM node:20 AS frontend-build
|
|
WORKDIR /frontend
|
|
COPY frontend/package.json frontend/package-lock.json ./
|
|
RUN npm ci
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
# Stage 2 — FastAPI + built SPA
|
|
FROM python:3.12-slim
|
|
WORKDIR /app
|
|
|
|
ENV DATA_DIR=/data \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1
|
|
|
|
COPY backend/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY backend/app ./app
|
|
COPY --from=frontend-build /frontend/dist ./frontend/dist
|
|
|
|
EXPOSE 8080
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]
|