feat(ci): 1. remove docker proxy. 2. split debug and docker environment (#304)

This commit is contained in:
Ryo
2025-07-30 21:56:26 +08:00
committed by GitHub
parent 7ff025eef5
commit 357da72a52
21 changed files with 605 additions and 304 deletions

View File

@ -10,12 +10,6 @@ RUN apk add --no-cache git gcc libc-dev
COPY backend/go.mod backend/go.sum ./
RUN go mod download
COPY docker/proxy ./proxy
# Build the proxy application
RUN go build -ldflags="-s -w" -o /app/proxy_app ./proxy/proxy.go
# Copy the entire backend source code
COPY backend/ ./
@ -50,7 +44,6 @@ RUN apk add --no-cache --virtual .python-build-deps build-base py3-pip git && \
# Copy the built Go binary from the builder stage
COPY --from=builder /app/opencoze /app/opencoze
COPY --from=builder /app/proxy_app /app/proxy
# Copy Python application scripts
COPY backend/infra/impl/document/parser/builtin/parse_pdf.py /app/parse_pdf.py
@ -74,8 +67,6 @@ ENV PATH="/app/.venv/bin:${PATH}"
RUN chmod +x /app/parse_pdf.py /app/parse_docx.py && \
find /app/.venv/bin -type f -exec chmod +x {} \;
# Ensure Go binaries are executable
RUN chmod +x /app/opencoze /app/proxy
EXPOSE 8888

View File

@ -20,11 +20,11 @@ import (
"net/http"
"strconv"
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
"github.com/getkin/kin-openapi/openapi3"
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
"github.com/coze-dev/coze-studio/backend/types/errno"
)

View File

@ -28,8 +28,9 @@ import (
"github.com/cloudwego/eino-ext/components/model/ollama"
mo "github.com/cloudwego/eino-ext/components/model/openai"
"github.com/cloudwego/eino-ext/components/model/qwen"
"github.com/coze-dev/coze-studio/backend/infra/contract/chatmodel"
"google.golang.org/genai"
"github.com/coze-dev/coze-studio/backend/infra/contract/chatmodel"
)
func GetBuiltinChatModel(ctx context.Context, envPrefix string) (bcm chatmodel.BaseChatModel, configured bool, err error) {

View File

@ -30,13 +30,12 @@ import (
"github.com/cloudwego/eino-ext/components/embedding/openai"
"github.com/cloudwego/eino/components/prompt"
"github.com/cloudwego/eino/schema"
"github.com/coze-dev/coze-studio/backend/application/internal"
"github.com/coze-dev/coze-studio/backend/infra/impl/embedding/http"
"github.com/milvus-io/milvus/client/v2/milvusclient"
"github.com/volcengine/volc-sdk-golang/service/vikingdb"
"github.com/volcengine/volc-sdk-golang/service/visual"
"gorm.io/gorm"
"github.com/coze-dev/coze-studio/backend/application/internal"
"github.com/coze-dev/coze-studio/backend/application/search"
knowledgeImpl "github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
"github.com/coze-dev/coze-studio/backend/infra/contract/cache"
@ -59,6 +58,7 @@ import (
ssmilvus "github.com/coze-dev/coze-studio/backend/infra/impl/document/searchstore/milvus"
ssvikingdb "github.com/coze-dev/coze-studio/backend/infra/impl/document/searchstore/vikingdb"
arkemb "github.com/coze-dev/coze-studio/backend/infra/impl/embedding/ark"
"github.com/coze-dev/coze-studio/backend/infra/impl/embedding/http"
"github.com/coze-dev/coze-studio/backend/infra/impl/embedding/wrap"
"github.com/coze-dev/coze-studio/backend/infra/impl/eventbus"
builtinM2Q "github.com/coze-dev/coze-studio/backend/infra/impl/messages2query/builtin"

View File

@ -20,11 +20,12 @@ import (
"context"
"github.com/cloudwego/eino/compose"
"github.com/coze-dev/coze-studio/backend/application/internal"
"github.com/coze-dev/coze-studio/backend/pkg/logs"
"github.com/redis/go-redis/v9"
"gorm.io/gorm"
"github.com/coze-dev/coze-studio/backend/application/internal"
"github.com/coze-dev/coze-studio/backend/pkg/logs"
wfdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/database"
wfknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/knowledge"
wfmodel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model"

View File

@ -27,10 +27,10 @@ type Client = redis.Client
func New() *redis.Client {
addr := os.Getenv("REDIS_ADDR")
password := os.Getenv("REDIS_PASSWORD")
password := os.Getenv("REDIS_PASSWORD")
rdb := redis.NewClient(&redis.Options{
Addr: addr, // Redis地址
DB: 0, // 默认数据库
Addr: addr, // Redis地址
DB: 0, // 默认数据库
Password: password,
// 连接池配置
PoolSize: 100, // 最大连接数建议设置为CPU核心数*10

View File

@ -25,6 +25,7 @@ import (
"time"
opt "github.com/cloudwego/eino/components/embedding"
"github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
"github.com/coze-dev/coze-studio/backend/infra/contract/embedding"

View File

@ -1,14 +1,11 @@
#!/bin/sh
echo "Bootstrapping Coze Studio... 07-30"
# Set up Elasticsearch
echo "Setting up Elasticsearch..."
/app/setup_es.sh --index-dir /app/es_index_schemas
# Start the proxy application in the background
echo "Starting proxy application..."
/app/proxy >/tmp/proxy.log 2>&1 &
echo "Proxy application started in background."
# Start the main application in the foreground
echo "Starting main application..."
/app/opencoze