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
3 changes: 3 additions & 0 deletions charts/dify/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ spec:
securityContext: {{- omit .Values.api.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
env:
# The log level for the application. Supported values are `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`
- name: LOG_LEVEL
value: {{ .Values.api.logLevel | quote }}
{{- if .Values.sandbox.enabled }}
- name: CODE_EXECUTION_API_KEY
valueFrom:
Expand Down
27 changes: 11 additions & 16 deletions charts/dify/templates/config.tpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{{- define "dify.api.config" -}}
# Startup mode, 'api' starts the API server.
MODE: api
# The log level for the application. Supported values are `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`
LOG_LEVEL: {{ .Values.api.logLevel | quote }}
# 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`.
# SECRET_KEY: {{ .Values.api.secretKey }}
{{- define "dify.common.config" -}}
# The base URL of console application web frontend, refers to the Console base URL of WEB service if console domain is
# different from api or web app domain.
# example: http://cloud.dify.ai
Expand All @@ -25,6 +19,15 @@ APP_WEB_URL: {{ .Values.api.url.appWeb | default .Values.global.appWebDomain | q
# used to display File preview or download Url to the front-end or as Multi-model inputs;
# Url is signed and has expiration time.
FILES_URL: {{ .Values.api.url.files | default .Values.global.filesDomain | quote }}
{{- end }}

{{- define "dify.api.config" -}}
# Startup mode, 'api' starts the API server.
MODE: api
{{- include "dify.common.config" . }}
# 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`.
# SECRET_KEY: {{ .Values.api.secretKey }}

{{- include "dify.marketplace.config" . }}
# When enabled, migrations will be executed prior to application startup and the application will start after the migrations have completed.
MIGRATION_ENABLED: {{ .Values.api.migration | toString | quote }}
Expand Down Expand Up @@ -103,21 +106,13 @@ OTEL_METRIC_EXPORT_TIMEOUT: {{ .Values.api.otel.metricExportTimeout | toString |
{{- end }}

{{- define "dify.worker.config" -}}
# api service
{{ include "dify.api.config" . }}

# worker service
MODE: worker

# The Celery worker for processing the queue.


# The base URL of console application web frontend, refers to the Console base URL of WEB service if console domain is
# different from api or web app domain.
# example: http://cloud.dify.ai
CONSOLE_WEB_URL: {{ .Values.api.url.consoleWeb | default .Values.global.consoleWebDomain | quote }}
# --- All the configurations below are the same as those in the 'api' service. ---

{{- include "dify.common.config" . }}
# 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`.
# same as the API service
# SECRET_KEY: {{ .Values.api.secretKey }}
Expand Down