diff --git a/Dockerfile b/Dockerfile index 3a4035e..be37a07 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,12 @@ ENV HOSTNAME=0.0.0.0 ENV STORAGE_DIR=/app/storage # Copy the whole built app (node_modules incl. tsx + prisma CLI, .next, source). COPY --from=build /app ./ +# `server-only` throws at import time when resolved outside Next's RSC bundler. +# The worker runs lib/* under tsx (plain Node), which hits that throw (e.g. via +# lib/flags). Neutralize the runtime module in the FINAL image only — the +# build-time client/server guard already ran during `next build`. Web is +# unaffected: `next start` serves prebuilt output and never relies on the throw. +RUN cp node_modules/server-only/empty.js node_modules/server-only/index.js RUN mkdir -p /app/storage/mp3 /app/storage/art /app/storage/exports EXPOSE 3000 # Default = web; the worker service overrides this command in docker-compose.yml.