From 0a9fbc87f30e1dad3dc644cf44e0f57158853abe Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 2 Jun 2026 20:06:54 -0500 Subject: [PATCH] docker fixes --- Dockerfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index fb36d6e..85ebe4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN cp "$(command -v nats-server)" /tmp/nats-server # Stage 2: build the Next.js app -FROM node:lts-alpine AS app-builder +FROM node:lts-slim AS app-builder # Install pnpm globally RUN npm install -g pnpm@11.1.2 @@ -44,12 +44,14 @@ RUN mkdir -p /app/THIRD_PARTY_LICENSES && \ # Stage 3: minimal runtime image -FROM node:lts-alpine AS runner +FROM node:lts-slim AS runner # Add runtime OS dependencies: # - libreoffice-writer: required for DOCX → PDF conversion # ffmpeg is provided by ffmpeg-static from node_modules. -RUN apk add --no-cache ca-certificates libreoffice-writer +RUN apt-get update && \ + apt-get install -y --no-install-recommends ca-certificates libreoffice-writer && \ + rm -rf /var/lib/apt/lists/* # Install pnpm for runtime process commands. RUN npm install -g pnpm@10.33.4 @@ -76,6 +78,11 @@ RUN chmod +x /usr/local/bin/nats-server # Include OpenAI Whisper license text for runtime-downloaded ONNX artifacts. COPY --from=app-builder /app/compute/core/src/whisper/assets/LICENSE.txt /licenses/openai-whisper-LICENSE.txt +# Bind the worker's health endpoint before downloading ONNX models, so cold +# starts don't exceed the entrypoint's 30s /health/ready gate. Models load +# lazily on first job instead. +ENV COMPUTE_PREWARM_MODELS=false + # Expose the port the app runs on EXPOSE 3003