feat(ci): use nginx for minio proxy (#605)
This commit is contained in:
parent
fa0daada8a
commit
a179748877
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ package service
|
|||
|
||||
import (
|
||||
"github.com/cloudwego/eino/callbacks"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow/internal/execute"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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=""
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue