update cn docker setup guide

This commit is contained in:
yiling
2026-07-01 14:36:09 +08:00
parent d8793a89a2
commit 8c7d4f5b72
2 changed files with 48 additions and 3 deletions
+3 -3
View File
@@ -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
```
@@ -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: