- 简介
开源地址
https://github.com/vastxie/99AI
99AI 稳定版:可商业化的 AI Web 应用(免授权,无后门,支持快速部署),以 ALL-IN-CHAT 为目标。已支持 AI 对话、绘图、音乐、视频功能,以及联网、思维导图等插件。 - 环境查看
系统环境
# cat /etc/redhat-release
Rocky Linux release 9.3 (Blue Onyx)
]# uname -a
Linux RockyTemplete 5.14.0-362.18.1.el9_3.0.1.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Feb 11 13:49:23 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
软件环境
# docker version
Client: Docker Engine - Community
Version: 25.0.3
API version: 1.44
Go version: go1.21.6
Git commit: 4debf41
Built: Tue Feb 6 21:14:42 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 25.0.3
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: f417435
Built: Tue Feb 6 21:13:06 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
# docker-compose version
Docker Compose version v2.23.3
- 部署
下载代码
# git clone https://github.com/vastxie/99AI.git
进入代码目录修改配置
# cat docker-compose.yml
version: '3.9'
services:
mysql:
image: mysql:8
#command: --mysql-native-password=ON --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
command: --default-authentication-plugin=caching_sha2_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
restart: always
volumes:
- ./data/mysql/:/var/lib/mysql/
- ./sql/:/docker-entrypoint-initdb.d/ #数据库文件放此目录可自动导入
# ports:
# - "3306:3306"
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: "123456"
MYSQL_DATABASE: "chatgpt"
MYSQL_USER: "chatgpt"
MYSQL_PASSWORD: "123456"
redis:
image: redis
# command: --requirepass "12345678" # redis库密码,不需要密码注释本行
restart: always
# ports:
# - "6379:6379"
environment:
TZ: Asia/Shanghai # 指定时区
volumes:
- ./data/redis/:/data/
99ai:
build: ./
container_name: 99ai
restart: always
ports:
- "9520:9520"
volumes:
- ./.env.docker:/app/.env
environment:
- TZ=Asia/Shanghai
depends_on:
- mysql
- redis
修改地方如下
如果不修改启动后MySQL报错
如果没有修改启动报错之后可以删除当前文件夹下的data目标然后修改后重新部署
需要删除的是整个data目录而不能只删除目录下的mysql和redis目录
启动
# docker-compose up -d
查看日志docker日志
# docker logs -f 04ad10186fdc
[Nest] 1 - 09/14/2024, 8:58:49 AM LOG [RouterExplorer] Mapped {/api/models/delModelType, POST} route
[Nest] 1 - 09/14/2024, 8:58:50 AM LOG [DatabaseService] 初始化创建super用户成功、用户名为[super]、初始密码为[super] ==============> 请注意查阅
[Nest] 1 - 09/14/2024, 8:58:50 AM LOG [DatabaseService] 初始化创建admin用户成功、用户名为[admin]、初始密码为[123456] ==============> 请注意查阅
[Nest] 1 - 09/14/2024, 8:58:50 AM LOG [DatabaseService] 初始化网站配置信息成功、如您需要修改网站配置信息,请前往管理系统系统配置设置 ==============> 请注意查阅
[Nest] 1 - 09/14/2024, 8:58:50 AM LOG [DatabaseService] 系统预留应用提示词优化PromptOptimization创建成功
[Nest] 1 - 09/14/2024, 8:58:50 AM LOG [DatabaseService] 系统预留应用思维导图MindMap创建成功
登录后台
# http://ip:9520/admin
默认admin用户没有激活第一次登陆只能使用super登录密码为123456
激活admin
修改为正常