From 8c7d4f5b7296e5de8f601e668f38593a15809dd7 Mon Sep 17 00:00:00 2001 From: yiling Date: Wed, 1 Jul 2026 14:36:09 +0800 Subject: [PATCH] update cn docker setup guide --- README_CN.md | 6 +-- .../local/docker-compose-aliyun.yaml | 45 +++++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 docker-compose/local/docker-compose-aliyun.yaml diff --git a/README_CN.md b/README_CN.md index f1015a1f..81f1be5e 100644 --- a/README_CN.md +++ b/README_CN.md @@ -55,7 +55,7 @@ 2. 下载 `docker-compose.yaml` 配置文件: ```bash -curl -o docker-compose.yaml [https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose.yaml](https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose.yaml) +curl -o docker-compose.yaml [https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose-aliyun.yaml](https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose.yaml) ``` @@ -95,7 +95,7 @@ docker compose up -d ### 方案二:通过 NPM / 包管理器安装 -Shumai 已作为 `@shumai-one/shumai` 发布至 NPM 注册表。此方案支持您在全局或本地项目里运行 Shumai。 +通过 NPM 上的 `@shumai-one/shumai` 进行安装。 #### 第一步:启动带 pgvector 支持的 PostgreSQL @@ -107,7 +107,7 @@ docker run --name shumai_postgres \ -e POSTGRES_PASSWORD=shumai_password \ -e POSTGRES_DB=shumai_db \ -p 5432:5432 \ - -d pgvector/pgvector:pg18 + -d docker.m.daocloud.io/pgvector/pgvector:pg18 ``` diff --git a/docker-compose/local/docker-compose-aliyun.yaml b/docker-compose/local/docker-compose-aliyun.yaml new file mode 100644 index 00000000..d24fe129 --- /dev/null +++ b/docker-compose/local/docker-compose-aliyun.yaml @@ -0,0 +1,45 @@ +services: + postgres: + image: docker.m.daocloud.io/pgvector/pgvector:pg18 + container_name: shumai_postgres + environment: + POSTGRES_USER: shumai + POSTGRES_PASSWORD: shumai_password + POSTGRES_DB: shumai_db + ports: + - '5432:5432' + volumes: + - postgres_data:/var/lib/postgresql/18/docker + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U shumai -d shumai_db'] + interval: 5s + timeout: 5s + retries: 5 + + shumai: + image: crpi-gd059yeolk1as59f.cn-shanghai.personal.cr.aliyuncs.com/shumaione/shumai:latest + container_name: shumai_app + ports: + - '3000:3000' + volumes: + - ./data:/app/data + environment: + # Database Configuration + DATABASE_URL: postgres://shumai:shumai_password@shumai_postgres:5432/shumai_db?search_path=public&sslmode=disable + + # Server Configuration + SHUMAI_SERVER_PORT: 3000 + + # S3 Configuration + STORAGE_BACKEND: local + AWS_ENDPOINT_URL_S3: http://localhost:3000 + + # Better Auth + BETTER_AUTH_SECRET: qSxs9DxzHDZBbeeTNPEwBuspYwipBqz5Gk5XdBjNhWw= + + depends_on: + postgres: + condition: service_healthy + +volumes: + postgres_data: