Commit Graph

13 Commits

Author SHA1 Message Date
Arvin Xu c5ec20abab ✨ feat(docker): run self-hosted Compose chats in Gateway Mode by default (#19583)
* ✨ feat(docker): run self-hosted Compose chats in Gateway Mode by default

- Add the lobehub-gateway service to docker-compose and wire the lobe service
  to it; AGENT_GATEWAY_INTERNAL_URL keeps server pushes on the Compose network
  while browsers use AGENT_GATEWAY_URL.
- S3_INTERNAL_ENDPOINT routes the server's own S3 requests to rustfs:9000 while
  presigned URLs keep the browser-facing S3_ENDPOINT, which local mode sets to
  localhost and the container cannot reach.
- setup.sh generates a per-deployment JWKS_KEY and gateway token and writes the
  gateway URL for each deploy mode; the .env template drops the public JWKS key.
- Warn loudly at container startup when an upgraded stack lacks the gateway
  settings or still uses the public example JWKS_KEY, and document the upgrade.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* 🔒 fix(docker): pass only the public JWK to the gateway container

The gateway only needs the public half of JWKS_KEY to verify browser
sessions, but it received the full private key set, so anyone able to read
the gateway environment could sign tokens LobeHub trusts. setup.sh now also
writes JWKS_PUBLIC_KEY (the same key without d/p/q/dp/dq/qi), Compose passes
only that to the gateway, and the startup check warns when it is missing,
still contains private fields, or does not match JWKS_KEY.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 00:33:26 +08:00
Arvin Xu 40f8f469cf 🐛 fix(docker): make the one-click Docker Compose install start on the released image (#19590)
- Apply a bucket CORS rule in rustfs-init so browser uploads to RustFS through
  presigned URLs are not blocked by the preflight.
- Preload pg_cron and pg_stat_statements alongside pg_search, matching the
  ParadeDB image default. Its first-start bootstrap creates pg_cron under set -e,
  so preloading only pg_search aborted initialization, restarted the container
  and failed the first docker compose up with an unhealthy database.
- Probe PostgreSQL health over TCP with a start period. During initialization the
  image runs a temporary socket-only server, so the socket probe passed early and
  LobeHub's migrations failed with ECONNREFUSED until it had restarted repeatedly.
- setup.sh downloads templates from lobehub/lobehub main, uses curl with a wget
  fallback, and detects the host IP on macOS where hostname -I is missing.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 21:46:07 +08:00
Arvin Xu 37f77f1313 🔧 chore(docker): replace minio with rustfs/rc in compose scripts (#19572)
* 🔧 chore(docker): replace minio with rustfs/rc in compose scripts

- dev/deploy: swap minio/mc init image for rustfs/rc and rename mc
  commands to their mc-compatible rc equivalents
- production/grafana: replace the minio server with rustfs/rustfs,
  split bucket initialization into a rustfs-init sidecar using
  rustfs/rc, and rename MINIO_* env vars to RUSTFS_*
- verified locally: rc alias/mb/ls/anonymous set-json/admin info work
  against a live RustFS server

* 🔥 revert(docker): drop production/grafana migration, keep minimal rustfs/rc swap

Per review feedback, the production/grafana changes (named volume switch
and MINIO_* -> RUSTFS_* env rename) break existing deployments' data and
.env contract. Revert them; keep only the rustfs-init image swap
(minio/mc -> rustfs/rc) and mc -> rc command rename in dev/deploy.

---------

Co-authored-by: arvinxx <arvinxuxu@icloud.com>
2026-09-15 13:53:21 +08:00
YuTengjing 13ada65ad9 ✨ feat(fts-search): safe per-entity Elasticsearch mapping migrations (#19186) 2026-09-09 09:03:40 +08:00
YuTengjing 330c12a760 ✨ feat(self-host): add optional Elasticsearch to Docker Compose (#19028) 2026-09-02 17:37:38 +08:00
qybaihe 4b0ac06411 🐛 fix: use S3 policy Id field for RustFS init (#15603)
Co-authored-by: YuTengjing <ytj2713151713@gmail.com>
2026-07-29 23:46:44 +08:00
Sui_Feng 2731937feb 🔨 chore(docker-compose): Explicitly enable pg_search in the Paradedb container (#16096)
Enable pg_search in Postgres containers

Start Postgres with shared_preload_libraries=pg_search in three docker-compose files (deploy, dev, production/grafana). This adds a command to the Postgres service so the pg_search library is preloaded on startup, ensuring the pg_search extension is available for full-text search features.
Related Links: https://github.com/paradedb/paradedb/pull/4914
2026-06-20 14:44:14 +08:00
YuTengjing 1df5ae32f1 🐛 fix: distinguish SSRF block errors from network errors (#13103) 2026-03-18 18:16:19 +08:00
Marcell Gu 023e3ef11a 📝 docs: Simplify docker compose network architecture & Remove broken links from docker compose docs (#12749)
* ♻️ refactor(docker): simplify network architecture and add admin port
- Remove unnecessary network-service (alpine) container
- Use dedicated lobe-network bridge for all services
- Add RUSTFS_ADMIN_PORT environment variable for admin console
- Update container-to-container communication to use Docker service names
- Use relative path volumes for better data persistence

* 📝 docs: update Docker Compose deployment guide
- Add single-domain deployment documentation
- Update INTERNAL_APP_URL guidance
- Clarify Port Mode vs Domain Mode behavior
- Add S3_ENDPOINT configuration tips
- Remove broken link to non-existent server-database documentation

* fix(docker): keep backward-compatible volume paths for existing deployments

- PostgreSQL: Keep ./data (not ./postgres_data)
- Redis: Keep redis_data named volume (not ./redis_data)
- RustFS: Keep rustfs-data named volume (not ./rustfs_data)

This ensures existing users can upgrade without data migration.

* fix(docker): correct Port Mode vs Domain Mode description

- Fix reversed explanation in comments
- Port Mode: Uses default ports (3210/9000/9001)
- Domain Mode: Custom ports via reverse proxy

This aligns with the actual deployment script behavior.
2026-03-10 09:55:56 +08:00
Innei fcdaf9d814 🔧 chore: update eslint v2 configuration and suppressions (#12133)
* v2 init

* chore: update eslint suppressions and package dependencies

- Removed several eslint suppressions related to array sorting and reversing from eslint-suppressions.json to clean up the configuration.
- Updated @lobehub/lint package version from 2.0.0-beta.6 to 2.0.0-beta.7 in package.json for improvements and bug fixes.
- Made minor formatting adjustments in vitest.config.mts and various SKILL.md files for better readability and consistency.

Signed-off-by: Innei <tukon479@gmail.com>

* fix: clean up import statements and formatting

- Removed unnecessary whitespace in replaceComponentImports.ts for improved readability.
- Standardized import statements in contextEngineering.ts and createAgentExecutors.ts by adding missing spaces for consistency.

Signed-off-by: Innei <tukon479@gmail.com>

* chore: update eslint suppressions and clean up code formatting

* 🐛 fix: use vi.hoisted for mock variable initialization

Fix TDZ error in persona service test by using vi.hoisted() to ensure
mock variables are available when vi.mock factory runs.

---------

Signed-off-by: Innei <tukon479@gmail.com>
2026-02-11 13:04:48 +08:00
YuTengjing 7ba15cceba ♻️ refactor(docker-compose): restructure dev environment (#12132)
* 🔥 chore(docker-compose): remove Casdoor SSO dependency

Casdoor is no longer needed since BetterAuth now supports email/password registration natively.

LOBE-3907

* ♻️ refactor(docker-compose): restructure directories

- Rename local/ to dev/ for development dependencies
- Remove logto/ and zitadel/ from production/
- Restore Casdoor config in production/grafana/
- Simplify dev/ to core services only (postgresql, redis, rustfs, searxng)
- Update docker-compose.development.yml to use dev/
- Remove minio-bucket.config.json (switched to rustfs)

* ♻️ refactor(docker-compose): simplify dev environment setup

- Remove docker-compose.development.yml, use dev/docker-compose.yml directly
- Add npm scripts: dev:docker, dev:docker:down, dev:docker:reset
- Simplify .env.example.development (remove variable refs, redundant vars)
- Update docker-compose/dev/.env.example (consistent passwords)
- Add docker-compose/dev/data/ to .gitignore
- Update setup docs: use npm scripts, remove image generation section

* 🔧 chore: add SSRF_ALLOW_PRIVATE_IP_ADDRESS to dev env example

* 🔒 security: auto-generate KEY_VAULTS_SECRET and AUTH_SECRET in setup.sh

- Remove hardcoded secrets from docker-compose.yml
- Add placeholders to .env.example files
- Generate secrets dynamically in setup.sh using openssl rand -base64 32

* 🔧 chore(docker-compose): expose SearXNG port and improve dev scripts

- Add SearXNG port mapping (8180:8080) for host access
- Use --wait flag in dev:docker to ensure services are healthy
- Include db:migrate in dev:docker:reset for one-command reset
- Update MinIO reference to RustFS in zh-CN docs
- Add SearXNG to service URLs and port conflict docs
2026-02-06 12:21:30 +08:00
Arvin Xu 4a87b31246 📝 docs: improve docs (#12013)
Update docs
2026-01-31 19:46:44 +08:00
Arvin Xu f17acd7f7e ♻️ chore(docker-compose): refactor docker compose (#11989)
* improve message content

* ♻️ refactor(docker-compose): 创建精简版 deploy 配置

- 新建 docker-compose/deploy 目录,包含最小化部署配置
- 仅保留核心服务:postgresql、redis、rustfs、searxng、lobe
- 移除 Casdoor 认证服务相关配置
- 移除可观测性服务(Grafana/Prometheus/Tempo/otel-collector)
- 使用 paradedb/paradedb:latest 镜像(支持 pgvector + pg_search)
- 更新 setup.sh 指向新的 deploy 目录
- 清理 .env 示例文件中的 Casdoor 相关配置

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* update document

* update content

* update content

* improve env

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:15:43 +08:00