diff --git a/backend/application/workflow/init.go b/backend/application/workflow/init.go index 2b14b587..a7f96e1a 100644 --- a/backend/application/workflow/init.go +++ b/backend/application/workflow/init.go @@ -23,6 +23,7 @@ import ( "gorm.io/gorm" "github.com/cloudwego/eino/callbacks" + "github.com/coze-dev/coze-studio/backend/application/internal" wfdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/database" diff --git a/backend/domain/workflow/service/global_handler.go b/backend/domain/workflow/service/global_handler.go index 8367203f..ee7a5168 100644 --- a/backend/domain/workflow/service/global_handler.go +++ b/backend/domain/workflow/service/global_handler.go @@ -18,6 +18,7 @@ package service import ( "github.com/cloudwego/eino/callbacks" + "github.com/coze-dev/coze-studio/backend/domain/workflow/internal/execute" ) diff --git a/backend/main.go b/backend/main.go index 1e6d0cdb..55f1c355 100755 --- a/backend/main.go +++ b/backend/main.go @@ -161,6 +161,7 @@ func setCrashOutput() { debug.SetCrashOutput(crashFile, debug.CrashOptions{}) } +// TODO: remove me later func asyncStartMinioProxyServer(ctx context.Context) { storageType := getEnv(consts.StorageType, "minio") proxyURL := getEnv(consts.MinIOAPIHost, "http://localhost:9000") diff --git a/docker/.env.debug.example b/docker/.env.debug.example index 98da5c63..cfe0af9f 100644 --- a/docker/.env.debug.example +++ b/docker/.env.debug.example @@ -6,7 +6,7 @@ export LISTEN_ADDR=":8888" export LOG_LEVEL="debug" export MAX_REQUEST_BODY_SIZE=1073741824 export SERVER_HOST="localhost${LISTEN_ADDR}" -export MINIO_PROXY_ENDPOINT=":8889" +export MINIO_PROXY_ENDPOINT="" export USE_SSL="0" export SSL_CERT_FILE="" export SSL_KEY_FILE="" diff --git a/docker/nginx/conf.d/default.conf b/docker/nginx/conf.d/default.conf index 43d2fdbb..8f67b611 100644 --- a/docker/nginx/conf.d/default.conf +++ b/docker/nginx/conf.d/default.conf @@ -24,6 +24,25 @@ server { # SSL/TLS settings proxy_ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; proxy_ssl_verify off; + + + sub_filter ':8889' ':8888/local_storage'; + sub_filter 'minio:9000' '$http_host/local_storage'; + sub_filter_once off; + sub_filter_types 'application/json'; + } + + location /local_storage/ { + if ($args ~* "(^|.*&)x-wf-file_name=[^&]*(&.*|$)") { + set $args $1$2; + } + if ($args ~* "^x-wf-file_name=[^&]*$") { + set $args ""; + } + + rewrite ^/local_storage/(.*)$ /$1 break; + proxy_pass http://minio:9000; + proxy_set_header Host minio:9000; } } @@ -62,4 +81,4 @@ server { # proxy_ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; # proxy_ssl_verify off; # } -# } \ No newline at end of file +# } \ No newline at end of file diff --git a/helm/charts/opencoze/values.yaml b/helm/charts/opencoze/values.yaml index b08a6fba..a952c843 100644 --- a/helm/charts/opencoze/values.yaml +++ b/helm/charts/opencoze/values.yaml @@ -43,7 +43,7 @@ cozeServer: repository: opencoze/opencoze # -- Keep the mirror up to date pullPolicy: Always - tag: 'latest' + tag: '0.3.9' service: type: LoadBalancer