23 lines
604 B
Docker
23 lines
604 B
Docker
FROM python:3.11-slim
|
|
|
|
# ffmpeg нужен pytgcalls для декодирования/кодирования аудио потока
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ffmpeg \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
ENV PYTHONPATH=/app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY app ./app
|
|
COPY scripts ./scripts
|
|
|
|
# Сюда монтируется volume с session-файлом (см. docker-compose.yml)
|
|
RUN mkdir -p /data/sessions
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|