feat: add Docker configuration

This commit is contained in:
2025-11-30 17:49:55 -05:00
parent 87d8c31778
commit f79a89a777
4 changed files with 49 additions and 0 deletions

10
.dockerignore Normal file
View File

@@ -0,0 +1,10 @@
__pycache__/
*.pyc
.git/
.gitignore
tests/
docs/
data/
*.md
.env
.venv/

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
data/

28
Dockerfile Normal file
View File

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

10
docker-compose.yml Normal file
View File

@@ -0,0 +1,10 @@
services:
ffmpeg-worker:
build: .
ports:
- "8000:8000"
volumes:
- ./data:/data
environment:
- DATA_PATH=/data
- FFMPEG_TIMEOUT=3600