Files
gsfdc/demo-dify/README.md
T
wuzilongandCursor 6519682885 chore: 纳入本地 Dify 1.19.0 源码及品牌与免登改动
演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-18 13:59:25 +08:00

49 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Dify 开源版本地源码(非正式选型)
目录:`demo-dify/dify/`,版本 **1.19.0**(完整源码,可本地修改)。
不代表协会官网三系统已接入或选型 Dify;仅供后续改造试验。
## 启动
1. 打开本机 **Docker Desktop**,等其完全启动。
2. 执行:
```bash
cd demo-dify/dify/docker
cp -n .env.example .env
# 若尚未配置,请设置 DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN(openssl rand -hex 32)
docker compose up -d
docker compose ps --all
```
品牌改造后的前端镜像为 `langgenius/dify-web:1.19.0-local`(见 `docker-compose.override.yaml`)。源码改完后重建:
```bash
# 本机 Node 24.22.1 + pnpm
cd demo-dify/dify/web
pnpm build && pnpm build:vinext
cd ../docker
docker compose build web && docker compose up -d --no-deps --force-recreate web
```
| 入口 | 地址 |
|---|---|
| 安装向导 / 控制台 | http://127.0.0.1:13080/install |
默认 HTTP 映射为 `13080`,避免占用 80,并与本仓库其他本地端口(13xxx)区分。
## 停止
```bash
cd demo-dify/dify/docker
docker compose down # 保留数据
docker compose down -v # 清空数据卷
```
## 镜像与源码
- 源码从 `ghfast.top` 拉取 GitHub `1.19.0` 发行包;官方 `git clone` / 部分代理超时后回退。
- 容器镜像经 `docker.m.daocloud.io` 拉取并打回原标签后启动(`docker compose up -d --pull never`)。
- 源码在 `demo-dify/dify/`(含 `api/`、`web/` 等)。当前默认用官方预构建镜像跑通;后续改代码可改 compose 为本地 build,或按官方文档用 middleware + 源码开发。