使用Docker安装Dify
1、Dify vs Coze
# dify:
https://dify.ai/# coze:
https://www.coze.cn/
2、安装要求
CPU >= 2 Core
RAM >= 4 GiB
3、安装Docker
# 安装Docker
https://docs.docker.com/get-docker/# 安装Docker Compose
https://docs.docker.com/compose/install/# CentOS安装Docker
https://mp.weixin.qq.com/s/nHNPbCmdQs3E5x1QBP-ueA
4、安装Dify
详见:https://docs.dify.ai/zh-hans/getting-started/install-self-hosted/docker-compose
创建目录:
mkdir dify
cd dify
下载:
wget https://github.com/langgenius/dify/archive/refs/tags/1.3.1.tar.gz
解压:
tar -xf 1.3.1.tar.gz
切换目录:
cd dify-1.3.1/docker
复制文件:
# 详见:https://github.com/langgenius/dify/blob/main/docker/.env.example
cp .env.example .env
修改.env文件:
# 修改.env文件部分内容
# 详见:https://github.com/langgenius/dify/blob/main/docker/.env.example# 修改前:
EXPOSE_NGINX_PORT=80
EXPOSE_NGINX_SSL_PORT=443# 修改后:
EXPOSE_NGINX_PORT=8080
EXPOSE_NGINX_SSL_PORT=8443
查看docker-compose.yaml文件:
详见:https://github.com/langgenius/dify/blob/main/docker/docker-compose.yaml
创建并启动容器:
docker-compose up -d
查看运行的容器列表:
docker ps
停止并销毁容器:
docker-compose down
5、浏览器访问
假设当前ip为192.168.186.128
浏览器访问:http://192.168.186.128:8080
设置管理员账户:
登录:
登录成功后:
6、详见
https://dify.ai/
https://github.com/langgenius/dify
https://docs.dify.ai/zh-hans/introduction
https://mp.weixin.qq.com/s/TtNzJ7Me_mxKDP-xNHIPHg