678110d9e9
Multi-stage Dockerfile builds the React frontend then serves everything from a single Python container. settings.json persists via a named volume. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
469 B
Docker
18 lines
469 B
Docker
FROM node:22-alpine AS build
|
|
WORKDIR /app/frontend
|
|
COPY frontend/package*.json ./
|
|
RUN npm ci
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
FROM python:3.12-slim
|
|
WORKDIR /app
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY backend/ ./backend/
|
|
COPY --from=build /app/frontend/dist ./frontend/dist
|
|
VOLUME ["/app/data"]
|
|
ENV SETTINGS_PATH=/app/data/settings.json
|
|
EXPOSE 8000
|
|
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
|