dify升级(1.15.0->1.16.0)

升级路线:dify-1.15.0->dify-1.16.0

 

1.下载1.15的压缩包
[root@localhost opt]#cd /opt
[root@localhost opt]#wget https://github.com/langgenius/dify/archive/refs/tags/1.16.0.zip

2.解压
[root@localhost opt]#cd /opt
[root@localhost opt]#unzip dify-1.16.0.zip

 

3.查看新版本的使用的镜像是否有改变

[root@localhost docker]#cd /opt/dify-1.16.0/docker
[root@localhost docker]# cat docker-compose.yaml |grep image
    image: busybox:latest
    image: langgenius/dify-api:1.16.0
    image: langgenius/dify-api:1.16.0
    image: langgenius/dify-api:1.16.0
    image: langgenius/dify-api:1.16.0
    image: langgenius/dify-web:1.16.0
    image: postgres:15-alpine
    image: mysql:8.0
    image: redis:6-alpine
    image: langgenius/dify-sandbox:0.2.15
    image: langgenius/dify-agent-local-sandbox:1.16.0
    image: langgenius/dify-plugin-daemon:0.6.3-local
    image: langgenius/dify-agent-backend:1.16.0
    image: ubuntu/squid:latest
    image: certbot/certbot
    image: nginx:latest
    image: semitechnologies/weaviate:1.27.0
    image: oceanbase/oceanbase-ce:4.3.5-lts
    image: oceanbase/seekdb:latest
    image: langgenius/qdrant:v1.8.3
    image: pgvector/pgvector:pg16
  # get image from https://www.vastdata.com.cn/
    image: vastdata/vastbase-vector
    image: tensorchord/pgvecto-rs:pg16-v0.3.0
    image: ghcr.io/chroma-core/chroma:0.5.20
    image: containers.intersystems.com/intersystems/iris-community:2025.3
    image: container-registry.oracle.com/database/free:latest
    image: quay.io/coreos/etcd:v3.5.5
    image: minio/minio:RELEASE.2023-03-20T20-16-18Z
    image: milvusdb/milvus:v2.6.3
    image: opensearchproject/opensearch:latest
    image: opensearchproject/opensearch-dashboards:latest
    image: opengauss/opengauss:7.0.0-RC1
    image: myscale/myscaledb:1.6.4
    image: matrixorigin/matrixone:2.1.1
    image: docker.elastic.co/elasticsearch/elasticsearch:8.14.3
    image: docker.elastic.co/kibana/kibana:8.14.3
    image: downloads.unstructured.io/unstructured-io/unstructured-api:latest

 

只需要查看如下几个镜像即可:
docker pull busybox:latest                             ##与1.15.0 一致
docker pull langgenius/dify-api:1.16.0                 ##有更新
docker pull langgenius/dify-web:1.16.0                 ##有更新
docker pull postgres:15-alpine                         ##与1.15.0 一致 使用postgres:15.17-alpine
docker pull redis:6-alpine                             ##与1.15.0 一致 使用redis:6.2.22-alpine
docker pull langgenius/dify-sandbox:0.2.15             ##与1.15.0 一致
docker pull langgenius/dify-plugin-daemon:0.6.3-local  ##与1.15.0 一致
docker pull ubuntu/squid:latest                        ##与1.15.0 一致
docker pull nginx:latest                               ##与1.15.0 一致
docker pull semitechnologies/weaviate:1.27.0           ##与1.15.0 一致

docker pull langgenius/dify-agent-local-sandbox:1.16.0             ##新增
docker pull langgenius/dify-agent-backend:1.16.0                   ##新增

 

 

下载有需要更新的介质
docker pull langgenius/dify-api:1.16.0
docker pull langgenius/dify-web:1.16.0
docker pull langgenius/dify-agent-local-sandbox:1.16.0 
docker pull langgenius/dify-agent-backend:1.16.0

4.准备环境变量文件
[root@localhost dify-1.15.0]# cd /opt/dify-1.15.0/docker/
[root@localhost docker]# cp .env.example .env

这里可以与1.15.0比较下环境变量

 

5.修改docker-compose.yaml文件
若镜像有变化需要进行修改,比如下面2个组件我这里之前使用的是如下版本
postgres:15.17-alpine
redis:6.2.22-alpine

6.停掉旧版的dify
[root@localhost docker]#cd /opt/dify-1.15.0/docker
[root@localhost docker]#docker compose stop

7.删除新版本的数据卷目录
cd /opt/dify-1.16.0/docker
rm -rf volumes

8.拷贝旧版本的数据卷到新版本相应目录
cd /opt/dify-1.15.0/docker
cp -a volumes /opt/dify-1.16.0/docker/

 

9.启动新版本
cd /opt/dify-1.16.0/docker
docker compose up -d
发现要等一会,api和api_websocket才会显示healthy

[root@localhost docker]# docker compose ps
NAME                     IMAGE                                        COMMAND                  SERVICE         CREATED         STATUS                   PORTS
docker-agent_backend-1   langgenius/dify-agent-backend:1.16.0         "uvicorn dify_agent.…"   agent_backend   6 minutes ago   Up 6 minutes             5050/tcp
docker-api-1             langgenius/dify-api:1.16.0                   "/bin/bash /entrypoi…"   api             6 minutes ago   Up 5 minutes (healthy)   5001/tcp
docker-api_websocket-1   langgenius/dify-api:1.16.0                   "/bin/bash /entrypoi…"   api_websocket   6 minutes ago   Up 6 minutes             5001/tcp
docker-db_postgres-1     postgres:15.17-alpine                        "docker-entrypoint.s…"   db_postgres     6 minutes ago   Up 6 minutes (healthy)   5432/tcp
docker-local_sandbox-1   langgenius/dify-agent-local-sandbox:1.16.0   "shellctl serve --li…"   local_sandbox   6 minutes ago   Up 6 minutes (healthy)   5004/tcp
docker-nginx-1           nginx:latest                                 "sh -c 'cp /docker-e…"   nginx           6 minutes ago   Up 5 minutes             0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp
docker-plugin_daemon-1   langgenius/dify-plugin-daemon:0.6.3-local    "/usr/bin/tini -g --…"   plugin_daemon   6 minutes ago   Up 6 minutes             0.0.0.0:5003->5003/tcp
docker-redis-1           redis:6.2.22-alpine                          "docker-entrypoint.s…"   redis           6 minutes ago   Up 6 minutes (healthy)   6379/tcp
docker-sandbox-1         langgenius/dify-sandbox:0.2.15               "/entrypoint.sh"         sandbox         6 minutes ago   Up 6 minutes (healthy)   
docker-ssrf_proxy-1      ubuntu/squid:latest                          "sh -c 'cp /docker-e…"   ssrf_proxy      6 minutes ago   Up 6 minutes             3128/tcp
docker-weaviate-1        semitechnologies/weaviate:1.27.0             "/bin/weaviate --hos…"   weaviate        6 minutes ago   Up 6 minutes             
docker-web-1             langgenius/dify-web:1.16.0                   "/bin/sh ./entrypoin…"   web             6 minutes ago   Up 6 minutes             3000/tcp
docker-worker-1          langgenius/dify-api:1.16.0                   "/bin/bash /entrypoi…"   worker          6 minutes ago   Up 5 minutes             5001/tcp
docker-worker_beat-1     langgenius/dify-api:1.16.0                   "/bin/bash /entrypoi…"   worker_beat     6 minutes ago   Up 6 minutes             5001/tcp

 

10.验证
http://192.168.1.136

图片

 

 

11.查看相关日志
docker compose logs -f api_websocket
docker compose logs -f api

docker compose logs -f db_postgres
docker compose logs -f redis

 

posted @ 2026-07-27 11:35  slnngk  阅读(36)  评论(0)    收藏  举报