Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,22 @@ graph TB
ProxyPod -->|Agent Stub| AgentBackendService[🤖 Agent Backend Service<br/>Port: 5050]

%% Backend Pods
APIService --> APIPod[📦 API Pod<br/>langgenius/dify-api:1.17.0<br/>Port: 5001]
WebService --> WebPod[📦 Web Pod<br/>langgenius/dify-web:1.17.0<br/>Port: 3000]
APIService --> APIPod[📦 API Pod<br/>langgenius/dify-api:1.18.0<br/>Port: 5001]
WebService --> WebPod[📦 Web Pod<br/>langgenius/dify-web:1.18.0<br/>Port: 3000]
PluginService --> PluginPod[📦 Plugin Daemon Pod<br/>langgenius/dify-plugin-daemon:0.6.10-local<br/>Ports: 5002, 5003]

%% Worker Pod (Background Processing)
WorkerPod[📦 Worker Pod<br/>langgenius/dify-api:1.17.0]
WorkerPod[📦 Worker Pod<br/>langgenius/dify-api:1.18.0]

%% Beat Pod (Periodic task scheduler)
BeatPod[📦 Beat Pod<br/>langgenius/dify-api:1.17.0]
BeatPod[📦 Beat Pod<br/>langgenius/dify-api:1.18.0]

%% Sandbox Service
SandboxService[🏖️ Sandbox Service<br/>Port: 8194] --> SandboxPod[📦 Sandbox Pod<br/>langgenius/dify-sandbox:0.2.15<br/>Port: 8194]

%% Agent Stack
AgentBackendService[🤖 Agent Backend Service<br/>Port: 5050] --> AgentBackendPod[📦 Agent Backend Pod<br/>langgenius/dify-agent-backend:1.17.0<br/>Port: 5050]
LocalSandboxService[🐚 Local Sandbox Service<br/>Port: 5004] --> LocalSandboxPod[📦 Local Sandbox Pod<br/>langgenius/dify-agent-local-sandbox:1.17.0<br/>Port: 5004]
AgentBackendService[🤖 Agent Backend Service<br/>Port: 5050] --> AgentBackendPod[📦 Agent Backend Pod<br/>langgenius/dify-agent-backend:1.18.0<br/>Port: 5050]
LocalSandboxService[🐚 Local Sandbox Service<br/>Port: 5004] --> LocalSandboxPod[📦 Local Sandbox Pod<br/>langgenius/dify-agent-local-sandbox:1.18.0<br/>Port: 5004]

%% SSRF Proxy Service
SSRFService[🛡️ SSRF Proxy Service<br/>Port: 3128] --> SSRFPod[📦 SSRF Proxy Pod<br/>ubuntu/squid:latest<br/>Port: 3128]
Expand Down Expand Up @@ -190,14 +190,14 @@ The Nginx proxy handles traffic routing with the following rules:

| Component | Image | Port | Role |
|-----------|-------|------|------|
| **API** | `langgenius/dify-api:1.17.0` | 5001 | RESTful API server, business logic processing |
| **API WebSocket** | `langgenius/dify-api:1.17.0` | 5001 | Socket.IO process for workflow collaboration |
| **Web** | `langgenius/dify-web:1.17.0` | 3000 | Web UI frontend |
| **Worker** | `langgenius/dify-api:1.17.0` | - | Background task processing (Celery) |
| **Beat** | `langgenius/dify-api:1.17.0` | - | Periodic task scheduler (Celery Beat) |
| **API** | `langgenius/dify-api:1.18.0` | 5001 | RESTful API server, business logic processing |
| **API WebSocket** | `langgenius/dify-api:1.18.0` | 5001 | Socket.IO process for workflow collaboration |
| **Web** | `langgenius/dify-web:1.18.0` | 3000 | Web UI frontend |
| **Worker** | `langgenius/dify-api:1.18.0` | - | Background task processing (Celery) |
| **Beat** | `langgenius/dify-api:1.18.0` | - | Periodic task scheduler (Celery Beat) |
| **Sandbox** | `langgenius/dify-sandbox:0.2.15` | 8194 | Secure code execution environment |
| **Agent Backend** | `langgenius/dify-agent-backend:1.17.0` | 5050 | Agent run orchestration |
| **Local Sandbox** | `langgenius/dify-agent-local-sandbox:1.17.0` | 5004 | Agent shellctl execution environment |
| **Agent Backend** | `langgenius/dify-agent-backend:1.18.0` | 5050 | Agent run orchestration |
| **Local Sandbox** | `langgenius/dify-agent-local-sandbox:1.18.0` | 5004 | Agent shellctl execution environment |
| **Plugin Daemon** | `langgenius/dify-plugin-daemon:0.6.10-local` | 5002, 5003 | Plugin management and execution |
| **SSRF Proxy** | `ubuntu/squid:latest` | 3128 | External request security proxy |
| **Nginx Proxy** | `nginx:latest` | 80 | Reverse proxy, load balancing |
Expand Down
4 changes: 2 additions & 2 deletions charts/dify/templates/credentials.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,14 @@ DIFY_AGENT_INNER_API_KEY: {{ .Values.api.auth.internalApiKey | default .Values.g
{{- if .Values.externalE2bSandbox.enabled }}
DIFY_AGENT_E2B_API_KEY: {{ .Values.externalE2bSandbox.apiKey | b64enc | quote }}
{{- else if .Values.localSandbox.enabled }}
DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN: {{ .Values.agentBackend.auth.shellctlAuthToken | b64enc | quote }}
DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN: {{ .Values.agentBackend.auth.shellctlAuthToken | default .Values.global.internalApiKey | b64enc | quote }}
{{- end }}
DIFY_AGENT_SERVER_SECRET_KEY: {{ .Values.agentBackend.auth.serverSecretKey | b64enc | quote }}
DIFY_AGENT_API_TOKEN: {{ .Values.agentBackend.auth.apiToken | default .Values.global.internalApiKey | b64enc | quote }}
{{- end }}

{{- define "dify.localSandbox.credentials" -}}
SHELLCTL_AUTH_TOKEN: {{ .Values.agentBackend.auth.shellctlAuthToken | b64enc | quote }}
SHELLCTL_AUTH_TOKEN: {{ .Values.agentBackend.auth.shellctlAuthToken | default .Values.global.internalApiKey | b64enc | quote }}
{{- end }}

{{- define "dify.pluginDaemon.credentials" -}}
Expand Down
4 changes: 4 additions & 0 deletions charts/dify/templates/local-sandbox-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ spec:
- image: "{{ .Values.image.localSandbox.repository }}:{{ default .Chart.AppVersion .Values.image.localSandbox.tag }}"
imagePullPolicy: "{{ .Values.image.localSandbox.pullPolicy }}"
name: local-sandbox
{{- if .Values.localSandbox.command }}
command:
{{- toYaml .Values.localSandbox.command | nindent 12 }}
{{- end }}
{{- if .Values.localSandbox.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.localSandbox.customLivenessProbe "context" $) | nindent 12 }}
{{- else if .Values.localSandbox.livenessProbe.enabled }}
Expand Down
5 changes: 5 additions & 0 deletions charts/dify/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,11 @@
"affinity": { "type": "object" },
"tolerations": { "type": "array" },
"priorityClassName": { "type": "string" },
"command": {
"type": "array",
"description": "Default startup command for the local sandbox container.",
"default": ["shellctl", "serve", "--listen", "0.0.0.0:5004", "--require-auth-token"]
},
"shareProcessNamespace": {
"type": "boolean",
"description": "Share a single process namespace between all of the containers in Dify local sandbox pods.",
Expand Down
16 changes: 10 additions & 6 deletions charts/dify/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ global:
edition: "COMMUNITY"
# A secret key that is used for securely signing the session cookie and encrypting sensitive information on the database. You can generate a strong key using `openssl rand -base64 42`.
appSecretKey: "sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U"
# A global secret key for all inter-component API calls among Dify containers (e.g. `api`, `sandbox`, `pluginDaemon` and `agentBackend`). You can generate a strong key using `openssl rand -base64 42`.
# A global secret key for all inter-component API calls among Dify containers (e.g. `api`, `sandbox`, `pluginDaemon`, `agentBackend` and `localSandbox`). You can generate a strong key using `openssl rand -base64 42`.
# Takes no effect when left empty. Can be overridden by component-specific values.
internalApiKey: ""
internalApiKey: "YOUR-INTERNAL-API-KEY"
# The backend domain of the console API, used to concatenate the authorization callback.
# If empty, it is the same domain. Example: console.dify.ai
consoleApiDomain: ""
Expand Down Expand Up @@ -46,7 +46,7 @@ global:
image:
api:
repository: langgenius/dify-api
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
Expand All @@ -57,7 +57,7 @@ image:

web:
repository: langgenius/dify-web
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
Expand Down Expand Up @@ -112,7 +112,7 @@ image:

agentBackend:
repository: langgenius/dify-agent-backend
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
Expand All @@ -123,7 +123,7 @@ image:

localSandbox:
repository: langgenius/dify-agent-local-sandbox
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
Expand Down Expand Up @@ -1147,6 +1147,7 @@ agentBackend:
##
serverSecretKey: "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY"
## @param agentBackend.auth.shellctlAuthToken Shared as agent DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN and localSandbox SHELLCTL_AUTH_TOKEN
## If not set, uses global.internalApiKey
##
shellctlAuthToken: ""

Expand Down Expand Up @@ -1174,6 +1175,9 @@ localSandbox:
affinity: {}
tolerations: []
priorityClassName: ""
## @param localSandbox.command Default startup command for the local sandbox container
##
command: ["shellctl", "serve", "--listen", "0.0.0.0:5004", "--require-auth-token"]
## @param localSandbox.shareProcessNamespace Share a single process namespace between all of the containers in Dify local sandbox pods
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
##
Expand Down
8 changes: 4 additions & 4 deletions ci/values/values-eso-external-s3-pg-es-redis.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
image:
api:
repository: langgenius/dify-api
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

web:
repository: langgenius/dify-web
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

sandbox:
Expand All @@ -31,12 +31,12 @@ image:

agentBackend:
repository: langgenius/dify-agent-backend
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

localSandbox:
repository: langgenius/dify-agent-local-sandbox
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

api:
Expand Down
8 changes: 4 additions & 4 deletions ci/values/values-eso-otel.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
image:
api:
repository: langgenius/dify-api
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

web:
repository: langgenius/dify-web
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

sandbox:
Expand All @@ -31,12 +31,12 @@ image:

agentBackend:
repository: langgenius/dify-agent-backend
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

localSandbox:
repository: langgenius/dify-agent-local-sandbox
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

api:
Expand Down
8 changes: 4 additions & 4 deletions ci/values/values-eso.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
image:
api:
repository: langgenius/dify-api
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

web:
repository: langgenius/dify-web
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

sandbox:
Expand All @@ -31,12 +31,12 @@ image:

agentBackend:
repository: langgenius/dify-agent-backend
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

localSandbox:
repository: langgenius/dify-agent-local-sandbox
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

api:
Expand Down
8 changes: 4 additions & 4 deletions ci/values/values-legacy-external-all.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
image:
api:
repository: langgenius/dify-api
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

web:
repository: langgenius/dify-web
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

sandbox:
Expand All @@ -31,12 +31,12 @@ image:

agentBackend:
repository: langgenius/dify-agent-backend
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

localSandbox:
repository: langgenius/dify-agent-local-sandbox
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

api:
Expand Down
8 changes: 4 additions & 4 deletions ci/values/values-legacy-external-mysql-all.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
image:
api:
repository: langgenius/dify-api
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

web:
repository: langgenius/dify-web
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

sandbox:
Expand All @@ -31,12 +31,12 @@ image:

agentBackend:
repository: langgenius/dify-agent-backend
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

localSandbox:
repository: langgenius/dify-agent-local-sandbox
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

api:
Expand Down
8 changes: 4 additions & 4 deletions ci/values/values-legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
image:
api:
repository: langgenius/dify-api
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

web:
repository: langgenius/dify-web
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

sandbox:
Expand All @@ -35,12 +35,12 @@ image:

agentBackend:
repository: langgenius/dify-agent-backend
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

localSandbox:
repository: langgenius/dify-agent-local-sandbox
tag: "1.17.0"
tag: "1.18.0"
pullPolicy: IfNotPresent

api:
Expand Down
Loading