From c04afbadaa068cc17ae61cdb922ceb9e28985aec Mon Sep 17 00:00:00 2001 From: Arthals <36695271+zhuozhiyongde@users.noreply.github.com> Date: Sun, 13 Oct 2024 12:09:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9Ddocs:=20docker=20compose=20project?= =?UTF-8?q?=20name=20(#4349)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose/local/docker-compose.yml | 20 ++++--- docker-compose/local/logto/docker-compose.yml | 13 ++-- docker-compose/local/setup.sh | 59 ++++++++++--------- .../local/zitadel/docker-compose.yml | 16 ++--- .../production/logto/docker-compose.yml | 3 +- .../production/zitadel/docker-compose.yml | 10 ++-- .../server-database/docker-compose.mdx | 56 ++++++++++++------ .../server-database/docker-compose.zh-CN.mdx | 35 ++++++----- 8 files changed, 119 insertions(+), 93 deletions(-) diff --git a/docker-compose/local/docker-compose.yml b/docker-compose/local/docker-compose.yml index 6d0a7821c88d..60688983c1d0 100644 --- a/docker-compose/local/docker-compose.yml +++ b/docker-compose/local/docker-compose.yml @@ -1,10 +1,11 @@ +name: lobe-chat-database services: network-service: image: alpine container_name: lobe-network ports: - - '${MINIO_PORT}:${MINIO_PORT}' # MinIO API - - '9001:9001' # MinIO Console + - '${MINIO_PORT}:${MINIO_PORT}' # MinIO API + - '9001:9001' # MinIO Console - '${CASDOOR_PORT}:${CASDOOR_PORT}' # Casdoor - '${LOBE_PORT}:3210' # LobeChat command: tail -f /dev/null @@ -15,7 +16,7 @@ services: image: pgvector/pgvector:pg16 container_name: lobe-postgres ports: - - "5432:5432" + - '5432:5432' volumes: - './data:/var/lib/postgresql/data' environment: @@ -44,6 +45,7 @@ services: command: > server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001" + casdoor: image: casbin/casdoor container_name: lobe-casdoor @@ -53,17 +55,17 @@ services: postgresql: condition: service_healthy environment: - RUNNING_IN_DOCKER: "true" - driverName: "postgres" - dataSourceName: "user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5432 sslmode=disable dbname=casdoor" - origin: "http://localhost:${CASDOOR_PORT}" - runmode: "dev" + RUNNING_IN_DOCKER: 'true' + driverName: 'postgres' + dataSourceName: 'user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5432 sslmode=disable dbname=casdoor' + origin: 'http://localhost:${CASDOOR_PORT}' + runmode: 'dev' volumes: - ./init_data.json:/init_data.json lobe: image: lobehub/lobe-chat-database - container_name: lobe-database + container_name: lobe-chat network_mode: 'service:network-service' depends_on: postgresql: diff --git a/docker-compose/local/logto/docker-compose.yml b/docker-compose/local/logto/docker-compose.yml index 9550856a5ead..006e9d21f48d 100644 --- a/docker-compose/local/logto/docker-compose.yml +++ b/docker-compose/local/logto/docker-compose.yml @@ -1,12 +1,13 @@ +name: lobe-chat-database services: network-service: image: alpine container_name: lobe-network ports: - - '${MINIO_PORT}:${MINIO_PORT}' # MinIO API - - '9001:9001' # MinIO Console + - '${MINIO_PORT}:${MINIO_PORT}' # MinIO API + - '9001:9001' # MinIO Console - '${LOGTO_PORT}:${LOGTO_PORT}' # Logto - - '3002:3002' # Logto Admin + - '3002:3002' # Logto Admin - '${LOBE_PORT}:3210' # LobeChat command: tail -f /dev/null networks: @@ -16,7 +17,7 @@ services: image: pgvector/pgvector:pg16 container_name: lobe-postgres ports: - - "5432:5432" + - '5432:5432' volumes: - './data:/var/lib/postgresql/data' environment: @@ -45,6 +46,7 @@ services: command: > server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001" + logto: image: svhd/logto container_name: lobe-logto @@ -60,10 +62,9 @@ services: - '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 + container_name: lobe-chat network_mode: 'service:network-service' depends_on: postgresql: diff --git a/docker-compose/local/setup.sh b/docker-compose/local/setup.sh index 69cc6f52203d..17a80179be1a 100644 --- a/docker-compose/local/setup.sh +++ b/docker-compose/local/setup.sh @@ -9,7 +9,7 @@ # ====================== # 1. Default values of arguments -# Arg: -f +# Arg: -f # Determine force download asserts, default is not FORCE_DOWNLOAD=false @@ -33,10 +33,12 @@ while getopts "fl:-:" opt; do -) case "${OPTARG}" in lang) - LANGUAGE="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 )) + LANGUAGE="${!OPTIND}" + OPTIND=$(($OPTIND + 1)) ;; url) - SOURCE_URL="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 )) + SOURCE_URL="${!OPTIND}" + OPTIND=$(($OPTIND + 1)) ;; *) echo "Usage: $0 [-f] [-l language|--lang language] [--url source]" >&2 @@ -51,7 +53,6 @@ while getopts "fl:-:" opt; do esac done - # =============== # == Variables == # =============== @@ -161,7 +162,7 @@ show_message() { ;; esac ;; - esac + esac } # Function to download files @@ -186,7 +187,7 @@ extract_file() { if [ $? -eq 0 ]; then echo "$file_name" $(show_message "extracted_success") "$target_dir" else - echo "$file_name" $(show_message "extracted_failed") + echo "$file_name" $(show_message "extracted_failed") exit 1 fi else @@ -198,30 +199,30 @@ extract_file() { # Define colors declare -A colors colors=( - [black]="\e[30m" - [red]="\e[31m" - [green]="\e[32m" - [yellow]="\e[33m" - [blue]="\e[34m" - [magenta]="\e[35m" - [cyan]="\e[36m" - [white]="\e[37m" - [reset]="\e[0m" + [black]="\e[30m" + [red]="\e[31m" + [green]="\e[32m" + [yellow]="\e[33m" + [blue]="\e[34m" + [magenta]="\e[35m" + [cyan]="\e[36m" + [white]="\e[37m" + [reset]="\e[0m" ) print_centered() { - local text="$1" # Get input texts - local color="${2:-reset}" # Get color, default to reset - local term_width=$(tput cols) # Get terminal width - local text_length=${#text} # Get text length - local padding=$(( (term_width - text_length) / 2 )) # Get padding - # Check if the color is valid - if [[ -z "${colors[$color]}" ]]; then - echo "Invalid color specified. Available colors: ${!colors[@]}" - return 1 - fi - # Print the text with padding - printf "%*s${colors[$color]}%s${colors[reset]}\n" $padding "" "$text" + local text="$1" # Get input texts + local color="${2:-reset}" # Get color, default to reset + local term_width=$(tput cols) # Get terminal width + local text_length=${#text} # Get text length + local padding=$(((term_width - text_length) / 2)) # Get padding + # Check if the color is valid + if [[ -z "${colors[$color]}" ]]; then + echo "Invalid color specified. Available colors: ${!colors[@]}" + return 1 + fi + # Print the text with padding + printf "%*s${colors[$color]}%s${colors[reset]}\n" $padding "" "$text" } # Download files asynchronously @@ -236,7 +237,7 @@ rm s3_data.tar.gz # Display final message printf "\n%s\n\n" "$(show_message "tips_run_command")" -print_centered "docker compose -p lobechat-starter up -d" "green" +print_centered "docker compose up -d" "green" printf "\n%s" "$(show_message "tips_show_documentation")" printf "%s\n" $(show_message "tips_show_documentation_url") -printf "\n\e[33m%s\e[0m\n" "$(show_message "tips_warning")" \ No newline at end of file +printf "\n\e[33m%s\e[0m\n" "$(show_message "tips_warning")" diff --git a/docker-compose/local/zitadel/docker-compose.yml b/docker-compose/local/zitadel/docker-compose.yml index 8f3cf8c4b44b..17fc1de579ae 100644 --- a/docker-compose/local/zitadel/docker-compose.yml +++ b/docker-compose/local/zitadel/docker-compose.yml @@ -1,10 +1,11 @@ +name: lobe-chat-database services: network-service: image: alpine container_name: lobe-network ports: - - '9000:9000' # MinIO API - - '9001:9001' # MinIO Console + - '9000:9000' # MinIO API + - '9001:9001' # MinIO Console - '8080:8080' # Zitadel Console - '3210:3210' # LobeChat command: tail -f /dev/null @@ -15,7 +16,7 @@ services: image: pgvector/pgvector:pg16 container_name: lobe-postgres ports: - - "5432:5432" + - '5432:5432' volumes: - './data:/var/lib/postgresql/data' environment: @@ -44,24 +45,23 @@ services: command: > server /etc/minio/data --address ":9000" --console-address ":9001" + zitadel: restart: 'always' image: 'ghcr.io/zitadel/zitadel:latest' container_name: lobe-zitadel network_mode: 'service:network-service' - command: start-from-init --config /zitadel-config.yaml --steps - /zitadel-init-steps.yaml --masterkey "cft3Tekr/rQBOqwoQSCPoncA9BHbn7QJ" - --tlsMode disabled #MasterkeyNeedsToHave32Characters + command: start-from-init --config /zitadel-config.yaml --steps /zitadel-init-steps.yaml --masterkey "cft3Tekr/rQBOqwoQSCPoncA9BHbn7QJ" --tlsMode disabled #MasterkeyNeedsToHave32Characters volumes: - ./zitadel-config.yaml:/zitadel-config.yaml:ro - - ./zitadel-init-steps.yaml:/zitadel-init-steps.yaml:ro + - ./zitadel-init-steps.yaml:/zitadel-init-steps.yaml:ro depends_on: postgresql: condition: service_healthy lobe: image: lobehub/lobe-chat-database - container_name: lobe-database + container_name: lobe-chat network_mode: 'service:network-service' depends_on: postgresql: diff --git a/docker-compose/production/logto/docker-compose.yml b/docker-compose/production/logto/docker-compose.yml index 76014a406921..764c38edf9ba 100644 --- a/docker-compose/production/logto/docker-compose.yml +++ b/docker-compose/production/logto/docker-compose.yml @@ -1,3 +1,4 @@ +name: lobe-chat-database services: postgresql: image: pgvector/pgvector:pg16 @@ -52,7 +53,7 @@ services: lobe: image: lobehub/lobe-chat-database - container_name: lobe-database + container_name: lobe-chat ports: - '3210:3210' depends_on: diff --git a/docker-compose/production/zitadel/docker-compose.yml b/docker-compose/production/zitadel/docker-compose.yml index 1e46add98791..cdbcfb96e53f 100644 --- a/docker-compose/production/zitadel/docker-compose.yml +++ b/docker-compose/production/zitadel/docker-compose.yml @@ -1,3 +1,4 @@ +name: lobe-chat-database services: postgresql: image: pgvector/pgvector:pg16 @@ -32,14 +33,13 @@ services: restart: always command: > server /etc/minio/data --address ":9000" --console-address ":9001" - + + zitadel: restart: always image: ghcr.io/zitadel/zitadel:latest container_name: lobe-zitadel - command: start-from-init --config /zitadel-config.yaml --steps - /zitadel-init-steps.yaml --masterkey "cft3Tekr/rQBOqwoQSCPoncA9BHbn7QJ" - --tlsMode external #MasterkeyNeedsToHave32Characters + command: start-from-init --config /zitadel-config.yaml --steps /zitadel-init-steps.yaml --masterkey "cft3Tekr/rQBOqwoQSCPoncA9BHbn7QJ" --tlsMode external #MasterkeyNeedsToHave32Characters ports: - 8080:8080 volumes: @@ -51,7 +51,7 @@ services: lobe: image: lobehub/lobe-chat-database - container_name: lobe-database + container_name: lobe-chat ports: - '3210:3210' depends_on: diff --git a/docs/self-hosting/server-database/docker-compose.mdx b/docs/self-hosting/server-database/docker-compose.mdx index 8b87730b4365..0de366694e63 100644 --- a/docs/self-hosting/server-database/docker-compose.mdx +++ b/docs/self-hosting/server-database/docker-compose.mdx @@ -20,7 +20,11 @@ tags: - This article assumes you are familiar with the basic principles and processes of deploying the LobeChat server database version (hereinafter referred to as DB version), so it only includes core environment variable configurations. If you are not familiar with the deployment principles of LobeChat DB version, please refer to [Deploying with a Server Database](/docs/self-hosting/server-database). + This article assumes you are familiar with the basic principles and processes of deploying the + LobeChat server database version (hereinafter referred to as DB version), so it only includes core + environment variable configurations. If you are not familiar with the deployment principles of + LobeChat DB version, please refer to [Deploying with a Server + Database](/docs/self-hosting/server-database). @@ -48,7 +52,9 @@ We default to using [MinIO](https://github.com/minio/minio) as the local S3 obje To facilitate a quick start, this section uses the `docker-compose/local` directory's `docker-compose.yml` configuration file. The started LobeChat application runs at `http://localhost:3210` and can be run locally. - For a quick start, this `docker-compose.yml` contains a large number of sensitive Secret/Password fields, suitable only for quick demonstrations or personal local use. Do not use it directly in a production environment! Otherwise, you will be responsible for any security issues encountered! + For a quick start, this `docker-compose.yml` contains a large number of sensitive Secret/Password + fields, suitable only for quick demonstrations or personal local use. Do not use it directly in a + production environment! Otherwise, you will be responsible for any security issues encountered! @@ -70,13 +76,15 @@ bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docke ### Start Docker ```sh -docker compose -p lobechat-starter up -d +docker compose up -d ``` +The default login account is the default account of Casdoor, with the username `admin` and password `123`. + ### Check Logs ```sh -docker logs -f lobe-database +docker logs -f lobe-chat ``` If you see the following logs in the container, it means the startup was successful: @@ -107,14 +115,14 @@ To access via the local network IP, you first need to run the local startup: ```sh bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f -docker compose -p lobechat-starter up -d +docker compose up -d ``` Next, you need to modify the downloaded `docker-compose.yml` file, performing a global replacement to change `localhost` to `your_server_ip`, and then restart: ```sh sed -i 's/localhost/your_server_ip/g' docker-compose.yml -docker compose -p lobechat-starter up -d +docker compose up -d ``` ### Configuring Casdoor @@ -123,9 +131,9 @@ docker compose -p lobechat-starter up -d 2. In `Identity -> Applications`, add a new line: - ``` - http://your_server_ip:3210/api/auth/callback/casdoor - ``` + ``` + http://your_server_ip:3210/api/auth/callback/casdoor + ``` 3. Most other configurations can remain default; you can modify the default configurations in `Identity -> Applications`. @@ -176,9 +184,9 @@ docker compose -p lobechat-starter up -d 4. In Casdoor's `Identity -> Providers`, associate the MinIO S3 service. Here is a sample configuration: - ![casdoor](https://github.com/user-attachments/assets/71035610-0706-434e-9488-ab5819b55330) + ![casdoor](https://github.com/user-attachments/assets/71035610-0706-434e-9488-ab5819b55330) - The Client ID and Client Secret should be the `Access Key` and `Secret Key` from the previous step, and `192.168.31.251` should be replaced with `your_server_ip`. + The Client ID and Client Secret should be the `Access Key` and `Secret Key` from the previous step, and `192.168.31.251` should be replaced with `your_server_ip`. 5. In Casdoor's `Identity -> Applications`, add the provider to the `app-built-in` application, select `minio`, save and exit. @@ -187,7 +195,10 @@ docker compose -p lobechat-starter up -d ## Publishing to Production (Domain Name Mode) - For deployments with a domain name, we recommend using [Logto](https://logto.io/) as the login authentication service. The remainder of this article will use it as an example. If you use other authentication services like Casdoor, the process should be similar, but note that different authentication services may have different port configurations. + For deployments with a domain name, we recommend using [Logto](https://logto.io/) as the login + authentication service. The remainder of this article will use it as an example. If you use other + authentication services like Casdoor, the process should be similar, but note that different + authentication services may have different port configurations. In the following text, we assume that in addition to the above services, you are also running a layer of Nginx for reverse proxy and SSL configuration. @@ -207,9 +218,10 @@ And the service ports that do not require reverse proxy: Please note that CORS cross-domain is configured internally in MinIO / Logto services. Do not configure CORS additionally in your reverse proxy, as this will cause errors. - For MinIO not on port 443, the Host must be `$http_host` (with port number), otherwise a 403 error will occur: `proxy_set_header Host $http_host`. +For MinIO not on port 443, the Host must be `$http_host` (with port number), otherwise a 403 error will occur: `proxy_set_header Host $http_host`. If you need to configure an SSL certificate, please configure it uniformly in the outer Nginx reverse proxy and not in MinIO. + ### Configuration Files @@ -230,11 +242,14 @@ Refer to the appendix for example configurations. You can check the logs with the following command: ```sh -docker logs -f lobe-database +docker logs -f lobe-chat ``` - In our official Docker image, database schema migration is automatically executed before starting the image. Our official image promises stability in the automatic creation of tables from "empty database -> complete tables." Therefore, we recommend that your database instance use an empty table instance to avoid the hassle of manual table structure maintenance or migration. + In our official Docker image, database schema migration is automatically executed before starting + the image. Our official image promises stability in the automatic creation of tables from "empty + database -> complete tables." Therefore, we recommend that your database instance use an empty + table instance to avoid the hassle of manual table structure maintenance or migration. If you encounter issues when creating tables, you can try the following command to force remove the database container and restart: @@ -253,6 +268,7 @@ This article uses Logto as an example to explain the configuration process. If y Please remember to configure the CORS cross-domain settings for the corresponding login authentication service provider to ensure LobeChat can access the authentication service properly. In this article, you need to allow cross-domain requests from `https://lobe.example.com`. + You first need to visit the WebUI for configuration: @@ -296,7 +312,8 @@ You first need to visit the WebUI for configuration: ``` - Please note that the administrator account is not the same as a registered user. Do not log in to LobeChat with your administrator account, as this will only result in an error. + Please note that the administrator account is not the same as a registered user. Do not log in to + LobeChat with your administrator account, as this will only result in an error. ### S3 Object Storage Service Configuration @@ -309,6 +326,7 @@ This article uses MinIO as an example to explain the configuration process. If y In this article, you need to allow cross-domain requests from `https://lobe.example.com`. This can be configured in MinIO WebUI under `Configuration - API - Cors Allow Origin`, or in the Docker Compose under `minio - environment - MINIO_API_CORS_ALLOW_ORIGIN`. If you use the second method (which is also the default method) for configuration, you will not be able to configure it in MinIO WebUI anymore. + You first need to visit the WebUI for configuration: @@ -419,8 +437,8 @@ S3_ENABLE_PATH_STYLE=1 ### `docker-compose.yml` - ```yaml +name: lobe-chat-database services: postgresql: image: pgvector/pgvector:pg16 @@ -456,6 +474,7 @@ services: command: > server /etc/minio/data --address ":9000" --console-address ":9001" + logto: image: svhd/logto container_name: lobe-logto @@ -474,7 +493,7 @@ services: lobe: image: lobehub/lobe-chat-database - container_name: lobe-database + container_name: lobe-chat ports: - '3210:3210' depends_on: @@ -490,7 +509,6 @@ volumes: driver: local s3_data: driver: local - ``` ### `minio-bucket-config.json` diff --git a/docs/self-hosting/server-database/docker-compose.zh-CN.mdx b/docs/self-hosting/server-database/docker-compose.zh-CN.mdx index 8273d9c8774c..94661c0c3bf0 100644 --- a/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +++ b/docs/self-hosting/server-database/docker-compose.zh-CN.mdx @@ -74,13 +74,15 @@ bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docke ### 启动 Docker ```sh -docker compose -p lobechat-starter up -d +docker compose up -d ``` +默认登录账号即 Casdoor 的默认账号,账号名 `admin`,密码 `123` + ### 检查日志 ```sh -docker logs -f lobe-database +docker logs -f lobe-chat ``` 如果你在容器中看到了以下日志,则说明已经启动成功: @@ -111,14 +113,14 @@ docker logs -f lobe-database ```sh bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f -l zh_CN -docker compose -p lobechat-starter up -d +docker compose up -d ``` 接着,你需要修改下载下来的 `docker-compose.yml` 文件,执行一次全文替换,将 `localhost` 替换为 `your_server_ip`,随后重新启动: ```sh sed -i 's/localhost/your_server_ip/g' docker-compose.yml -docker compose -p lobechat-starter up -d +docker compose up -d ``` ### 配置 Casdoor @@ -127,9 +129,9 @@ docker compose -p lobechat-starter up -d 2. 在 `身份认证 -> 应用` 中添加一行 - ``` - http://your_server_ip:3210/api/auth/callback/casdoor - ``` + ``` + http://your_server_ip:3210/api/auth/callback/casdoor + ``` 3. 其他配置大多保持默认即可,你也可以在 `身份认证 -> 应用` 中修改默认配置 @@ -180,9 +182,9 @@ docker compose -p lobechat-starter up -d 4. 在 Casdoor 的 `身份认证 -> 提供商` 中关联 MinIO S3 服务,以下是一个示例配置: - ![casdoor](https://github.com/user-attachments/assets/71035610-0706-434e-9488-ab5819b55330) + ![casdoor](https://github.com/user-attachments/assets/71035610-0706-434e-9488-ab5819b55330) - 其中,客户端 ID、客户端密钥为上一步创建的访问密钥中的 `Access Key` 和 `Secret Key`,`192.168.31.251` 应当被替换为 `your_server_ip`。 + 其中,客户端 ID、客户端密钥为上一步创建的访问密钥中的 `Access Key` 和 `Secret Key`,`192.168.31.251` 应当被替换为 `your_server_ip`。 5. 在 Casdoor 的 `身份认证 -> 应用` 中,对 `app-built-in` 应用添加提供商,选择 `minio`,保存并退出 @@ -191,8 +193,9 @@ docker compose -p lobechat-starter up -d ## 发布到生产(域名模式) - 对于拥有域名的部署,我们推荐使用 [Logto](https://logto.io/) 作为登录鉴权服务。本文剩余部分也将以其为例进行说明。如果你使用其他诸如 Casdoor 等其他登录鉴权服务,流程应当相近,但请注意不同的登录鉴权服务的端口配置可能有所差异。 - + 对于拥有域名的部署,我们推荐使用 [Logto](https://logto.io/) + 作为登录鉴权服务。本文剩余部分也将以其为例进行说明。如果你使用其他诸如 Casdoor + 等其他登录鉴权服务,流程应当相近,但请注意不同的登录鉴权服务的端口配置可能有所差异。 在下文中,我们假设在上述服务之外,你还运行了一层 Nginx 来进行反向代理、配置 SSL。 @@ -212,7 +215,7 @@ docker compose -p lobechat-starter up -d 请务必注意,CORS 跨域是在 MinIO / Logto 服务端内部配置的,请勿在你的反向代理中额外配置 CORS,这会导致错误。 - 对于 minio 非 443 端口时,Host 必须是 `$http_host`(带端口号),否则会 403 错误:`proxy_set_header Host $http_host`。 +对于 minio 非 443 端口时,Host 必须是 `$http_host`(带端口号),否则会 403 错误:`proxy_set_header Host $http_host`。 如果你需要配置 SSL 证书,请统一在外层的 Nginx 反向代理中配置,而不是在 MinIO 中配置。 @@ -236,7 +239,7 @@ curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compo 你可以使用下述指令检查日志: ```sh -docker logs -f lobe-database +docker logs -f lobe-chat ``` @@ -425,12 +428,12 @@ S3_ENABLE_PATH_STYLE=1 # OPENAI_API_KEY=sk-xxxx # OPENAI_PROXY_URL=https://api.openai.com/v1 # OPENAI_MODEL_LIST=... - ``` ### `docker-compose.yml` ```yaml +name: lobe-chat-database services: postgresql: image: pgvector/pgvector:pg16 @@ -466,6 +469,7 @@ services: command: > server /etc/minio/data --address ":9000" --console-address ":9001" + logto: image: svhd/logto container_name: lobe-logto @@ -484,7 +488,7 @@ services: lobe: image: lobehub/lobe-chat-database - container_name: lobe-database + container_name: lobe-chat ports: - '3210:3210' depends_on: @@ -500,7 +504,6 @@ volumes: driver: local s3_data: driver: local - ``` ### `minio-bucket-config.json`