使用docker本地部署dify

linux部署

前置条件 docker, docker-compose

docker 换国内源

dart 复制代码
换源:
/etc/docker/daemon.json

内容:
{
  "registry-mirrors": [
    "https://docker.1ms.run",
    "https://docker-0.unsee.tech",
    "https://docker.m.daocloud.io"
  ],
  "live-restore": true,
  "features": { "buildkit": true }
}

重启:

dart 复制代码
sudo systemctl daemon-reload
sudo systemctl restart docker
  1. 克隆Dify官方仓库
    git clone https://github.com/langgenius/dify.git
    进入 dify/docker (其实只把docker文件夹弄到服务器上就行,其他文件不需要)
  2. 修改配置文件
    将 .env.example 复制一份命名.env
  3. 启动
dart 复制代码
docker-compose  up -d

如果你发现某个容器反复重启,就是用docker logs 容器id 看一下具体原因,然后将日志丢给豆包之类的大模型,然后一步步解决问题;

最后登录 在浏览器中输入 http://服务器ip

首次登录是要设置账号密码的

然后登录成功后就是

相关推荐
倔强的石头10615 分钟前
【Linux 指南】文件系统系列(一):磁盘底层原理 —— 从物理结构到 CHS与LBA 寻址全解析
linux·运维·服务器
菜鸟分享录2 小时前
OpenClaw Docker一键部署(轻松实现多容器隔离)
docker·ai·openclaw·小龙虾
陶然同学2 小时前
【Linux及Shell】VMware&Ubuntu&Xshell安装
linux·运维·xshell8·xftp8
小乐笙2 小时前
笔记:纯真 IP 库使用
运维·网络·tcp/ip
咖喱o2 小时前
DHCP
linux·运维·服务器·网络
IMPYLH2 小时前
Linux 的 touch 命令
linux·运维·服务器·bash
uestcwhc2 小时前
服务器定时发送邮件设置
运维·服务器
codeejun2 小时前
每日一Go-59、云原生入门为什么一定要学Docker?
docker·云原生·golang
雷工笔记2 小时前
MES 系统设备管理模块详细设计方案
大数据·运维·网络
wangchunting3 小时前
VMware17 使用Rocky Linux 9.7系统
linux·运维·服务器