diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e762069 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +__pycache__/ +*.pyc +.git/ +.gitignore +tests/ +docs/ +data/ +*.md +.env +.venv/ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8fce603 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +data/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ecb4050 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM python:3.14-slim + +# Install FFmpeg +RUN apt-get update && \ + apt-get install -y --no-install-recommends ffmpeg && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +# Install Python dependencies +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +# Copy application +COPY app/ ./app/ + +# Create data directory +RUN mkdir -p /data + +ENV DATA_PATH=/data +ENV FFMPEG_TIMEOUT=3600 +ENV HOST=0.0.0.0 +ENV PORT=8000 + +EXPOSE 8000 + +CMD ["sh", "-c", "uvicorn app.main:app --host $HOST --port $PORT"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..94bb54a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +services: + ffmpeg-worker: + build: . + ports: + - "8000:8000" + volumes: + - ./data:/data + environment: + - DATA_PATH=/data + - FFMPEG_TIMEOUT=3600