Remake Repository

This commit is contained in:
arch3rPro
2025-06-30 23:37:03 +08:00
parent d593e04bd7
commit e98d0faf79
420 changed files with 55489 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
# Proxy如果你需要的话比如你使用 GitHub 作为鉴权服务提供商)
# HTTP_PROXY=http://localhost:7890
# HTTPS_PROXY=http://localhost:7890
# 其他环境变量,视需求而定,可以参照客户端版本的环境变量配置,注意不要有 ACCESS_CODE
# OPENAI_API_KEY=sk-xxxx
# OPENAI_PROXY_URL=https://api.openai.com/v1
# OPENAI_MODEL_LIST=...
# ===================
# ===== 预设配置 =====
# ===================
# 如没有特殊需要不用更改
LOBE_PORT=3210
CASDOOR_PORT=8000
MINIO_PORT=9000
APP_URL=http://192.168.123.105:3210
AUTH_URL=http://192.168.123.105:3210/api/auth
# Postgres 相关,也即 DB 必须的环境变量
LOBE_DB_NAME=lobechat
POSTGRES_PASSWORD=uWNZugjBqixf8dxC
AUTH_CASDOOR_ISSUER=http://192.168.123.105:8000
# Casdoor secret
AUTH_CASDOOR_ID=a387a4892ee19b1a2249
AUTH_CASDOOR_SECRET=dbf205949d704de81b0b5b3603174e23fbecc354
# MinIO S3 配置
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
# 在下方配置 minio 中添加的桶
S3_PUBLIC_DOMAIN=http://192.168.123.105:9000
S3_ENDPOINT=http://192.168.123.105:9000
MINIO_LOBE_BUCKET=lobe
# 为 casdoor 配置
origin=http://192.168.123.105:8000

View File

@@ -0,0 +1,137 @@
additionalProperties:
formFields:
# Default config
- default: 3210
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Application Port
labelZh: 应用端口
required: true
rule: paramPort
type: number
- default: 8000
edit: true
envKey: CASDOOR_PORT
labelEn: CASDOOR Port
labelZh: CASDOOR 端口
required: true
rule: paramPort
type: number
- default: 9000
edit: true
envKey: MINIO_PORT
labelEn: MinIO Port
labelZh: MinIO端口
required: true
rule: paramPort
type: number
- default: http://Your-IP:3210
edit: true
envKey: APP_URL
labelEn: Application URL
labelZh: 应用地址
required: true
rule: paramExtUrl
type: text
- default: http://Your-IP:3210/api/auth
edit: true
envKey: AUTH_URL
labelEn: Auth Service URL
labelZh: 认证服务地址
required: true
rule: paramExtUrl
type: text
# Postgres related
- default: lobechat
edit: true
envKey: LOBE_DB_NAME
labelEn: Database Name
labelZh: 数据库名称
random: true
required: true
rule: paramCommon
type: text
- default: uWNZugjBqixf8dxC
edit: true
envKey: POSTGRES_PASSWORD
labelEn: Database Password
labelZh: 数据库密码
required: true
rule: paramCommon
type: password
- default: http://Your-IP:8000
edit: true
envKey: AUTH_CASDOOR_ISSUER
labelEn: AUTH CASDOOR ISSUER
labelZh: AUTH CASDOOR ISSUER
required: true
rule: paramExtUrl
type: text
# Casdoor secret
- default: a387a4892ee19b1a2249
edit: true
envKey: AUTH_CASDOOR_ID
labelEn: AUTH CASDOOR ID
labelZh: AUTH CASDOOR ID
required: true
rule: paramCommon
type: text
- default: dbf205949d704de81b0b5b3603174e23fbecc354
edit: true
envKey: AUTH_CASDOOR_SECRET
labelEn: AUTH CASDOOR SECRET
labelZh: AUTH CASDOOR SECRET
required: true
rule: paramCommon
type: password
# MinIO S3 configuration
- default: admin
edit: true
envKey: MINIO_ROOT_USER
labelEn: MinIO ROOT User
labelZh: MinIO ROOT User
required: true
rule: paramCommon
type: text
- default: e07a87a0
edit: true
envKey: MINIO_ROOT_PASSWORD
labelEn: MinIO ROOT Password
labelZh: MinIO ROOT Password
required: true
rule: paramCommon
type: password
# Configure the bucket information of MinIO
- default: http://Your-IP:9000
edit: true
envKey: S3_ENDPOINT
labelEn: S3 Endpoint
labelZh: S3 Endpoint
required: true
rule: paramExtUrl
type: text
- default: http://Your-IP:9000
edit: true
envKey: S3_PUBLIC_DOMAIN
labelEn: S3 PUBLIC DOMAIN
labelZh: S3 PUBLIC DOMAIN
required: true
rule: paramExtUrl
type: text
- default: lobe
edit: true
envKey: MINIO_LOBE_BUCKET
labelEn: MINIO LOBE BUCKET
labelZh: MINIO LOBE BUCKET
required: true
rule: paramCommon
type: text
# Configure for casdoor
- default: http://Your-IP:8000
edit: true
envKey: origin
labelEn: origin
labelZh: origin
required: true
rule: paramExtUrl
type: text

View File

@@ -0,0 +1,122 @@
services:
network-service:
image: alpine
container_name: lobe-network
restart: always
ports:
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
- '9001:9001' # MinIO Console
- '${CASDOOR_PORT}:${CASDOOR_PORT}' # Casdoor
- '${PANEL_APP_PORT_HTTP}:3210' # LobeChat
command: tail -f /dev/null
networks:
- lobe-network
postgresql:
image: pgvector/pgvector:pg17
container_name: lobe-postgres
ports:
- '5432:5432'
volumes:
- './data:/var/lib/postgresql/data'
environment:
- 'POSTGRES_DB=${LOBE_DB_NAME}'
- 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
restart: always
networks:
- lobe-network
minio:
image: minio/minio
container_name: lobe-minio
network_mode: 'service:network-service'
volumes:
- './s3_data:/etc/minio/data'
- ./minio-entrypoint.sh:/entrypoint.sh
environment:
- 'MINIO_API_CORS_ALLOW_ORIGIN=*'
env_file:
- .env
restart: always
entrypoint: ["sh", "/entrypoint.sh"]
casdoor:
image: casbin/casdoor:v1.843.0
container_name: lobe-casdoor
entrypoint: /bin/sh -c './server --createDatabase=true'
network_mode: 'service:network-service'
depends_on:
postgresql:
condition: service_healthy
environment:
httpport: ${CASDOOR_PORT}
RUNNING_IN_DOCKER: 'true'
driverName: 'postgres'
dataSourceName: 'user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5432 sslmode=disable dbname=casdoor'
runmode: 'dev'
volumes:
- ./init_data.json:/init_data.json
env_file:
- .env
searxng:
image: searxng/searxng
container_name: lobe-searxng
volumes:
- './searxng-settings.yml:/etc/searxng/settings.yml'
environment:
- 'SEARXNG_SETTINGS_FILE=/etc/searxng/settings.yml'
restart: always
networks:
- lobe-network
env_file:
- .env
lobe:
image: lobehub/lobe-chat-database:1.77.16
container_name: lobe-chat
network_mode: 'service:network-service'
depends_on:
postgresql:
condition: service_healthy
network-service:
condition: service_started
minio:
condition: service_started
casdoor:
condition: service_started
environment:
- 'NEXT_AUTH_SSO_PROVIDERS=casdoor'
- 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ='
- 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg'
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
- 'S3_ENABLE_PATH_STYLE=1'
- 'S3_ACCESS_KEY=${MINIO_ROOT_USER}'
- 'S3_ACCESS_KEY_ID=${MINIO_ROOT_USER}'
- 'S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD}'
- 'LLM_VISION_IMAGE_USE_BASE64=1'
- 'S3_SET_ACL=0'
- 'SEARXNG_URL=http://searxng:8080'
env_file:
- .env
restart: always
volumes:
- ./lobe-entrypoint.sh:/entrypoint.sh
entrypoint: ["sh", "/entrypoint.sh"]
volumes:
data:
driver: local
s3_data:
driver: local
networks:
lobe-network:
driver: bridge

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
#!/bin/sh
/bin/node /app/startServer.js &
LOBE_PID=$!
sleep 3
if [ $(wget --timeout=5 --spider --server-response ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration 2>&1 | grep -c 'HTTP/1.1 200 OK') -eq 0 ]; then
echo '⚠Warining: Unable to fetch OIDC configuration from Casdoor'
echo 'Request URL: ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration'
echo 'Read more at: https://lobehub.com/docs/self-hosting/server-database/docker-compose#necessary-configuration'
echo ''
echo '⚠️注意:无法从 Casdoor 获取 OIDC 配置'
echo '请求 URL: ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration'
echo '了解更多https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose#necessary-configuration'
echo ''
else
if ! wget -O - --timeout=5 ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration 2>&1 | grep 'issuer' | grep ${AUTH_CASDOOR_ISSUER}; then
printf '❌Error: The Auth issuer is conflict, Issuer in OIDC configuration is: %s' $(wget -O - --timeout=5 ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration 2>&1 | grep -E 'issuer.*' | awk -F '"' '{print $4}')
echo ' , but the issuer in .env file is: ${AUTH_CASDOOR_ISSUER} '
echo 'Request URL: ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration'
echo 'Read more at: https://lobehub.com/docs/self-hosting/server-database/docker-compose#necessary-configuration'
echo ''
printf '❌错误Auth 的 issuer 冲突OIDC 配置中的 issuer 是:%s' $(wget -O - --timeout=5 ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration 2>&1 | grep -E 'issuer.*' | awk -F '"' '{print $4}')
echo ' , 但 .env 文件中的 issuer 是:${AUTH_CASDOOR_ISSUER} '
echo '请求 URL: ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration'
echo '了解更多https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose#necessary-configuration'
echo ''
fi
fi
if [ $(wget --timeout=5 --spider --server-response ${S3_ENDPOINT}/minio/health/live 2>&1 | grep -c 'HTTP/1.1 200 OK') -eq 0 ]; then
echo '⚠Warining: Unable to fetch MinIO health status'
echo 'Request URL: ${S3_ENDPOINT}/minio/health/live'
echo 'Read more at: https://lobehub.com/docs/self-hosting/server-database/docker-compose#necessary-configuration'
echo ''
echo '⚠️注意:无法获取 MinIO 健康状态'
echo '请求 URL: ${S3_ENDPOINT}/minio/health/live'
echo '了解更多https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose#necessary-configuration'
echo ''
fi
wait $LOBE_PID

View File

@@ -0,0 +1,16 @@
#!/bin/sh
minio server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001" &
MINIO_PID=$!
while ! curl -s http://localhost:${MINIO_PORT}/minio/health/live; do
echo 'Waiting for MinIO to start...'
sleep 1
done
sleep 5
mc alias set myminio http://localhost:${MINIO_PORT} ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD}
echo "Creating bucket ${MINIO_LOBE_BUCKET}"
mc mb myminio/${MINIO_LOBE_BUCKET}
wait $MINIO_PID

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,54 @@
# LobeChat 数据库版
## 安装注意事项
1. 第一次安装时,会提示安装失败,在应用商店点击重建即可;
2. 安装时需要将默认的Your-IP修改为您的1Panel主机的IP
3. 默认的端口号如非必要,请保持默认;
4. 安装成功后需要登录Casdoor>身份认证>lobechat编辑在重定向URLS中添加`http://Your-IP:3210/api/auth/callback/casdoor`,保存后即可用下面初始账号登录LobeChat
5. LobeChat更新频繁应用已设置Latest版本想要体验新版本点击重建即可。
## 初始账号密码
LobeChat:
- URL: http://Your-IP:3210
- Username: user
- Password: 123
Casdoor:
- URL: http://Your-IP:8000
- Username: admin
- Password: 123
Minio:
- URL: http://Your-IP:9000
- Username: admin
- Password: YOUR_MINIO_PASSWORD
## 简介
**LobeChat** 是一个现代化设计的开源 ChatGPT/LLMs 聊天应用与开发框架支持语音合成、多模态、可扩展的function call插件系统一键免费拥有你自己的 ChatGPT/Gemini/Claude/Ollama 应用。
Lobe Chat 支持两种部署模式:
- 客户端数据库模式:
该模式下数据均保留在用户本地,不会跨多端同步,也不支持文件上传、知识库等进阶功能。
- 服务端数据库模式:
该模式下会使用 PostgreSQL 作为数据库,数据会存储在服务端,支持跨多端同步,并提供文件上传、知识库等进阶功能。
本应用商店部署的是**服务端数据库版本**PS服务端数据库版本的配置脚本太难写了=-=1Panel官网提供的是客户端数据库版本功能不全
![LobeChat](https://private-user-images.githubusercontent.com/34400653/411259329-9647f70f-b71b-43b6-9564-7cdd12d1c24d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDIwOTg1MjQsIm5iZiI6MTc0MjA5ODIyNCwicGF0aCI6Ii8zNDQwMDY1My80MTEyNTkzMjktOTY0N2Y3MGYtYjcxYi00M2I2LTk1NjQtN2NkZDEyZDFjMjRkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzE2VDA0MTAyNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM5NjNkZjg3NmE0M2M5OTc4OWVkZWYxNGFiZTQxNzM1YTJlNzg1ODllOGZjMTc4Nzg0MmEwYThiNDQ1MzRkZjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.5u2ujzdC-1oZ3-vcrFhXCjEyx9hmpO7VVdGu6cBGYxo)
## 特性:
- 多模型服务商支持;
- 支持本地大语言模型 (LLM)
- 模型视觉识别 (Model Visual)
- TTS & STT 语音会话;
- Text to Image 文生图;
- 插件系统 (Function Calling)
- 助手市场 (GPTs)
- 支持本地 / 远程数据库;
- 支持多用户管理;
- 渐进式 Web 应用 (PWA)
- 移动设备适配;
- 自定义主题。

View File

@@ -0,0 +1,19 @@
name: LobeChat-Data
tags:
- AI / 大模型
title: LobeChat服务端数据库版 - 开源、现代设计的 ChatGPT/LLMs UI/框架
description: LobeChat服务端数据库版 - 开源、现代设计的 ChatGPT/LLMs UI/框架
additionalProperties:
key: lobe-chat-data
name: LobeChat-Data
tags:
- AI
shortDescZh: LobeChat服务端数据库版 - 现代化设计的开源 ChatGPT/LLMs 聊天应用与开发框架
shortDescEn: LobeChat-Data - An open-source, modern-design ChatGPT/LLMs UI/Framework
type: tool
crossVersionUpdate: true
limit: 0
recommend: 0
website: https://lobehub.com
github: https://github.com/lobehub/lobe-chat
document: https://lobehub.com/docs

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB