diff --git a/backend/Dockerfile b/backend/Dockerfile index 5309fba..fa0a052 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -3,7 +3,7 @@ # ============================================================================= # Stage 1: Builder - Install dependencies # Stage 2: Base - Common runtime for API and Worker -# Stage 3: API - FastAPI + Gunicorn (no ffmpeg) +# Stage 3: API - FastAPI + Gunicorn (with ffmpeg for TTS audio conversion) # Stage 4: Worker - Celery worker (with ffmpeg for video processing) # ============================================================================= @@ -75,6 +75,18 @@ USER app # ----------------------------------------------------------------------------- FROM base AS api +# Switch to root to install ffmpeg +USER root + +# Install ffmpeg for TTS audio conversion +RUN apt-get update && apt-get install -y --no-install-recommends \ + ffmpeg \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean + +# Switch back to non-root user +USER app + # Set production environment variables ENV APP_ENV=prod