From 92be1aa08e9c92e33cef30c8e8523011be7273fe Mon Sep 17 00:00:00 2001 From: "yuriko.pozhilov" Date: Thu, 23 Apr 2026 09:18:29 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 18 ++++++++++++++++++ docker-compose.yml | 18 ++++++++++++++++++ dockerignore | 7 +++++++ 3 files changed, 43 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 dockerignore diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e807328 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.12-slim + +RUN apt-get update && apt-get install -y --no-install-recommends \ + ffmpeg \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY app.py _config.py YTProcessing.py ./ + +COPY templates/ ./templates/ + +EXPOSE 5000 + +CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000", "--workers", "2"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3b8b86d --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +services: + app: + build: . + ports: + - "5000:5000" + environment: + - PORT=5000 + - HOST=0.0.0.0 + - SECRET_KEY=${SECRET_KEY:*vdfv128596456QA} + env_file: + - .env + restart: unless-stopped + depends_on: + - redis + + redis: + image: redis:7-alpine + restart: unless-stopped diff --git a/dockerignore b/dockerignore new file mode 100644 index 0000000..8f6eae9 --- /dev/null +++ b/dockerignore @@ -0,0 +1,7 @@ +__pycache__/ +*.pyc +*.pyo +.env +.git +.gitignore +*.md