Skip to content

feat: Docker build with idleTimeout patch via postbuild script#50

Open
fazo96 wants to merge 1 commit into
tealios:masterfrom
fazo96:idletimeout-docker
Open

feat: Docker build with idleTimeout patch via postbuild script#50
fazo96 wants to merge 1 commit into
tealios:masterfrom
fazo96:idletimeout-docker

Conversation

@fazo96

@fazo96 fazo96 commented Jun 28, 2026

Copy link
Copy Markdown

this commit adds two things:

  • Dockerfile with fully working dockerized web version of errata
  • idleTimeout patch

Some details about idleTimeout patch:

The issue is that if the provider is slow and the whole request takes more than 10 seconds, then it fails with [Bun.serve]: request timed out after 10 seconds. Pass idleTimeout to configure. on the stdout and "Error in input stream" in the UI.

The cause is that by default, bun's serve only has a 10 second timeout for the request. Because LLM streaming can be slow especially with long responses, tool calls or self hosting inference, it makes it unusable in some cases. Unfortunately Nitro v3 does not expose this setting (see nitrojs/nitro#3454), it is only supported in v2 through an environment variable that does not work anymore in v3.

To solve this, I added a quick search and replace in post-build to monkey patch the parameter into the compiled js.

- Add Dockerfile, .dockerignore, and docker-compose.yml
- Move idleTimeout sed patch from Dockerfile to scripts/postbuild.mjs
- Wire postbuild script into package.json lifecycle
- Remove scripts/ from .dockerignore so it's available at build time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant