diff --git a/compose.yml b/compose.yml index 112d08d..eafc3d6 100644 --- a/compose.yml +++ b/compose.yml @@ -57,14 +57,15 @@ services: restart: unless-stopped environment: NODE_ENV: production - # Every renderer setting carries the RENDERER_ prefix so it cannot clash - # with the bot's variables, which Coolify also injects into this service. + # Every renderer setting carries the RENDERER_ prefix so it reads as a + # renderer setting and cannot clash with the bot's variables. RENDERER_HOST: 0.0.0.0 RENDERER_PORT: "3000" # keep in sync with the bot's RENDERER_URL and the healthcheck - RENDERER_MAX_CONCURRENT_RENDERS: ${RENDERER_MAX_CONCURRENT_RENDERS:-1} - RENDERER_RENDER_TIMEOUT_MS: ${RENDERER_RENDER_TIMEOUT_MS:-15000} - RENDERER_MAX_OPTIONS: ${RENDERER_MAX_OPTIONS:-32} - RENDERER_MAX_OPTION_CHARS: ${RENDERER_MAX_OPTION_CHARS:-40} + # Tuning is left out on purpose: the renderer's own defaults apply + # (RENDERER_MAX_CONCURRENT_RENDERS=1, RENDERER_RENDER_TIMEOUT_MS=15000, + # RENDERER_MAX_OPTIONS=32, RENDERER_MAX_OPTION_CHARS=40). Coolify lists + # every ${VAR} referenced here as a setting, so to override one, add it + # here as a literal, e.g. RENDERER_MAX_OPTIONS: "48". expose: - "3000" healthcheck: diff --git a/docs/deploy-coolify-selfhosted.md b/docs/deploy-coolify-selfhosted.md index 5ff605e..150a862 100644 --- a/docs/deploy-coolify-selfhosted.md +++ b/docs/deploy-coolify-selfhosted.md @@ -62,8 +62,12 @@ to it. Renderer tuning (`RENDERER_MAX_CONCURRENT_RENDERS`, `RENDERER_RENDER_TIMEOUT_MS`, `RENDERER_MAX_OPTIONS`, -`RENDERER_MAX_OPTION_CHARS`) can be set in Coolify too; the defaults are in -[`renderer/docs/deployment.md`](../renderer/docs/deployment.md). Give the host +`RENDERER_MAX_OPTION_CHARS`) is optional and needs nothing in Coolify: the +renderer's defaults apply, listed in +[`renderer/docs/deployment.md`](../renderer/docs/deployment.md). Coolify lists +every `${VAR}` that `compose.yml` references as a setting, so the tuning values +are deliberately not referenced there; to override one, add it to the +`renderer` service's `environment:` in `compose.yml` as a literal value. Give the host 1-2 GB of headroom for the renderer's Chrome. Outside compose, set `RENDERER_URL` to the base URL of any service that diff --git a/renderer/docs/deployment.md b/renderer/docs/deployment.md index bcd3f28..6270ed8 100644 --- a/renderer/docs/deployment.md +++ b/renderer/docs/deployment.md @@ -39,8 +39,9 @@ RENDERER_MAX_OPTIONS=32 RENDERER_MAX_OPTION_CHARS=40 ``` -The root `compose.yml` forwards the tuning values with `${VAR:-default}` -fallbacks, so unset or empty variables use the defaults above. +An unset or empty variable uses the default above. The root `compose.yml` +sets only `RENDERER_HOST` and `RENDERER_PORT`, so the tuning values use these +defaults unless added there. Start with 1-2 vCPU and 1-2 GB RAM. Increase only after render benchmarks show the service is CPU-bound or concurrency-limited.