Загрузить файлы в «/»

This commit is contained in:
2026-04-23 09:18:29 +00:00
parent 3d4e5fc690
commit 92be1aa08e
3 changed files with 43 additions and 0 deletions

18
Dockerfile Normal file
View File

@@ -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"]

18
docker-compose.yml Normal file
View File

@@ -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

7
dockerignore Normal file
View File

@@ -0,0 +1,7 @@
__pycache__/
*.pyc
*.pyo
.env
.git
.gitignore
*.md