Ajustes no compose e no dockerfile
This commit is contained in:
34
dockerfile
34
dockerfile
@@ -1,19 +1,37 @@
|
||||
FROM python:3.10-slim
|
||||
FROM python:3.10-slim-bookworm
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
TZ=America/Sao_Paulo \
|
||||
LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends ffmpeg && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates tzdata ffmpeg curl iputils-ping dnsutils procps \
|
||||
&& update-ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
|
||||
RUN python -m pip install --upgrade pip setuptools wheel && \
|
||||
pip install -r /app/requirements.txt && \
|
||||
pip install brotli brotlicffi mutagen certifi`
|
||||
|
||||
RUN printf "%s\n" \
|
||||
"--force-ipv4" \
|
||||
"--noplaylist" \
|
||||
"--merge-output-format" "mp4" \
|
||||
"--extractor-args" "youtube:player_client=android,player_skip=webpage" \
|
||||
"--format" "bv*+ba/b[height<=1080]/b" \
|
||||
> /etc/yt-dlp.conf
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8000
|
||||
RUN mkdir -p /app/videos && chmod 777 /app/videos
|
||||
|
||||
EXPOSE 8000
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
||||
Reference in New Issue
Block a user