Parameterize the web_server image + pull policy so an instance can pull a
centrally-built image from a private registry instead of running the
~16 GB `make build` locally:
image: ${AIDO_WEB_IMAGE:-livtec/aido-web:local}
pull_policy: ${AIDO_WEB_PULL_POLICY:-never}
Defaults keep the current local-build behaviour, so build hosts and local
dev are unaffected. Add docs/PREBUILT-IMAGE.md with the build-once /
push-to-private-registry / pull-everywhere workflow.
Replace the broken sed-based entrypoint from 4.8.2 with a runtime Python
patch script for Onyx 5.0.3 voice module compatibility.
Background
----------
Onyx 5.0.3 refactored the voice subsystem to use raw aiohttp instead of
the OpenAI Python SDK. The old /v1 suffix in our LocalAI base URL now
causes a double-prefix (https://.../v1/v1/audio/...) and 404s.
Additionally, line numbers and constants shifted, making the previous
sed patches fail silently.
Changes
-------
* api_server: override CMD with a startup sequence that runs
patch_voice.py before uvicorn.
* Add backend/scripts/patch_voice.py that patches:
- factory.py: fallback api_base, stt_model and api_key when no
voice provider is configured in the Onyx admin UI.
- providers/openai.py: DEFAULT_OPENAI_API_BASE (without /v1),
realtime model constants, and optional chunked-STT language
injection (WHISPER_LANGUAGE=de).
* Mount patch script read-only into /app/scripts/.
* Env: WHISPER_API_BASE now points to the origin only
(https://aido-whisper-ch.livtec.cloud), leaving /v1 path assembly
to Onyx code.
* Env: WHISPER_MODEL=whisper-1, WHISPER_LANGUAGE=de.
Migration
---------
The previous entrypoint sed block is removed. No admin UI voice
provider configuration is required; the patch is fully transparent.
Refs: aido-whisper-ch deployment, Onyx 5.0.3 upgrade
The previous Python-heredoc patch (written for 4.8.2) broke silently on
5.0.3 because:
- The Docker image installs the backend at a different path than
/app/onyx/ (repo restructured to backend/onyx/ in 5.0.0). Hardcoded
paths caused every patch to no-op.
- 5.0.3 switched from the OpenAI Python SDK (which expects /v1 in
base_url) to raw aiohttp that appends /v1/audio/... to the base URL
itself. The old /v1 suffix in the LocalAI URL produced a double
prefix: /v1/v1/audio/transcriptions → 404.
Changes:
- Replace Python heredoc with shell sed + dynamic path resolution
(python -c 'import ...' with prefix fallback loop).
- Remove /v1 from LocalAI base URL (https://aido-whisper-ch.livtec.cloud).
- Add set -e so real shell errors are not swallowed.
- Add inline grep verification after each patch block so docker logs
shows exactly which patterns matched.
- Language injection now tries both aiohttp FormData (add_field) and
dict-literal anchors instead of one fixed SDK-call string.
- Remove corruption-cleanup logic (repeated or "..." chains) that was
only needed because the old sed ran non-idempotently on a persisted
volume. The new approach is idempotent by design.
- Annotate VOICE_DISABLE_STREAMING_STT as inert in 5.0.3 (not
referenced in the voice module source); kept for forward-compat.
fix(compose): repair STT after Onyx 5.0.3 upgrade and fix silent alembic skip
- Replace fragile runtime `sed` patches with idempotent Python patching in
api_server entrypoint. The old `sed` heuristics broke because Onyx 5.x
refactored the voice provider to use the OpenAI SDK
(`client.audio.transcriptions.create`) instead of raw HTTP payloads,
causing the language parameter to never be injected and the model
fallback to corrupt factory.py with chained `or` expressions.
- Add `WHISPER_MODEL` env override (defaults to `whisper-1`) so the
transcription payload uses the exact model name exposed by the backend
proxy. Fixes 404 "model not found" against self-hosted Whisper/LiteLLM.
- Fix critical Docker bug where `command` was passed as an argument to
the custom `entrypoint` and silently ignored. `alembic upgrade head`
now runs inside the entrypoint before Uvicorn starts.
- Merge upstream compose improvements:
* Add json-file logging (50m/6 rotation) to web_server, relational_db,
and code-interpreter
* Add code-interpreter healthcheck
* Include optional MCP server block (commented out)
- Preserve existing Livtec customizations:
* Voice endpoint redirected to aido-whisper-ch.livtec.cloud
* WHISPER_LANGUAGE=de injected into SDK transcribe() call
* Custom livtec/aido-web:local branded image
* Bind mounts for logs, caches, and file-system
fix(compose): merge upstream improvements and fix silent alembic skip
- Fix critical Docker behavior bug where the separate `command` block on
`api_server` was being passed as an argument to the custom `entrypoint`
and silently ignored. `alembic upgrade head` is now executed inside
the entrypoint before Uvicorn starts, ensuring DB migrations run.
- Add missing upstream logging blocks (json-file, 50m/6 rotation) to
`web_server`, `relational_db`, and `code-interpreter`.
- Add upstream `healthcheck` to `code-interpreter` for accurate status.
- Include optional upstream `mcp_server` service block (commented out).
feat(voice): override OpenAI voice defaults for custom Whisper proxy
Replace api_server command with entrypoint that patches Onyx voice
provider files at runtime. Required because v4.8.x UI does not allow
setting api_base/stt_model for OpenAI Whisper.
- Force chunked HTTP STT via VOICE_DISABLE_STREAMING_STT=true
- Redirect all OpenAI voice constants to aido-whisper-ch.livtec.cloud
- Add WHISPER_LANGUAGE=de env var for transcription language
LiteLLM proxy, database and Redis are no longer
managed by this repository. They have moved to aido-litellm.
- Remove litellm-proxy, litellm-db, litellm-redis services from
docker-compose.yml
- Remove litellm-config.yaml (now maintained in aido-litellm)
- Prune LiteLLM-specific environment variables from .env.example
The litellm-redis `command:` was indented at service level (2 spaces) instead of
inside the service (4 spaces), so Docker Compose parsed it as a bogus top-level
service named `command` and rejected the entire file with:
services.command must be a mapping
This made `docker compose <anything>` fail — the whole stack was unstartable.
Re-indented it under litellm-redis; `docker compose config` now validates.
- web_server: branded livtec/aido-web:local from ./web, pull_policy never
- restore minio (S3 file store) the flattened compose dropped — api_server
requires S3_ENDPOINT_URL=http://minio:9000 and won't start without it
- nginx published on ${HOST_PORT:-3000} → out-of-the-box http://localhost:3000
- Makefile targets the single file (no override chain)
- README: ./web layout, one-compose flow, USER_AUTH_SECRET + first-boot notes
- gitignore runtime data dirs (db_volume, model caches)
Verified: stack converges healthy on the single file; localhost:3000 + /api/health both 200.
Replace the nested `onyx/` full-clone approach with a flattened, self-contained
deployment structure:
- `make setup` now uses `git sparse-checkout` to fetch only `web/` and
`deployment/data/nginx/` from upstream, extracting them flat into `./web`
and `./data/nginx`. This avoids downloading the entire Onyx repository
when we only rebuild the branded web container ourselves.
- Add a top-level `docker-compose.yml` as the base stack file instead of
referencing paths inside `onyx/deployment/...`. This keeps the compose
project in the repo root so it can be managed by dockge and simplifies
putting Traefik in front of the Onyx nginx.
- Update `docker-compose.branding.yml` build context from `./onyx/web` to `./web`.
- Update `branding.config.json`:
- `webSrcRoot`: `onyx/web` → `web`
- `pinnedCommit`: pinned hash → `main`
- Add rename literals for "Open Source AI Platform" → "Powered by Livtec"
and `https://www.onyx.app` → `https://livtec.cloud`
- Replace the minimal `.env.example` with the full Onyx deployment template.
- Add `setup.sh` for server provisioning (Node.js 25, make, /opt/stacks/onyx).
- Update `make verify` to search `./web/src` instead of `./onyx/web/src`.
All backend/model services continue to use official upstream Docker images;
only the `web_server` image is built locally from the branded source.