Commit graph

8 commits

Author SHA1 Message Date
livdebus
7a618d4a74 feat: production hardening with LiteLLM proxy integration and security updates
## Overview
Major production readiness update integrating LiteLLM proxy for AI model
management, security hardening, and infrastructure simplification.

## Changes

### 🔐 Security & Secrets Management
- Auto-generate secrets via `openssl rand -hex` for:
  - `USER_AUTH_SECRET`, `ENCRYPTION_KEY_SECRET`, `METRICS_AUTH_TOKEN`
  - `POSTGRES_PASSWORD`, `LITELLM_*` credentials
- Set `DISABLE_TELEMETRY=true` for data sovereignty compliance
- Changed `POSTGRES_USER` from `postgres` → `onyx-admin`
- Set `TRACK_EXTERNAL_IDP_EXPIRY=true`

### 🤖 LiteLLM Proxy Integration
- **New service**: `litellm-proxy` with dedicated Postgres + Redis
- **New config**: `litellm-config.yaml` with 3 Swiss-hosted models:
  - `LivQwen` (Qwen3.5-397B-A17B-FP8)
  - `LivKimi` (Kimi-K2.6)
  - `LivGemma` (NVIDIA Nemotron-3-Nano-30B-A3B-FP8)
- Model fallback routing: LivQwen ↔ LivKimi ↔ LivGemma
- Caching enabled via Redis with 3600s TTL
- Custom error message mappings for user-friendly responses

### 🏗️ Infrastructure Updates
- Switched from local builds → official Onyx Docker images
  - Removed `build.context` for api_server, background, inference/indexing servers
- Increased NGINX timeouts: 300s → 600s (for complex AI queries)
- Added PostgreSQL connection pooling & keepalive settings
- S3 credentials now fully environment-driven (no hardcoded values)
- Added `S3_REGION` variable
- Removed certbot service (SSL handled externally)

### ⚙️ Configuration
- `COMPOSE_PROFILES=s3-filestore` uncommented
- `DISABLE_LITELLM_STREAMING=false`
- `LLM_SOCKET_READ_TIMEOUT=600`
- `GENERATIVE_MODEL_ACCESS_CHECK_FREQ=300` (5 minutes)
2026-06-30 23:04:24 +02:00
livdebus
4216fd1c13 minio commented out
We use external S3 provider, therefore we dont need minio
2026-06-30 21:02:24 +02:00
NaeemDosh
b586639a70 docs: add 'Accessing the app' section to README
How to reach the app (http://localhost:3000), change the port (HOST_PORT),
auth behaviour, first-boot wait, health-check commands, and troubleshooting
the backend-unavailable banner.
2026-06-30 16:55:27 +05:00
NaeemDosh
a7e31fcfbd Consolidate stack into one docker-compose.yml + restore minio + publish port
- 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.
2026-06-30 12:27:15 +05:00
NaeemDosh
63639567d0 Consolidate into one docker-compose; restore minio; publish local port
Single self-contained docker-compose.yml for the client — no override chain:
- web_server uses the branded livtec/aido-web:local (built from ./web), pull_policy never
- restore the minio (S3 file store) service the flattened compose had dropped;
  api_server requires S3_ENDPOINT_URL=http://minio:9000 and can't start without it
- publish nginx on ${HOST_PORT:-3000} for out-of-the-box http://localhost:3000
  (Traefik labels still apply in prod)
- Makefile now targets the single file; drop docker-compose.branding.yml
- README updated for ./web layout, one-compose flow, USER_AUTH_SECRET + first-boot notes
- gitignore runtime data dirs (db_volume, model caches)

Verified: full stack converges healthy on one file; localhost:3000 and /api/health both 200.
2026-06-30 12:25:36 +05:00
NaeemDosh
bbd9835558 Fix remaining branding leaks: error-page logo/links + notification bell
Follow-up to client testing on the flattened (sparse-checkout) structure.

- icons.tsx: swap inline OnyxLogoTypeIcon SVG (error/health pages, craft) for
  the AIDO wordmark asset, via a new template + anchored, idempotent patch.
- Notification bell content is backend-generated (official image, not rebuilt),
  so rebrand it at render time: generate lib/branding-runtime.ts from config and
  route the notifications hook through it — sanitize 'Onyx'->brand and suppress
  upstream/EE product notices (permissions-migration announcement, license/trial).
- Repoint hardcoded Onyx links/emails: Discord, support@onyx.app, '@onyx.app
  administrators' (WebResultIcon hostname logic intentionally left untouched).
- .gitignore: ignore generated /web/, /data/, .onyx-sparse-tmp/ so 'make setup'
  output can't be committed accidentally.
- README + verify updated for the new touchpoints.

Verified in the flattened layout: branded web image builds, 0 stray 'Onyx',
and bundle greps confirm all leaks gone.
2026-06-29 22:57:50 +05:00
livdebus
1d650c4d30 refactor: flatten structure, sparse-checkout upstream, add base compose for dockge/traefik
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.
2026-06-29 12:43:31 +02:00
NaeemDosh
c6e3776617 AIDO white-label overlay for Onyx Community Edition
Thin-overlay white-label: branding driven by a single config, applied into
onyx/web by apply-branding.mjs; only the web image is built locally while all
other services use official Onyx images.

- branding/branding.config.json: single source of truth (name, assets, links)
- branding/apply-branding.mjs: asset fetch + logo swap + favicon repoint + codemod
- docker-compose.branding.yml + Makefile: build only livtec/aido-web, pull the rest
- .env/.env.nginx examples + README (update-branding & upgrade-Onyx workflows)

Community Edition only; no EE/commercial features used.
2026-06-27 08:06:58 +05:00