23 lines
533 B
Docker
23 lines
533 B
Docker
# Stage 1: Build Vue.js frontend
|
|
FROM node:22-alpine AS frontend-builder
|
|
WORKDIR /build
|
|
COPY frontend/package.json frontend/package-lock.json ./
|
|
RUN npm ci
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
# Stage 2: Runtime
|
|
FROM python:3.12-slim
|
|
WORKDIR /app
|
|
|
|
COPY backend/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY backend/ .
|
|
|
|
# Copy built frontend (FastAPI serves as static)
|
|
COPY --from=frontend-builder /build/dist/ /app/static/
|
|
|
|
EXPOSE 8000
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|