opencloudos/opencloudos9-cuda-devel:12.80.6.1-local该镜像合并了以下 Dify 组件:
api
worker
beat
web
plugin_daemon
不包含以下外部依赖:
PostgreSQL
Redis
Nginx
向量数据库
sandbox
ssrf_proxy
docker build -t oc9-dify:1.14.2 .
也可以显式指定版本:
docker build \
--build-arg DIFY_VERSION=1.14.2 \
--build-arg PLUGIN_DAEMON_VERSION=0.6.1-local \
-t oc9-dify:1.14.2 .
查看 Python 版本:
docker run --rm oc9-dify:1.14.2 \
python --version
查看 Dify 后端虚拟环境 Python:
docker run --rm --entrypoint bash oc9-dify:1.14.2 \
-c "/app/api/.venv/bin/python --version"
查看 Node.js 版本:
docker run --rm --entrypoint bash oc9-dify:1.14.2 \
-c "node --version"
查看角色启动入口:
docker run --rm oc9-dify:1.14.2
默认启动:
ROLE=api
该镜像通过 ROLE 环境变量区分启动角色。
docker run -d \
--name dify-api \
-e ROLE=api \
-e DB_HOST=<postgres-host> \
-e DB_PORT=5432 \
-e DB_USERNAME=dify \
-e DB_PASSWORD=<password> \
-e DB_DATABASE=dify \
-e REDIS_HOST=<redis-host> \
-e REDIS_PORT=6379 \
-e REDIS_PASSWORD=<redis-password> \
-p 5001:5001 \
oc9-dify:1.14.2
docker run -d \
--name dify-worker \
-e ROLE=worker \
-e DB_HOST=<postgres-host> \
-e DB_PORT=5432 \
-e DB_USERNAME=dify \
-e DB_PASSWORD=<password> \
-e DB_DATABASE=dify \
-e REDIS_HOST=<redis-host> \
-e REDIS_PORT=6379 \
-e REDIS_PASSWORD=<redis-password> \
oc9-dify:1.14.2
docker run -d \
--name dify-beat \
-e ROLE=beat \
-e DB_HOST=<postgres-host> \
-e DB_PORT=5432 \
-e DB_USERNAME=dify \
-e DB_PASSWORD=<password> \
-e DB_DATABASE=dify \
-e REDIS_HOST=<redis-host> \
-e REDIS_PORT=6379 \
-e REDIS_PASSWORD=<redis-password> \
oc9-dify:1.14.2
docker run -d \
--name dify-web \
-e ROLE=web \
-e CONSOLE_API_URL=http://<api-host>:5001 \
-e APP_API_URL=http://<api-host>:5001 \
-p 3000:3000 \
oc9-dify:1.14.2
docker run -d \
--name dify-plugin-daemon \
-e ROLE=plugin_daemon \
-e DB_HOST=<postgres-host> \
-e DB_PORT=5432 \
-e DB_USERNAME=dify \
-e DB_PASSWORD=<password> \
-e DB_DATABASE=dify_plugin \
-e DB_SSL_MODE=disable \
-e REDIS_HOST=<redis-host> \
-e REDIS_PORT=6379 \
-e REDIS_PASSWORD=<redis-password> \
-e SERVER_PORT=5002 \
-e SERVER_KEY=<plugin-server-key> \
-e DIFY_INNER_API_URL=http://<api-host>:5001 \
-e DIFY_INNER_API_KEY=<inner-api-key> \
-e PLUGIN_WORKING_PATH=/app/storage/cwd \
-e PLUGIN_STORAGE_LOCAL_ROOT=/app/storage \
-v ./volumes/plugin_daemon:/app/storage \
-p 5002:5002 \
-p 5003:5003 \
oc9-dify:1.14.2
services:
api:
image: oc9-dify:1.14.2
environment:
ROLE: api
DB_HOST: postgres
DB_PORT: 5432
DB_USERNAME: dify
DB_PASSWORD: dify
DB_DATABASE: dify
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: redis
PLUGIN_DAEMON_URL: http://plugin_daemon:5002
INNER_API_KEY_FOR_PLUGIN: change-this-key
ports:
- "5001:5001"
volumes:
- ./volumes/app/storage:/app/api/storage
worker:
image: oc9-dify:1.14.2
environment:
ROLE: worker
DB_HOST: postgres
DB_PORT: 5432
DB_USERNAME: dify
DB_PASSWORD: dify
DB_DATABASE: dify
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: redis
INNER_API_KEY_FOR_PLUGIN: change-this-key
volumes:
- ./volumes/app/storage:/app/api/storage
beat:
image: oc9-dify:1.14.2
environment:
ROLE: beat
DB_HOST: postgres
DB_PORT: 5432
DB_USERNAME: dify
DB_PASSWORD: dify
DB_DATABASE: dify
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: redis
web:
image: oc9-dify:1.14.2
environment:
ROLE: web
CONSOLE_API_URL: http://localhost:5001
APP_API_URL: http://localhost:5001
ports:
- "3000:3000"
plugin_daemon:
image: oc9-dify:1.14.2
environment:
ROLE: plugin_daemon
DB_HOST: postgres
DB_PORT: 5432
DB_USERNAME: dify
DB_PASSWORD: dify
DB_DATABASE: dify_plugin
DB_SSL_MODE: disable
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: redis
SERVER_PORT: 5002
SERVER_KEY: change-this-plugin-key
DIFY_INNER_API_URL: http://api:5001
DIFY_INNER_API_KEY: change-this-key
PLUGIN_WORKING_PATH: /app/storage/cwd
PLUGIN_STORAGE_LOCAL_ROOT: /app/storage
volumes:
- ./volumes/plugin_daemon:/app/storage
ports:
- "5002:5002"
- "5003:5003"
api、worker、beat、web、plugin_daemon 必须使用同一个 Dify 版本构建。plugin_daemon 版本必须与官方 compose 对齐,Dify 1.14.2 对应 0.6.1-local。/app/storage 必须持久化,否则插件安装状态可能丢失。CONSOLE_API_URL 和 APP_API_URL。| Dify 版本 | plugin-daemon 版本 |
|---|---|
| 1.11.3 | 0.5.2-local |
| 1.11.4 | 0.5.2-local |
| 1.12.0 | 0.5.3-local |
| 1.12.1 | 0.5.3-local |
| 1.13.0 | 0.5.3-local |
| 1.13.1 | 0.5.4-local |
| 1.13.2 | 0.5.4-local |
| 1.13.3 | 0.5.3-local |
| 1.14.1 | 0.6.0-local |
| 1.14.2 | 0.6.1-local |
| 版本 | 特征 | 是否推荐生产 |
|---|---|---|
| 1.11.3 | 插件体系稳定化开始 | 可 |
| 1.11.4 | 安全修复版 | 推荐 |
| 1.12.0 | Summary Index 大升级 | 谨慎 |
| 1.12.1 | 修复 1.12 问题 | 推荐 |
| 1.13.0 | Agent 架构升级 | 可 |
| 1.13.1 | Worker/plugin 修复 | 推荐 |
| 1.13.2 | 稳定性修复 | 推荐 |
| 1.13.3 | 1.13 最稳定版 | 强烈推荐 |
| 1.14.1 | 企业化增强 | 推荐 |
| 1.14.2 | 当前最稳定 | 最推荐 |
1.11 ——> 1.12 风险很大
知识库 schema
索引 schema
变化明显
Content type
Image
Digest
sha256:e82b39185…
Size
8.8 GB
Last updated
4 months ago
docker pull ocpub/oc9-dify:1.14.2