Merge pull request #28 from tbphp/docs-add-docker-quick-start

docs: 更新docker快速启动方式
This commit is contained in:
tbphp
2025-07-18 11:38:19 +08:00
committed by GitHub
2 changed files with 30 additions and 6 deletions

View File

@@ -40,7 +40,19 @@ GPT-Load 作为透明代理服务,完整保留各 AI 服务商的原生 API
- MySQL, PostgreSQL, 或 SQLite (数据库存储)
- Redis (缓存和分布式协调,可选)
### 方式一:使用 Docker Compose推荐
## 方式一Docker 快速开始
```bash
docker run -d --name gpt-load \
-p 3001:3001 \
-e AUTH_KEY=sk-123456 \
-v "$(pwd)/data":/app/data \
ghcr.io/tbphp/gpt-load:latest
```
> 使用 `sk-123456` 登录管理界面:<http://localhost:3001>
### 方式二:使用 Docker Compose推荐
**安装命令:**
@@ -83,7 +95,7 @@ docker compose pull && docker compose down && docker compose up -d
> 使用默认的认证 Key `sk-123456` 登录管理端,认证 Key 可以在 .env 中修改 AUTH_KEY。
### 方式:源码构建
### 方式:源码构建
源码构建需要本地已安装数据库SQLite、MySQL 或 PostgreSQL和 Redis可选
@@ -110,7 +122,7 @@ make run
> 使用默认的认证 Key `sk-123456` 登录管理端,认证 Key 可以在 .env 中修改 AUTH_KEY。
### 方式:集群部署
### 方式:集群部署
集群部署需要所有节点都连接同一个 MySQL或者 PostgreSQL 和 Redis并且 Redis 是必须要求。建议使用统一的分布式 MySQL 和 Redis 集群。

View File

@@ -40,7 +40,19 @@ GPT-Load serves as a transparent proxy service, completely preserving the native
- MySQL, PostgreSQL, or SQLite (for database storage)
- Redis (for caching and distributed coordination, optional)
### Method 1: Using Docker Compose (Recommended)
### Method 1: Docker Quick Start
```bash
docker run -d --name gpt-load \
-p 3001:3001 \
-e AUTH_KEY=sk-123456 \
-v "$(pwd)/data":/app/data \
ghcr.io/tbphp/gpt-load:latest
```
> Login to the management interface with `sk-123456`: <http://localhost:3001>
### Method 2: Using Docker Compose (Recommended)
**Installation Commands:**
@@ -83,7 +95,7 @@ After deployment:
> Use the default authentication key `sk-123456` to login to the management interface. The authentication key can be modified via AUTH_KEY in the .env file.
### Method 2: Source Build
### Method 3: Source Build
Source build requires a locally installed database (SQLite, MySQL, or PostgreSQL) and Redis (optional).
@@ -110,7 +122,7 @@ After deployment:
> Use the default authentication key `sk-123456` to login to the management interface. The authentication key can be modified via AUTH_KEY in the .env file.
### Method 3: Cluster Deployment
### Method 4: Cluster Deployment
Cluster deployment requires all nodes to connect to the same MySQL (or PostgreSQL) and Redis, with Redis being mandatory. It's recommended to use unified distributed MySQL and Redis clusters.