添加 c12_docker运行dify

This commit is contained in:
chicrobot committed 2025-11-28 13:35:00 +08:00
1 parent 66f578ebcc
commit a8867ab847
1 file changed
+48
+48
View File
@@ -0,0 +1,48 @@
## 拉取镜像
工作流
dify-api
```
docker pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/langgenius/dify-api:0.15.3
docker tag swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/langgenius/dify-api:0.15.3 docker.io/langgenius/dify-api:0.15.3
docker rmi swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/langgenius/dify-api:0.15.3
```
dify-web
```
docker pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/langgenius/dify-web:0.15.3
docker tag swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/langgenius/dify-web:0.15.3 docker.io/langgenius/dify-web:0.15.3
docker rmi swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/langgenius/dify-web:0.15.3
```
## 确保redis和Postgresql存在
## 创建目录
```
mkdir -p ./data/dify/storage
```
## 启动容器
```
docker run -d \
--name dify-api \
-p 5001:5001 \
-v ./data/dify/storage:/app/api/storage \
-e OPENDAL_SCHEME=fs \
-e OPENDAL_FS_ROOT=/app/api/storage \
-e DATABASE_URL=postgresql://<DB_USER>:<DB_PASS>@<DB_HOST>:5432/<DB_NAME> \
-e REDIS_HOST=<REDIS_HOST> \
-e REDIS_PORT=6379 \
-e REDIS_PASSWORD=<REDIS_PASS> \
-e CELERY_BROKER_URL=redis://[:<REDIS_PASS>]@<REDIS_HOST>:6379/0 \
-e WEAVIATE_ENDPOINT="" \
-e WEAVIATE_API_KEY="" \
langgenius/dify-api:0.15.3
```
```
docker run -d \
--name dify-web \
-p 5002:3000 \
-e CONSOLE_API_URL=http://<YOUR_HOST_IP>:5001 \
-e PUBLIC_API_URL=http://<YOUR_HOST_IP>:5001 \
langgenius/dify-web:0.15.3
```