forked from lobehub/lobe-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/lobehub/lobe-chat
- Loading branch information
Showing
53 changed files
with
640 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Logto secret | ||
LOGTO_CLIENT_ID= | ||
LOGTO_CLIENT_SECRET= | ||
|
||
# MinIO S3 configuration | ||
MINIO_ROOT_USER=YOUR_MINIO_USER | ||
MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD | ||
|
||
# Configure the bucket information of MinIO | ||
MINIO_LOBE_BUCKET=lobe | ||
S3_ACCESS_KEY_ID= | ||
S3_SECRET_ACCESS_KEY= | ||
|
||
# Proxy, if you need it | ||
# HTTP_PROXY=http://localhost:7890 | ||
# HTTPS_PROXY=http://localhost:7890 | ||
|
||
|
||
# Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE. | ||
# OPENAI_API_KEY=sk-xxxx | ||
# OPENAI_PROXY_URL=https://api.openai.com/v1 | ||
# OPENAI_MODEL_LIST=... | ||
|
||
|
||
# ----- Other config ----- | ||
# if no special requirements, no need to change | ||
LOBE_PORT=3210 | ||
LOGTO_PORT=3001 | ||
MINIO_PORT=9000 | ||
|
||
# Postgres related, which are the necessary environment variables for DB | ||
LOBE_DB_NAME=lobechat | ||
POSTGRES_PASSWORD=uWNZugjBqixf8dxC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Logto secret | ||
LOGTO_CLIENT_ID= | ||
LOGTO_CLIENT_SECRET= | ||
|
||
# MinIO S3 配置 | ||
MINIO_ROOT_USER=YOUR_MINIO_USER | ||
MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD | ||
|
||
# 在下方配置 minio 中添加的桶 | ||
MINIO_LOBE_BUCKET=lobe | ||
S3_ACCESS_KEY_ID= | ||
S3_SECRET_ACCESS_KEY= | ||
|
||
|
||
# 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=... | ||
|
||
|
||
# ----- 相关配置 start ----- | ||
# 如没有特殊需要不用更改 | ||
LOBE_PORT=3210 | ||
LOGTO_PORT=3001 | ||
MINIO_PORT=9000 | ||
|
||
# Postgres 相关,也即 DB 必须的环境变量 | ||
LOBE_DB_NAME=lobechat | ||
POSTGRES_PASSWORD=uWNZugjBqixf8dxC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
services: | ||
network-service: | ||
image: alpine | ||
container_name: lobe-network | ||
ports: | ||
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API | ||
- '9001:9001' # MinIO Console | ||
- '${LOGTO_PORT}:${LOGTO_PORT}' # Logto | ||
- '3002:3002' # Logto Admin | ||
- '${LOBE_PORT}:3210' # LobeChat | ||
command: tail -f /dev/null | ||
networks: | ||
- lobe-network | ||
|
||
postgresql: | ||
image: pgvector/pgvector:pg16 | ||
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' | ||
environment: | ||
- 'MINIO_ROOT_USER=${MINIO_ROOT_USER}' | ||
- 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}' | ||
- 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:${LOBE_PORT}' | ||
restart: always | ||
command: > | ||
server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001" | ||
logto: | ||
image: svhd/logto | ||
container_name: lobe-logto | ||
network_mode: 'service:network-service' | ||
depends_on: | ||
postgresql: | ||
condition: service_healthy | ||
environment: | ||
- 'TRUST_PROXY_HEADER=1' | ||
- 'PORT=${LOGTO_PORT}' | ||
- 'DB_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/logto' | ||
- 'ENDPOINT=http://localhost:${LOGTO_PORT}' | ||
- 'ADMIN_ENDPOINT=http://localhost:3002' | ||
entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start'] | ||
|
||
|
||
lobe: | ||
image: lobehub/lobe-chat-database | ||
container_name: lobe-database | ||
network_mode: 'service:network-service' | ||
depends_on: | ||
postgresql: | ||
condition: service_healthy | ||
network-service: | ||
condition: service_started | ||
minio: | ||
condition: service_started | ||
logto: | ||
condition: service_started | ||
|
||
environment: | ||
- 'APP_URL=http://localhost:3210' | ||
- 'NEXT_AUTH_SSO_PROVIDERS=logto' | ||
- 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=' | ||
- 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg' | ||
- 'NEXTAUTH_URL=http://localhost:${LOBE_PORT}/api/auth' | ||
- 'LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc' | ||
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}' | ||
- 'S3_ENDPOINT=http://localhost:${MINIO_PORT}' | ||
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}' | ||
- 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}' | ||
- 'S3_ENABLE_PATH_STYLE=1' | ||
env_file: | ||
- .env | ||
restart: always | ||
|
||
volumes: | ||
data: | ||
driver: local | ||
s3_data: | ||
driver: local | ||
|
||
networks: | ||
lobe-network: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,36 @@ | ||
# Logto secret | ||
LOGTO_CLIENT_ID= | ||
LOGTO_CLIENT_SECRET= | ||
|
||
# MinIO S3 配置 | ||
MINIO_ROOT_USER=YOUR_MINIO_USER | ||
MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD | ||
|
||
# 在下方配置 minio 中添加的桶 | ||
MINIO_LOBE_BUCKET=lobe | ||
S3_ACCESS_KEY_ID= | ||
S3_SECRET_ACCESS_KEY= | ||
|
||
|
||
# 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=... | ||
|
||
|
||
# ----- 相关配置 start ----- | ||
# =================== | ||
# ===== 预设配置 ===== | ||
# =================== | ||
# 如没有特殊需要不用更改 | ||
LOBE_PORT=3210 | ||
LOGTO_PORT=3001 | ||
CASDOOR_PORT=8000 | ||
MINIO_PORT=9000 | ||
|
||
# Postgres 相关,也即 DB 必须的环境变量 | ||
LOBE_DB_NAME=lobechat | ||
POSTGRES_PASSWORD=uWNZugjBqixf8dxC | ||
|
||
# Casdoor secret | ||
AUTH_CASDOOR_ID=a387a4892ee19b1a2249 | ||
AUTH_CASDOOR_SECRET=dbf205949d704de81b0b5b3603174e23fbecc354 | ||
|
||
# MinIO S3 配置 | ||
MINIO_ROOT_USER=YOUR_MINIO_USER | ||
MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD | ||
|
||
# 在下方配置 minio 中添加的桶 | ||
MINIO_LOBE_BUCKET=lobe | ||
S3_ACCESS_KEY_ID=soaucnP8Bip0TDdUjxng | ||
S3_SECRET_ACCESS_KEY=ZPUzvY34umfcfxvWKSv0P00vczVMB6YmgJS5J9eO | ||
|
Oops, something went wrong.