Dify 国内阿里云云服务器加速部署指南
省流版
# 1. 下载 Docker 安装脚本
wget https://gh-proxy.com/raw.githubusercontent.com/docker/docker-install/master/install.sh
# 2. 使用阿里云镜像安装 Docker
sh install.sh --mirror Aliyun
# 3. 配置 Docker 镜像加速
vim /etc/docker/daemon.json
{
"registry-mirrors": [
"https://docker.gh-proxy.com"
]
}
# 4. 重启 Docker 服务
systemctl daemon-reload && systemctl restart docker
# 5. 拉取 Dify 源码
git clone https://gitee.com/dify_ai/dify.git
# 6. 修改 .env 文件
cd dify/docker
cp .env.example .env
vim .env
# 在 .env 文件中修改以下配置
EXPOSE_NGINX_PORT=8000 # Dify Web 服务暴露的端口
PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple # PyPI 镜像加速
# 7. 启动 Dify 服务
docker compose up -d
本文来自博客园,作者:wisilian21,转载请注明原文链接:https://www.cnblogs.com/wisilian21/p/19766538
浙公网安备 33010602011771号