最新版dify 最简离线部署

先看成果,我们是 zw 内网
在这里插入图片描述
看了很多网上所谓的教程,要么不行,要么啰嗦
下面是我的最简单实践

阶段一:【准备机 - 在线操作】下载所有离线依赖

在“准备机”(可以上网的机器)上,准备好所有安装包。

1. 下载 Docker Compose (用于 .43)

  • 下载 Docker Compose V2 的独立可执行文件:

    Bash

    mkdir ~/dify_offline_deployment
    cd ~/dify_offline_deployment
    curl -L "https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64" -o docker-compose
    chmod +x docker-compose
    

2. 下载 Dify 的 7 个 Docker 镜像 (用于 .43)

  • (仍在 ~/dify_offline_deployment 目录)

    Bash

    mkdir images_for_43
    cd images_for_43
    
    # Dify 核心 (共 4 个)
    docker pull langgenius/dify-api:latest
    docker pull langgenius/dify-web:latest
    docker pull langgenius/dify-sandbox:latest
    docker pull langgenius/dify-plugin-daemon:main-local-linux-amd64
    
    # 基础组件 (共 3 个)
    docker pull nginx:latest
    docker pull postgres:15-alpine
    docker pull redis:6-alpine
    
    # --- 打包 ---
    docker save -o dify-api.tar langgenius/dify-api:latest
    docker save -o dify-web.tar langgenius/dify-web:latest
    docker save -o dify-sandbox.tar langgenius/dify-sandbox:latest
    docker save -o dify-plugin-daemon.tar langgenius/dify-plugin-daemon:main-local-linux-amd64
    docker save -o nginx.tar nginx:latest
    docker save -o postgres15.tar postgres:15-alpine
    docker save -o redis6.tar redis:6-alpine
    

3. 传输

  • ~/dify_offline_deployment 目录(包含 docker-compose 文件和 images_for_43 文件夹)传输到 .43 服务器。

阶段二:【.43 - 内网应用服务器】部署 Dify

A. 安装 Docker Compose
  1. 将传输过来的 docker-compose 文件移动到系统路径:

    Bash

    sudo mv /path/to/docker-compose /usr/local/bin/docker-compose
    sudo chmod +x /usr/lo
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值