Files
mmacierzanka 384770565a
Backend / Lint i formatowanie (pull_request) Successful in 4s
Panel / Lint, typy i build (pull_request) Successful in 4m50s
Panel / Testowy build obrazu (pull_request) Failing after 2s
Backend / Testy i kontrakt API (pull_request) Successful in 9m24s
Backend / Testowy build obrazu (pull_request) Successful in 1m38s
refactor: consolidate frontend serving and add health check
2026-08-21 15:29:45 +02:00

36 lines
879 B
Docker

# --- Etap 1: budowa panelu ---------------------------------------------------
FROM node:22-alpine AS frontend-build
WORKDIR /frontend
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
# --- Etap 2: aplikacja -------------------------------------------------------
FROM python:3.13-slim
# Zależności systemowe: opus dla głosu, ffmpeg do dekodowania audio
RUN apt-get update && apt-get install -y \
libopus0 \
libopus-dev \
ffmpeg \
build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Zależności przed źródłami, aby korzystać z cache warstw.
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
COPY --from=frontend-build /frontend/dist /app/static
EXPOSE 8000
# Python serwuje API oraz zbudowany panel webowy.
CMD ["python", "-u", "main.py"]