From 94096053d4067028e2ce6e863a6de4e1b7c1193b Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Thu, 24 Sep 2026 13:19:19 +0000 Subject: [PATCH] Install ffmpeg in the image that actually ships MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Package B added ffmpeg to worker/Dockerfile. That image is only built when the worker runs as its own Railway service, and on this project it does not: the worker is colocated with the Next.js app and started by start.sh inside the container built from the ROOT Dockerfile, which railway.json names explicitly. So the binaries the renderer needs were installed into an image nobody builds, and every video render job would have died at the first ffmpeg spawn with the job row left `failed`. Nothing in CI could catch this — the test suite installs its own ffmpeg on the runner, and typechecks and unit tests say nothing about which Dockerfile Railway uses. Adds ffmpeg to the runtime stage of the root Dockerfile, next to the pandoc the worker already needed for the same reason. worker/Dockerfile keeps its copy so the separate-service deployment stays correct if it is ever used. Co-Authored-By: Claude Opus 5 (1M context) --- Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fee242b5..dc70c47d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,8 +38,16 @@ FROM mcr.microsoft.com/playwright:v1.60.0-jammy AS runtime WORKDIR /app # pandoc for canonical Markdown -> HTML conversion in the worker. +# +# ffmpeg for the five-second ad renderer, which runs in the worker half of this +# same container: it encodes the compositor's PNG frames into the MP4 +# renditions and packages them as fMP4 HLS, and ffprobe is what validation +# decodes to count frames. worker/Dockerfile installs these too, but that image +# is only built when the worker runs as its own Railway service — on this +# project the worker is colocated with the app and THIS is the image that ships, +# so leaving it out here means every render job dies at the first spawn. RUN apt-get update \ - && apt-get install -y --no-install-recommends pandoc tini \ + && apt-get install -y --no-install-recommends pandoc tini ffmpeg \ && rm -rf /var/lib/apt/lists/* ENV NODE_ENV=production