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
20 changes: 11 additions & 9 deletions apps/coze/.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
W9_REPO="cozedev/coze-studio-web"
W9_DIST='community'
W9_VERSION='0.5.0'
W9_POWER_PASSWORD='O65nn!lZjuCT4Ygn'
W9_VERSION='latest'
W9_POWER_PASSWORD='X!hGDR4DZXugFYa7'

W9_RCODE='VcGrEr0B698zk'

# Environments which for user settings when create application
# Named expression: W9_xxx_xxx_SET, xxx refer to file fields
Expand Down Expand Up @@ -40,10 +42,10 @@ MYSQL_DSN="${MYSQL_USER}:${MYSQL_PASSWORD}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/${MY
ATLAS_URL="mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DATABASE}?charset=utf8mb4&parseTime=True"

# Redis
REDIS_ADDR="redis:6379"
REDIS_ADDR="${W9_ID}-redis:6379"

# Elasticsearch
ES_ADDR="http://elasticsearch:9200"
ES_ADDR="http://${W9_ID}-elasticsearch:9200"
ES_VERSION="v8"

# Storage - MinIO
Expand All @@ -56,17 +58,17 @@ MINIO_ROOT_PASSWORD=$W9_POWER_PASSWORD
MINIO_DEFAULT_BUCKETS="milvus"
MINIO_AK=$MINIO_ROOT_USER
MINIO_SK=$MINIO_ROOT_PASSWORD
MINIO_ENDPOINT="minio:9000"
MINIO_ENDPOINT="${W9_RCODE}minio:9000"
MINIO_API_HOST="http://${MINIO_ENDPOINT}"
export MINIO_USE_SSL=false
MINIO_USE_SSL=false

# Vector Store - Milvus
VECTOR_STORE_TYPE="milvus"
MILVUS_ADDR="milvus:19530"
MILVUS_ADDR="${W9_ID}-milvus:19530"

# Message Queue - NSQ
COZE_MQ_TYPE="nsq"
MQ_NAME_SERVER="nsqd:4150"
MQ_NAME_SERVER="${W9_ID}-nsqd:4150"

# Embedding Configuration (required for knowledge base)
EMBEDDING_TYPE="ark"
Expand All @@ -77,7 +79,7 @@ ARK_EMBEDDING_DIMS="2048" # (int, required) Ark embedding dimensions
ARK_EMBEDDING_API_TYPE="" # (string, optional) Ark embedding api type, should be "text_api" / "multi_modal_api". Default "text_api".

# Model Configuration for Agent & Workflow
MODEL_PROTOCOL_0=""
MODEL_PROTOCOL_0="ark"
MODEL_OPENCOZE_ID_0="100001"
MODEL_NAME_0=""
MODEL_ID_0=""
Expand Down
23 changes: 16 additions & 7 deletions apps/coze/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ services:
minio:
image: minio/minio:RELEASE.2025-06-13T11-33-47Z-cpuv1
container_name: $W9_ID-minio
hostname: ${W9_RCODE}minio
restart: unless-stopped
env_file: .env
environment:
Expand Down Expand Up @@ -230,6 +231,7 @@ services:
etcd:
image: bitnamilegacy/etcd:3.5
container_name: $W9_ID-etcd
hostname: ${W9_RCODE}etcd
restart: unless-stopped
env_file: .env
environment:
Expand Down Expand Up @@ -272,8 +274,8 @@ services:
- seccomp:unconfined
env_file: .env
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
ETCD_ENDPOINTS: ${W9_RCODE}etcd:2379
MINIO_ADDRESS: ${W9_RCODE}minio:9000
MINIO_BUCKET_NAME: ${MINIO_DEFAULT_BUCKETS:-milvus}
MINIO_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-minioadmin}
MINIO_SECRET_ACCESS_KEY: $W9_POWER_PASSWORD
Expand Down Expand Up @@ -309,7 +311,7 @@ services:
image: nsqio/nsq:v1.2.1
container_name: $W9_ID-nsqd
restart: unless-stopped
command: /nsqd --lookupd-tcp-address=nsqlookupd:4160 --broadcast-address=nsqd
command: /nsqd --lookupd-tcp-address=$W9_ID-nsqlookupd:4160 --broadcast-address=nsqd
healthcheck:
test: ["CMD-SHELL", "/nsqd --version"]
interval: 5s
Expand All @@ -323,14 +325,14 @@ services:
nsqadmin:
image: nsqio/nsq:v1.2.1
container_name: $W9_ID-nsqadmin
command: /nsqadmin --lookupd-http-address=nsqlookupd:4161
command: /nsqadmin --lookupd-http-address=$W9_ID-nsqlookupd:4161
restart: unless-stopped
depends_on:
nsqlookupd:
condition: service_healthy

coze-server:
image: cozedev/coze-studio-server:${W9_VERSION}
image: cozedev/coze-studio-server:latest
container_name: $W9_ID-server
restart: unless-stopped
env_file: .env
Expand All @@ -351,15 +353,22 @@ services:
condition: service_healthy

coze-web:
image: ${W9_REPO}:${W9_VERSION}
image: cozedev/coze-studio-web:latest
container_name: $W9_ID
restart: unless-stopped
env_file: .env
environment:
W9_RCODE: $W9_RCODE
ports:
- $W9_HTTP_PORT_SET:80
volumes:
- ./src/nginx/nginx.conf:/etc/nginx/nginx.conf:ro # Main nginx config
- ./src/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf:ro # Proxy config
- ./src/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf.template
command: >
sh -c "
envsubst '$${W9_RCODE}' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf &&
nginx -g 'daemon off;'
"
depends_on:
- coze-server

Expand Down
6 changes: 3 additions & 3 deletions apps/coze/src/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ server {


sub_filter ':8889' ':8888/local_storage';
sub_filter 'minio:9000' '$http_host/local_storage';
sub_filter '${W9_RCODE}minio:9000' '$http_host/local_storage';
sub_filter_once off;
sub_filter_types 'application/json' 'text/event-stream';
}
Expand All @@ -52,8 +52,8 @@ server {
}

rewrite ^/local_storage/(.*)$ /$1 break;
proxy_pass http://minio:9000;
proxy_set_header Host minio:9000;
proxy_pass http://${W9_RCODE}minio:9000;
proxy_set_header Host ${W9_RCODE}minio:9000;
}
}

Expand Down