mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-18 06:03:42 +08:00
Compare commits
9 Commits
main
...
a66c0c2559
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a66c0c2559 | ||
|
|
34dda83c04 | ||
|
|
bdb8571bdb | ||
|
|
1e330950d6 | ||
|
|
b356750bd5 | ||
|
|
1b877cbab0 | ||
|
|
fa5774c7cb | ||
|
|
b07f701261 | ||
|
|
79f4dedbf7 |
@@ -72,7 +72,7 @@ _✨ 通过标准的 OpenAI API 格式访问所有的大模型,开箱即用
|
||||
+ [x] [Anthropic Claude 系列模型](https://anthropic.com) (支持 AWS Claude)
|
||||
+ [x] [Google PaLM2/Gemini 系列模型](https://developers.generativeai.google)
|
||||
+ [x] [Mistral 系列模型](https://mistral.ai/)
|
||||
+ [x] [字节跳动豆包大模型(火山引擎)](https://www.volcengine.com/experience/ark?utm_term=202502dsinvite&ac=DSASUQY5&rc=2QXCA1VI)
|
||||
+ [x] [字节跳动豆包大模型](https://console.volcengine.com/ark/region:ark+cn-beijing/model)
|
||||
+ [x] [百度文心一言系列模型](https://cloud.baidu.com/doc/WENXINWORKSHOP/index.html)
|
||||
+ [x] [阿里通义千问系列模型](https://help.aliyun.com/document_detail/2400395.html)
|
||||
+ [x] [讯飞星火认知大模型](https://www.xfyun.cn/doc/spark/Web.html)
|
||||
|
||||
50
docker-compose-pg.yml
Normal file
50
docker-compose-pg.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
one-api:
|
||||
image: justsong/one-api:latest
|
||||
container_name: one-api
|
||||
restart: always
|
||||
command: --log-dir /app/logs
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./data/oneapi:/data
|
||||
- ./logs:/app/logs
|
||||
environment:
|
||||
# - SQL_DSN=oneapi:123456@tcp(db:3306)/one-api # 修改此行,或注释掉以使用 SQLite 作为数据库
|
||||
- SQL_DSN=postgres://oneapi:123456@db:5432/one-api
|
||||
- REDIS_CONN_STRING=redis://redis
|
||||
- SESSION_SECRET=random_string # 修改为随机字符串
|
||||
- TZ=Asia/Shanghai
|
||||
# - NODE_TYPE=slave # 多机部署时从节点取消注释该行
|
||||
# - SYNC_FREQUENCY=60 # 需要定期从数据库加载数据时取消注释该行
|
||||
# - FRONTEND_BASE_URL=https://openai.justsong.cn # 多机部署时从节点取消注释该行
|
||||
- THEME=berry # 使用berry主题,注销该行使用默认主题
|
||||
depends_on:
|
||||
- redis
|
||||
- db
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "wget -q -O - http://localhost:3000/api/status | grep -o '\"success\":\\s*true' | awk -F: '{print $2}'" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
container_name: redis
|
||||
restart: always
|
||||
|
||||
db:
|
||||
image: postgres:16.1-alpine3.19 # 数据库版本
|
||||
restart: always
|
||||
container_name: postgres # 容器名
|
||||
volumes:
|
||||
- ./data/postgres:/var/lib/postgresql/data #挂载目录,持久化存储
|
||||
ports:
|
||||
- '5432:5432'
|
||||
environment:
|
||||
POSTGRES_USER: 'oneapi'
|
||||
POSTGRES_PASSWORD: '123456' # 设置用户密码
|
||||
POSTGRES_DB: 'one-api'
|
||||
PGDATA: '/var/lib/postgresql/data/pgdata' # 设置数据目录
|
||||
@@ -19,6 +19,7 @@ services:
|
||||
# - NODE_TYPE=slave # 多机部署时从节点取消注释该行
|
||||
# - SYNC_FREQUENCY=60 # 需要定期从数据库加载数据时取消注释该行
|
||||
# - FRONTEND_BASE_URL=https://openai.justsong.cn # 多机部署时从节点取消注释该行
|
||||
- THEME=berry # 使用berry主题,注销该行使用默认主题
|
||||
depends_on:
|
||||
- redis
|
||||
- db
|
||||
|
||||
Reference in New Issue
Block a user