🔖 https://docs.dify.ai/zh-hans/getting-started/install-self-hosted
Docker
按照官方文档说明配置即可
https://docs.dify.ai/zh-hans/getting-started/install-self-hosted/docker-compose
源码安装
参考官方步骤, 需要补充一些内容
https://docs.dify.ai/zh-hans/getting-started/install-self-hosted/local-source-code
在启动API 服务之前需要安装PostgreSQL数据库和Redis
Postgres安装配置(非Root)
- 下载二进制编译好的安装包, 下载地址在这里
- 解压并创建data目录
- 初始化db
- 配置数据库
- 启动数据库
- 设置superuser密码
- 重启数据库
Redis安装配置(非Root)
- 下载安装包,下载地址在这里
- 解压并创建data目录
- 编译
- 安装Redis
- 配置Redis,密码参照
.env文件 - 启动Redis服务
- 验证安装
Potry 配置源
在pyproject.toml 添加
[[tool.poetry.source]]
name = "mirrors"
url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
priority = "primary"
安装web前端服务-yarn
npm install -g yarn --registry=https://registry.npmmirror.com
yarn --registry https://registry.npmjs.org
yarn build
Inference
https://blog.csdn.net/jiacoo/article/details/106480869
https://blog.csdn.net/weixin_41975711/article/details/140146798