大家好,我是Ai學(xué)習(xí)的老章
極簡,0廢話,親測無bug。
?下載項(xiàng)目
# Git 的 SSH 協(xié)議通常更穩(wěn)定,尤其適合大倉庫
git clone git@github.com:langgenius/dify.git --branch 1.0.1
cd dify/docker
cp .env.example .env
# 編輯 `.env` 文件中的環(huán)境變量值
PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
啟動Dify
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker compose up -d
保存Docker文件
# 創(chuàng)建保存目錄
mkdir dify-offline-1.0.1 && cd dify-offline-1.0.1
# 核心服務(wù)
docker save langgenius/dify-api:1.0.1 > dify-api-1.0.1.tar
docker save langgenius/dify-web:1.0.1 > dify-web-1.0.1.tar
# 數(shù)據(jù)庫組件
docker save postgres:15-alpine > postgres-15-alpine.tar
docker save redis:6-alpine > redis-6-alpine.tar
# 網(wǎng)絡(luò)服務(wù)
docker save nginx:latest > nginx-latest.tar
docker save ubuntu/squid:latest > squid-latest.tar
# AI相關(guān)組件
docker save semitechnologies/weaviate:1.19.0 > weaviate-1.19.0.tar
docker save langgenius/dify-sandbox:0.2.10 > dify-sandbox-0.2.10.tar
# 插件服務(wù)
docker save langgenius/dify-plugin-daemon:0.0.4-local > plugin-daemon-0.0.4-local.tar
??將項(xiàng)目文件和鏡像文件復(fù)制到生產(chǎn)服務(wù)器
服務(wù)器中加載 Docker 鏡像:
cd docker_images
docker load -i dify-web.tar
docker load -i dify-api.tar
docker load -i postgres.tar
docker load -i nginx.tar
docker load -i dify-sandbox.tar
docker load -i redis.tar
docker load -i squid.tar
docker load -i weaviate.tar
啟動服務(wù):
PORT=3000 docker compose -f docker-compose.yaml up -d
制作不易,如果這篇文章覺得對你有用,可否點(diǎn)個(gè)關(guān)注。給我個(gè)三連擊:點(diǎn)贊、轉(zhuǎn)發(fā)和在看。若可以再給我加個(gè),謝謝你看我的文章,我們下篇再見!
特別聲明:以上內(nèi)容(如有圖片或視頻亦包括在內(nèi))為自媒體平臺“網(wǎng)易號”用戶上傳并發(fā)布,本平臺僅提供信息存儲服務(wù)。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.