# --- Frontend build --------------------------------------------------------- FROM node:22-alpine AS frontend-deps WORKDIR /frontend COPY frontend/package.json frontend/package-lock.json ./ RUN npm ci FROM frontend-deps AS frontend-build COPY frontend/ ./ RUN npm run build # --- Python base ------------------------------------------------------------ FROM python:3.13-slim AS python-base RUN apt-get update && apt-get install -y --no-install-recommends \ libopus0 ffmpeg \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt ./requirements.txt RUN pip install --no-cache-dir -r requirements.txt # --- Development ------------------------------------------------------------ FROM python-base AS dev RUN pip install --no-cache-dir ruff pytest EXPOSE 8000 CMD ["python", "-u", "main.py"] # --- Production ------------------------------------------------------------- FROM python-base AS prod COPY . . COPY --from=frontend-build /frontend/dist /app/static EXPOSE 8000 CMD ["python", "-u", "main.py"]