Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f226ea714 | |||
| 8c845ec4aa |
@@ -1,5 +0,0 @@
|
|||||||
# Dify
|
|
||||||
|
|
||||||
- copied from https://github.com/langgenius/dify
|
|
||||||
- removed `container_name`
|
|
||||||
- removed `ports`
|
|
||||||
+33
-4
@@ -397,7 +397,7 @@ WEB_API_CORS_ALLOW_ORIGINS=*
|
|||||||
# Specifies the allowed origins for cross-origin requests to the console API,
|
# Specifies the allowed origins for cross-origin requests to the console API,
|
||||||
# e.g. https://cloud.dify.ai or * for all origins.
|
# e.g. https://cloud.dify.ai or * for all origins.
|
||||||
CONSOLE_CORS_ALLOW_ORIGINS=*
|
CONSOLE_CORS_ALLOW_ORIGINS=*
|
||||||
# When the frontend and backend run on different subdomains, set COOKIE_DOMAIN to the site’s top-level domain (e.g., `example.com`). Leading dots are optional.
|
# When the frontend and backend run on different subdomains, set COOKIE_DOMAIN to the site's top-level domain (e.g., `example.com`). Leading dots are optional.
|
||||||
COOKIE_DOMAIN=
|
COOKIE_DOMAIN=
|
||||||
# When the frontend and backend run on different subdomains, set NEXT_PUBLIC_COOKIE_DOMAIN=1.
|
# When the frontend and backend run on different subdomains, set NEXT_PUBLIC_COOKIE_DOMAIN=1.
|
||||||
NEXT_PUBLIC_COOKIE_DOMAIN=
|
NEXT_PUBLIC_COOKIE_DOMAIN=
|
||||||
@@ -1080,7 +1080,7 @@ ALIYUN_SLS_ENDPOINT=
|
|||||||
ALIYUN_SLS_REGION=
|
ALIYUN_SLS_REGION=
|
||||||
# Aliyun SLS Project Name
|
# Aliyun SLS Project Name
|
||||||
ALIYUN_SLS_PROJECT_NAME=
|
ALIYUN_SLS_PROJECT_NAME=
|
||||||
# Number of days to retain workflow run logs (default: 365 days, 3650 for permanent storage)
|
# Number of days to retain workflow run logs (default: 365 days, 3650 for permanent storage)
|
||||||
ALIYUN_SLS_LOGSTORE_TTL=365
|
ALIYUN_SLS_LOGSTORE_TTL=365
|
||||||
# Enable dual-write to both SLS LogStore and SQL database (default: false)
|
# Enable dual-write to both SLS LogStore and SQL database (default: false)
|
||||||
LOGSTORE_DUAL_WRITE_ENABLED=false
|
LOGSTORE_DUAL_WRITE_ENABLED=false
|
||||||
@@ -1375,6 +1375,7 @@ PLUGIN_DAEMON_PORT=5002
|
|||||||
PLUGIN_DAEMON_KEY=lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi
|
PLUGIN_DAEMON_KEY=lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi
|
||||||
PLUGIN_DAEMON_URL=http://plugin_daemon:5002
|
PLUGIN_DAEMON_URL=http://plugin_daemon:5002
|
||||||
PLUGIN_MAX_PACKAGE_SIZE=52428800
|
PLUGIN_MAX_PACKAGE_SIZE=52428800
|
||||||
|
PLUGIN_MODEL_SCHEMA_CACHE_TTL=3600
|
||||||
PLUGIN_PPROF_ENABLED=false
|
PLUGIN_PPROF_ENABLED=false
|
||||||
|
|
||||||
PLUGIN_DEBUGGING_HOST=0.0.0.0
|
PLUGIN_DEBUGGING_HOST=0.0.0.0
|
||||||
@@ -1398,9 +1399,9 @@ PLUGIN_STDIO_BUFFER_SIZE=1024
|
|||||||
PLUGIN_STDIO_MAX_BUFFER_SIZE=5242880
|
PLUGIN_STDIO_MAX_BUFFER_SIZE=5242880
|
||||||
|
|
||||||
PLUGIN_PYTHON_ENV_INIT_TIMEOUT=120
|
PLUGIN_PYTHON_ENV_INIT_TIMEOUT=120
|
||||||
# Plugin Daemon side timeout (configure to match the API side below)
|
# Plugin Daemon side timeout (configure to match the API side below)
|
||||||
PLUGIN_MAX_EXECUTION_TIMEOUT=600
|
PLUGIN_MAX_EXECUTION_TIMEOUT=600
|
||||||
# API side timeout (configure to match the Plugin Daemon side above)
|
# API side timeout (configure to match the Plugin Daemon side above)
|
||||||
PLUGIN_DAEMON_TIMEOUT=600.0
|
PLUGIN_DAEMON_TIMEOUT=600.0
|
||||||
# PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
# PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
PIP_MIRROR_URL=
|
PIP_MIRROR_URL=
|
||||||
@@ -1518,3 +1519,31 @@ AMPLITUDE_API_KEY=
|
|||||||
SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD=21
|
SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD=21
|
||||||
SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE=1000
|
SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE=1000
|
||||||
SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS=30
|
SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS=30
|
||||||
|
|
||||||
|
|
||||||
|
# Redis URL used for PubSub between API and
|
||||||
|
# celery worker
|
||||||
|
# defaults to url constructed from `REDIS_*`
|
||||||
|
# configurations
|
||||||
|
PUBSUB_REDIS_URL=
|
||||||
|
# Pub/sub channel type for streaming events.
|
||||||
|
# valid options are:
|
||||||
|
#
|
||||||
|
# - pubsub: for normal Pub/Sub
|
||||||
|
# - sharded: for sharded Pub/Sub
|
||||||
|
#
|
||||||
|
# It's highly recommended to use sharded Pub/Sub AND redis cluster
|
||||||
|
# for large deployments.
|
||||||
|
PUBSUB_REDIS_CHANNEL_TYPE=pubsub
|
||||||
|
# Whether to use Redis cluster mode while running
|
||||||
|
# PubSub.
|
||||||
|
# It's highly recommended to enable this for large deployments.
|
||||||
|
PUBSUB_REDIS_USE_CLUSTERS=false
|
||||||
|
|
||||||
|
# Whether to Enable human input timeout check task
|
||||||
|
ENABLE_HUMAN_INPUT_TIMEOUT_TASK=true
|
||||||
|
# Human input timeout check interval in minutes
|
||||||
|
HUMAN_INPUT_TIMEOUT_TASK_INTERVAL=1
|
||||||
|
|
||||||
|
|
||||||
|
SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL=90000
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ services:
|
|||||||
|
|
||||||
# API service
|
# API service
|
||||||
api:
|
api:
|
||||||
image: langgenius/dify-api:1.11.4
|
image: langgenius/dify-api:1.12.1
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -63,7 +63,7 @@ services:
|
|||||||
# worker service
|
# worker service
|
||||||
# The Celery worker for processing all queues (dataset, workflow, mail, etc.)
|
# The Celery worker for processing all queues (dataset, workflow, mail, etc.)
|
||||||
worker:
|
worker:
|
||||||
image: langgenius/dify-api:1.11.4
|
image: langgenius/dify-api:1.12.1
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -102,7 +102,7 @@ services:
|
|||||||
# worker_beat service
|
# worker_beat service
|
||||||
# Celery beat for scheduling periodic tasks.
|
# Celery beat for scheduling periodic tasks.
|
||||||
worker_beat:
|
worker_beat:
|
||||||
image: langgenius/dify-api:1.11.4
|
image: langgenius/dify-api:1.12.1
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -132,7 +132,7 @@ services:
|
|||||||
|
|
||||||
# Frontend web application.
|
# Frontend web application.
|
||||||
web:
|
web:
|
||||||
image: langgenius/dify-web:1.11.4
|
image: langgenius/dify-web:1.12.1
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
CONSOLE_API_URL: ${CONSOLE_API_URL:-}
|
CONSOLE_API_URL: ${CONSOLE_API_URL:-}
|
||||||
@@ -270,7 +270,7 @@ services:
|
|||||||
|
|
||||||
# plugin daemon
|
# plugin daemon
|
||||||
plugin_daemon:
|
plugin_daemon:
|
||||||
image: langgenius/dify-plugin-daemon:0.5.2-local
|
image: langgenius/dify-plugin-daemon:0.5.3-local
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -662,13 +662,14 @@ services:
|
|||||||
- "${IRIS_SUPER_SERVER_PORT:-1972}:1972"
|
- "${IRIS_SUPER_SERVER_PORT:-1972}:1972"
|
||||||
- "${IRIS_WEB_SERVER_PORT:-52773}:52773"
|
- "${IRIS_WEB_SERVER_PORT:-52773}:52773"
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/iris:/opt/iris
|
- ./volumes/iris:/durable
|
||||||
- ./iris/iris-init.script:/iris-init.script
|
- ./iris/iris-init.script:/iris-init.script
|
||||||
- ./iris/docker-entrypoint.sh:/custom-entrypoint.sh
|
- ./iris/docker-entrypoint.sh:/custom-entrypoint.sh
|
||||||
entrypoint: ["/custom-entrypoint.sh"]
|
entrypoint: ["/custom-entrypoint.sh"]
|
||||||
tty: true
|
tty: true
|
||||||
environment:
|
environment:
|
||||||
TZ: ${IRIS_TIMEZONE:-UTC}
|
TZ: ${IRIS_TIMEZONE:-UTC}
|
||||||
|
ISC_DATA_DIRECTORY: /durable/iris
|
||||||
|
|
||||||
# Oracle vector database
|
# Oracle vector database
|
||||||
oracle:
|
oracle:
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ services:
|
|||||||
|
|
||||||
# plugin daemon
|
# plugin daemon
|
||||||
plugin_daemon:
|
plugin_daemon:
|
||||||
image: langgenius/dify-plugin-daemon:0.5.2-local
|
image: langgenius/dify-plugin-daemon:0.5.3-local
|
||||||
restart: always
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
- ./middleware.env
|
- ./middleware.env
|
||||||
|
|||||||
@@ -589,6 +589,7 @@ x-shared-env: &shared-api-worker-env
|
|||||||
PLUGIN_DAEMON_KEY: ${PLUGIN_DAEMON_KEY:-lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi}
|
PLUGIN_DAEMON_KEY: ${PLUGIN_DAEMON_KEY:-lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi}
|
||||||
PLUGIN_DAEMON_URL: ${PLUGIN_DAEMON_URL:-http://plugin_daemon:5002}
|
PLUGIN_DAEMON_URL: ${PLUGIN_DAEMON_URL:-http://plugin_daemon:5002}
|
||||||
PLUGIN_MAX_PACKAGE_SIZE: ${PLUGIN_MAX_PACKAGE_SIZE:-52428800}
|
PLUGIN_MAX_PACKAGE_SIZE: ${PLUGIN_MAX_PACKAGE_SIZE:-52428800}
|
||||||
|
PLUGIN_MODEL_SCHEMA_CACHE_TTL: ${PLUGIN_MODEL_SCHEMA_CACHE_TTL:-3600}
|
||||||
PLUGIN_PPROF_ENABLED: ${PLUGIN_PPROF_ENABLED:-false}
|
PLUGIN_PPROF_ENABLED: ${PLUGIN_PPROF_ENABLED:-false}
|
||||||
PLUGIN_DEBUGGING_HOST: ${PLUGIN_DEBUGGING_HOST:-0.0.0.0}
|
PLUGIN_DEBUGGING_HOST: ${PLUGIN_DEBUGGING_HOST:-0.0.0.0}
|
||||||
PLUGIN_DEBUGGING_PORT: ${PLUGIN_DEBUGGING_PORT:-5003}
|
PLUGIN_DEBUGGING_PORT: ${PLUGIN_DEBUGGING_PORT:-5003}
|
||||||
@@ -682,6 +683,12 @@ x-shared-env: &shared-api-worker-env
|
|||||||
SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD: ${SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD:-21}
|
SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD: ${SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD:-21}
|
||||||
SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE: ${SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE:-1000}
|
SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE: ${SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE:-1000}
|
||||||
SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS: ${SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS:-30}
|
SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS: ${SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS:-30}
|
||||||
|
PUBSUB_REDIS_URL: ${PUBSUB_REDIS_URL:-}
|
||||||
|
PUBSUB_REDIS_CHANNEL_TYPE: ${PUBSUB_REDIS_CHANNEL_TYPE:-pubsub}
|
||||||
|
PUBSUB_REDIS_USE_CLUSTERS: ${PUBSUB_REDIS_USE_CLUSTERS:-false}
|
||||||
|
ENABLE_HUMAN_INPUT_TIMEOUT_TASK: ${ENABLE_HUMAN_INPUT_TIMEOUT_TASK:-true}
|
||||||
|
HUMAN_INPUT_TIMEOUT_TASK_INTERVAL: ${HUMAN_INPUT_TIMEOUT_TASK_INTERVAL:-1}
|
||||||
|
SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL: ${SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL:-90000}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# Init container to fix permissions
|
# Init container to fix permissions
|
||||||
@@ -705,7 +712,7 @@ services:
|
|||||||
|
|
||||||
# API service
|
# API service
|
||||||
api:
|
api:
|
||||||
image: langgenius/dify-api:1.11.4
|
image: langgenius/dify-api:1.12.1
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -747,7 +754,7 @@ services:
|
|||||||
# worker service
|
# worker service
|
||||||
# The Celery worker for processing all queues (dataset, workflow, mail, etc.)
|
# The Celery worker for processing all queues (dataset, workflow, mail, etc.)
|
||||||
worker:
|
worker:
|
||||||
image: langgenius/dify-api:1.11.4
|
image: langgenius/dify-api:1.12.1
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -786,7 +793,7 @@ services:
|
|||||||
# worker_beat service
|
# worker_beat service
|
||||||
# Celery beat for scheduling periodic tasks.
|
# Celery beat for scheduling periodic tasks.
|
||||||
worker_beat:
|
worker_beat:
|
||||||
image: langgenius/dify-api:1.11.4
|
image: langgenius/dify-api:1.12.1
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -816,7 +823,7 @@ services:
|
|||||||
|
|
||||||
# Frontend web application.
|
# Frontend web application.
|
||||||
web:
|
web:
|
||||||
image: langgenius/dify-web:1.11.4
|
image: langgenius/dify-web:1.12.1
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
CONSOLE_API_URL: ${CONSOLE_API_URL:-}
|
CONSOLE_API_URL: ${CONSOLE_API_URL:-}
|
||||||
@@ -954,7 +961,7 @@ services:
|
|||||||
|
|
||||||
# plugin daemon
|
# plugin daemon
|
||||||
plugin_daemon:
|
plugin_daemon:
|
||||||
image: langgenius/dify-plugin-daemon:0.5.2-local
|
image: langgenius/dify-plugin-daemon:0.5.3-local
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -1336,13 +1343,14 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
init: true
|
init: true
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/iris:/opt/iris
|
- ./volumes/iris:/durable
|
||||||
- ./iris/iris-init.script:/iris-init.script
|
- ./iris/iris-init.script:/iris-init.script
|
||||||
- ./iris/docker-entrypoint.sh:/custom-entrypoint.sh
|
- ./iris/docker-entrypoint.sh:/custom-entrypoint.sh
|
||||||
entrypoint: [ "/custom-entrypoint.sh" ]
|
entrypoint: [ "/custom-entrypoint.sh" ]
|
||||||
tty: true
|
tty: true
|
||||||
environment:
|
environment:
|
||||||
TZ: ${IRIS_TIMEZONE:-UTC}
|
TZ: ${IRIS_TIMEZONE:-UTC}
|
||||||
|
ISC_DATA_DIRECTORY: /durable/iris
|
||||||
|
|
||||||
# Oracle vector database
|
# Oracle vector database
|
||||||
oracle:
|
oracle:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ def parse_env_example(file_path):
|
|||||||
Parses the .env.example file and returns a dictionary with variable names as keys and default values as values.
|
Parses the .env.example file and returns a dictionary with variable names as keys and default values as values.
|
||||||
"""
|
"""
|
||||||
env_vars = {}
|
env_vars = {}
|
||||||
with open(file_path, "r") as f:
|
with open(file_path, "r", encoding="utf-8") as f:
|
||||||
for line_number, line in enumerate(f, 1):
|
for line_number, line in enumerate(f, 1):
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
# Ignore empty lines and comments
|
# Ignore empty lines and comments
|
||||||
@@ -55,7 +55,7 @@ def insert_shared_env(template_path, output_path, shared_env_block, header_comme
|
|||||||
Inserts the shared environment variables block and header comments into the template file,
|
Inserts the shared environment variables block and header comments into the template file,
|
||||||
removing any existing x-shared-env anchors, and generates the final docker-compose.yaml file.
|
removing any existing x-shared-env anchors, and generates the final docker-compose.yaml file.
|
||||||
"""
|
"""
|
||||||
with open(template_path, "r") as f:
|
with open(template_path, "r", encoding="utf-8") as f:
|
||||||
template_content = f.read()
|
template_content = f.read()
|
||||||
|
|
||||||
# Remove existing x-shared-env: &shared-api-worker-env lines
|
# Remove existing x-shared-env: &shared-api-worker-env lines
|
||||||
@@ -69,7 +69,7 @@ def insert_shared_env(template_path, output_path, shared_env_block, header_comme
|
|||||||
# Prepare the final content with header comments and shared env block
|
# Prepare the final content with header comments and shared env block
|
||||||
final_content = f"{header_comments}\n{shared_env_block}\n\n{template_content}"
|
final_content = f"{header_comments}\n{shared_env_block}\n\n{template_content}"
|
||||||
|
|
||||||
with open(output_path, "w") as f:
|
with open(output_path, "w", encoding="utf-8") as f:
|
||||||
f.write(final_content)
|
f.write(final_content)
|
||||||
print(f"Generated {output_path}")
|
print(f"Generated {output_path}")
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,33 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# IRIS configuration flag file
|
# IRIS configuration flag file (stored in durable directory to persist with data)
|
||||||
IRIS_CONFIG_DONE="/opt/iris/.iris-configured"
|
IRIS_CONFIG_DONE="/durable/.iris-configured"
|
||||||
|
|
||||||
|
# Function to wait for IRIS to be ready
|
||||||
|
wait_for_iris() {
|
||||||
|
echo "Waiting for IRIS to be ready..."
|
||||||
|
local max_attempts=30
|
||||||
|
local attempt=1
|
||||||
|
while [ "$attempt" -le "$max_attempts" ]; do
|
||||||
|
if iris qlist IRIS 2>/dev/null | grep -q "running"; then
|
||||||
|
echo "IRIS is ready."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
echo "Attempt $attempt/$max_attempts: IRIS not ready yet, waiting..."
|
||||||
|
sleep 2
|
||||||
|
attempt=$((attempt + 1))
|
||||||
|
done
|
||||||
|
echo "ERROR: IRIS failed to start within expected time." >&2
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
# Function to configure IRIS
|
# Function to configure IRIS
|
||||||
configure_iris() {
|
configure_iris() {
|
||||||
echo "Configuring IRIS for first-time setup..."
|
echo "Configuring IRIS for first-time setup..."
|
||||||
|
|
||||||
# Wait for IRIS to be fully started
|
# Wait for IRIS to be fully started
|
||||||
sleep 5
|
wait_for_iris
|
||||||
|
|
||||||
# Execute the initialization script
|
# Execute the initialization script
|
||||||
iris session IRIS < /iris-init.script
|
iris session IRIS < /iris-init.script
|
||||||
|
|||||||
Reference in New Issue
Block a user