Skip to content

Commit bc89731

Browse files
committed
update dify version to 1.4.0
Signed-off-by: rongfu.leng <[email protected]>
1 parent 082a2c9 commit bc89731

File tree

7 files changed

+207
-16
lines changed

7 files changed

+207
-16
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ This is a Helm Chart for deploying [Dify](https://dify.ai/), an open-source LLMO
44

55
## Installation
66

7+
### Version info
8+
| Helm Chart Version | Dify Version |
9+
|--------------------|--------------|
10+
| 0.0.2 | 1.4.0 |
11+
| 0.0.1 | 0.15.2 |
12+
13+
714
### Option 1: Install from Helm Repository (Recommended)
815

916
```bash
1017
# Add the Helm repository
11-
helm repo add dify-chart https://daocloud.github.io/dify-chart
18+
helm repo add dify-chart https://lengrongfu.github.io/dify-chart
1219
helm repo update
1320

1421
# Install the chart
@@ -22,7 +29,7 @@ helm install dify dify-chart/dify-chart --namespace dify --create-namespace
2229

2330
```bash
2431
# Clone the repository
25-
git clone https://github.com/DaoCloud/dify-chart.git
32+
git clone https://github.com/lengrongfu/dify-chart.git
2633
cd dify-chart
2734

2835
# Install the chart
@@ -34,7 +41,7 @@ helm install dify ./dify-chart --namespace dify --create-namespace
3441

3542
## Configuration
3643

37-
For detailed configuration options, please refer to the [chart documentation](./dify-chart/README.md).
44+
For detailed configuration options, please refer to the [chart documentation](./charts/dify-chart/README.md).
3845

3946
## Releasing New Versions
4047

@@ -48,4 +55,8 @@ git add dify-chart/Chart.yaml
4855
git commit -m "Bump version to x.y.z"
4956
git tag -a vx.y.z -m "Release version x.y.z"
5057
git push origin main --tags
51-
```
58+
```
59+
60+
## License
61+
62+
This chart is licensed under the same terms as Dify itself. See the [Dify license](https://github.com/langgenius/dify/blob/main/LICENSE) for details.

charts/dify-chart/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: dify-chart
33
description: A Helm chart for Dify, an open-source LLMOps platform
44
type: application
5-
version: 0.0.1
5+
version: 0.0.2
66
appVersion: "0.15.2"
77
keywords:
88
- dify
@@ -11,5 +11,5 @@ keywords:
1111
- langchain
1212
home: https://dify.ai
1313
maintainers:
14-
- name: DaoCloud
15-
14+
- name: rongfu.leng
15+

charts/dify-chart/README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Dify is a LLM Application Development Platform. It integrates the best LLM appli
1818

1919
```bash
2020
# Add the Helm repository
21-
helm repo add dify-chart https://daocloud.github.io/dify-chart
21+
helm repo add dify-chart https://lengrongfu.github.io/dify-chart
2222
helm repo update
2323

2424
# Install the chart
@@ -32,7 +32,7 @@ helm install dify dify-chart/dify-chart --namespace dify --create-namespace
3232

3333
```bash
3434
# Clone the repository
35-
git clone https://github.com/DaoCloud/dify-chart.git
35+
git clone https://github.com/lengrongfu/dify-chart.git
3636
cd dify-chart
3737

3838
# Install the chart
@@ -64,8 +64,12 @@ The following table lists the configurable parameters of the Dify chart and thei
6464
| `credentials.postgres.username` | PostgreSQL username | `postgres` |
6565
| `credentials.postgres.password` | PostgreSQL password | `difyai123456` |
6666
| `credentials.postgres.database` | PostgreSQL database name | `dify` |
67+
| `credentials.postgres.host` | External PostgreSQL host (when postgres.enabled=false) | `""` |
68+
| `credentials.postgres.port` | External PostgreSQL port (when postgres.enabled=false) | `5432` |
6769
| `credentials.redis.username` | Redis username | `""` |
6870
| `credentials.redis.password` | Redis password | `difyai123456` |
71+
| `credentials.redis.host` | External Redis host (when redis.enabled=false) | `""` |
72+
| `credentials.redis.port` | External Redis port (when redis.enabled=false) | `6379` |
6973
| `credentials.weaviate.apiKey` | Weaviate API key | `WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih` |
7074
| `api.image.registry` | API server image registry | `docker.m.daocloud.io` |
7175
| `api.image.repository` | API server image repository | `langgenius/dify-api` |
@@ -83,10 +87,12 @@ The following table lists the configurable parameters of the Dify chart and thei
8387
| `web.image.tag` | Web frontend image tag | `0.15.2` |
8488
| `web.replicas` | Number of web frontend replicas | `1` |
8589
| `web.resources` | Web frontend resource requests and limits | See values.yaml |
90+
| `postgres.enabled` | Enable PostgreSQL deployment | `true` |
8691
| `postgres.image.registry` | PostgreSQL image registry | `docker.m.daocloud.io` |
8792
| `postgres.image.repository` | PostgreSQL image repository | `postgres` |
8893
| `postgres.image.tag` | PostgreSQL image tag | `15-alpine` |
8994
| `postgres.resources` | PostgreSQL resource requests and limits | See values.yaml |
95+
| `redis.enabled` | Enable Redis deployment | `true` |
9096
| `redis.image.registry` | Redis image registry | `docker.m.daocloud.io` |
9197
| `redis.image.repository` | Redis image repository | `redis` |
9298
| `redis.image.tag` | Redis image tag | `6-alpine` |
@@ -110,7 +116,24 @@ The following table lists the configurable parameters of the Dify chart and thei
110116
| `nginx.resources` | Nginx resource requests and limits | See values.yaml |
111117
| `nginx.service.type` | Nginx service type | `NodePort` |
112118
| `nginx.service.nodePort` | Nginx service NodePort | `30000` |
113-
| `persistence.enabled` | Enable persistence storage | `true` |
119+
| `nginx.service.nodeIP` | Nginx service NodeIP | `127.0.0.1` |
120+
| `security.runAsUser` | Security context runAsUser | `1000` |
121+
| `security.runAsGroup` | Security context runAsGroup | `1000` |
122+
| `security.fsGroup` | Security context fsGroup | `1000` |
123+
| `pluginDaemon.enabled` | Enable plugin daemon deployment | `true` |
124+
| `pluginDaemon.replicaCount` | Number of plugin daemon replicas | `1` |
125+
| `pluginDaemon.registry` | Plugin daemon image registry | `docker.m.daocloud.io` |
126+
| `pluginDaemon.repository` | Plugin daemon image repository | `langgenius/dify-plugin-daemon` |
127+
| `pluginDaemon.tag` | Plugin daemon image tag | `0.0.10-local` |
128+
| `pluginDaemon.pullPolicy` | Plugin daemon image pull policy | `IfNotPresent` |
129+
| `pluginDaemon.resources` | Plugin daemon resource requests and limits | See values.yaml |
130+
| `pluginDaemon.service.type` | Plugin daemon service type | `ClusterIP` |
131+
| `pluginDaemon.service.port` | Plugin daemon service port | `5002` |
132+
| `pluginDaemon.persistence.enabled`| Enable plugin daemon persistence | `false` |
133+
| `pluginDaemon.persistence.hostPath`| Plugin daemon hostPath for storage | `/data/dify` |
134+
| `pluginDaemon.persistence.storageClass`| Plugin daemon storage class | `""` |
135+
| `pluginDaemon.persistence.accessMode`| Plugin daemon access mode | `ReadWriteOnce` |
136+
| `pluginDaemon.persistence.size` | Plugin daemon storage size | `10Gi` |
114137

115138
## Storage
116139

charts/dify-chart/templates/api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ spec:
5151
- name: SERVICE_API_URL
5252
value: ""
5353
- name: APP_WEB_URL
54-
value: ""
54+
value: "http://{{ .Values.nginx.service.nodeIP | default "127.0.0.1" }}:{{ .Values.nginx.service.nodePort }}"
5555
- name: FILES_URL
5656
value: ""
5757
- name: MIGRATION_ENABLED
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "dify.fullname" . }}-plugin-daemon
5+
namespace: {{ .Release.Namespace | default "dify" }}
6+
labels:
7+
{{- include "dify.labels" . | nindent 4 }}
8+
app.kubernetes.io/component: plugin-daemon
9+
spec:
10+
replicas: {{ .Values.pluginDaemon.replicaCount }}
11+
selector:
12+
matchLabels:
13+
{{- include "dify.selectorLabels" . | nindent 6 }}
14+
app.kubernetes.io/component: plugin-daemon
15+
template:
16+
metadata:
17+
labels:
18+
{{- include "dify.selectorLabels" . | nindent 8 }}
19+
app.kubernetes.io/component: plugin-daemon
20+
spec:
21+
securityContext:
22+
runAsUser: {{ .Values.security.runAsUser }}
23+
runAsGroup: {{ .Values.security.runAsGroup }}
24+
fsGroup: {{ .Values.security.fsGroup }}
25+
containers:
26+
- name: {{ .Chart.Name }}-plugin-daemon
27+
image: "{{ .Values.pluginDaemon.registry }}/{{ .Values.pluginDaemon.repository }}:{{ .Values.pluginDaemon.tag }}"
28+
imagePullPolicy: {{ .Values.pluginDaemon.pullPolicy }}
29+
env:
30+
- name: SERVER_PORT
31+
value: "5002"
32+
- name: SERVER_KEY
33+
value: "lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi"
34+
- name: MAX_PLUGIN_PACKAGE_SIZE
35+
value: "52428800"
36+
- name: PPROF_ENABLED
37+
value: "false"
38+
- name: DIFY_INNER_API_URL
39+
value: "http://api:5001"
40+
- name: DIFY_INNER_API_KEY
41+
value: "QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1"
42+
- name: PLUGIN_REMOTE_INSTALLING_HOST
43+
value: "0.0.0.0"
44+
- name: PLUGIN_REMOTE_INSTALLING_PORT
45+
value: "5003"
46+
- name: PLUGIN_WORKING_PATH
47+
value: "/app/storage/cwd"
48+
- name: FORCE_VERIFYING_SIGNATURE
49+
value: "true"
50+
- name: PYTHON_ENV_INIT_TIMEOUT
51+
value: "120"
52+
- name: PLUGIN_MAX_EXECUTION_TIMEOUT
53+
value: "600"
54+
- name: PIP_MIRROR_URL
55+
value: ""
56+
- name: PLUGIN_STORAGE_TYPE
57+
value: "local"
58+
- name: PLUGIN_STORAGE_LOCAL_ROOT
59+
value: "/app/storage"
60+
- name: PLUGIN_INSTALLED_PATH
61+
value: "plugin"
62+
- name: PLUGIN_PACKAGE_CACHE_PATH
63+
value: "plugin_packages"
64+
- name: PLUGIN_MEDIA_CACHE_PATH
65+
value: "assets"
66+
# Database configuration
67+
- name: DB_HOST
68+
value: "dify-postgres"
69+
- name: DB_PORT
70+
value: {{ .Values.credentials.postgres.port | default "5432" | quote }}
71+
- name: DB_USERNAME
72+
value: {{ .Values.credentials.postgres.username | quote }}
73+
- name: DB_PASSWORD
74+
value: {{ .Values.credentials.postgres.password | quote }}
75+
- name: DB_DATABASE
76+
value: {{ .Values.credentials.postgres.database | quote }}
77+
# Redis configuration
78+
- name: REDIS_HOST
79+
value: "dify-redis"
80+
- name: REDIS_PORT
81+
value: {{ .Values.credentials.redis.port | default "6379" | quote }}
82+
- name: REDIS_USERNAME
83+
value: {{ .Values.credentials.redis.username | quote }}
84+
- name: REDIS_PASSWORD
85+
value: {{ .Values.credentials.redis.password | quote }}
86+
ports:
87+
- name: http
88+
containerPort: 5002
89+
protocol: TCP
90+
- name: debugging
91+
containerPort: 5003
92+
protocol: TCP
93+
resources:
94+
{{- toYaml .Values.pluginDaemon.resources | nindent 12 }}
95+
volumeMounts:
96+
- name: storage
97+
mountPath: /app/storage
98+
volumes:
99+
- name: storage
100+
{{- if .Values.pluginDaemon.persistence.enabled }}
101+
persistentVolumeClaim:
102+
claimName: {{ include "dify.fullname" . }}-plugin-daemon-storage
103+
{{- else }}
104+
hostPath:
105+
path: {{ .Values.pluginDaemon.persistence.hostPath }}/plugin-daemon
106+
type: DirectoryOrCreate
107+
{{- end }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "dify.fullname" . }}-plugin-daemon
5+
namespace: {{ .Release.Namespace | default "dify" }}
6+
labels:
7+
{{- include "dify.labels" . | nindent 4 }}
8+
app.kubernetes.io/component: plugin-daemon
9+
spec:
10+
type: {{ .Values.pluginDaemon.service.type }}
11+
ports:
12+
- port: {{ .Values.pluginDaemon.service.port }}
13+
targetPort: http
14+
protocol: TCP
15+
name: http
16+
- port: 5003
17+
targetPort: debugging
18+
protocol: TCP
19+
name: debugging
20+
selector:
21+
{{- include "dify.selectorLabels" . | nindent 4 }}
22+
app.kubernetes.io/component: plugin-daemon

charts/dify-chart/values.yaml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ api:
4848
cpu: 200m
4949
memory: 256Mi
5050
limits:
51-
cpu: 1
51+
cpu: 1000m
5252
memory: 2Gi
5353
secretKey: "sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U"
5454

@@ -63,7 +63,7 @@ worker:
6363
cpu: 200m
6464
memory: 256Mi
6565
limits:
66-
cpu: 1
66+
cpu: 1000m
6767
memory: 2Gi
6868

6969
web:
@@ -163,7 +163,35 @@ nginx:
163163
service:
164164
type: NodePort
165165
nodePort: 30000
166+
nodeIP: "127.0.0.1"
166167

167-
# Persistence settings
168-
persistence:
169-
enabled: true
168+
169+
# Security configuration
170+
security:
171+
runAsUser: 1000
172+
runAsGroup: 1000
173+
fsGroup: 1000
174+
175+
pluginDaemon:
176+
enabled: true
177+
replicaCount: 1
178+
registry: docker.m.daocloud.io
179+
repository: langgenius/dify-plugin-daemon
180+
tag: "0.0.10-local"
181+
pullPolicy: IfNotPresent
182+
resources:
183+
requests:
184+
cpu: "200m"
185+
memory: "512Mi"
186+
limits:
187+
cpu: "500m"
188+
memory: "1Gi"
189+
service:
190+
type: ClusterIP
191+
port: 5002
192+
persistence:
193+
enabled: false
194+
hostPath: "/data/dify"
195+
storageClass: ""
196+
accessMode: ReadWriteOnce
197+
size: 10Gi

0 commit comments

Comments
 (0)