2026-03-02 01:48:51 +01:00
|
|
|
# Stage 1: Build React Frontend
|
|
|
|
|
FROM node:22-alpine AS frontend
|
|
|
|
|
WORKDIR /app/web
|
|
|
|
|
COPY web/package*.json ./
|
|
|
|
|
RUN npm ci
|
|
|
|
|
COPY web/ ./
|
|
|
|
|
RUN npm run build
|
2026-02-13 00:24:31 +01:00
|
|
|
|
2026-03-02 01:48:51 +01:00
|
|
|
# Stage 2: Python Backend + Static Files
|
|
|
|
|
FROM python:3.11-slim
|
2026-02-13 00:24:31 +01:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
COPY requirements.txt .
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
2026-03-02 01:48:51 +01:00
|
|
|
COPY server/ ./server/
|
|
|
|
|
COPY --from=frontend /app/web/dist ./static/
|
2026-02-13 00:24:31 +01:00
|
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
2026-03-02 01:48:51 +01:00
|
|
|
CMD ["uvicorn", "server.main:app", "--host", "0.0.0.0", "--port", "8080"]
|