diff --git a/README.md b/README.md index c225a0eea8..c8ca403e75 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,10 @@ Deployment steps: # Start the service cd docker cp .env.example .env + + # if you want to deploy with private docker registry, uncomment the line with `REGISTRY`, + # and set `REGISTRY` with your private docker registry without trailing slash. + docker compose up -d ``` For common startup failure issues, **please refer to the [FAQ](https://github.com/coze-dev/coze-studio/wiki/9.-FAQ)**. diff --git a/README.zh_CN.md b/README.zh_CN.md index f81895955a..08d2b196eb 100644 --- a/README.zh_CN.md +++ b/README.zh_CN.md @@ -72,6 +72,8 @@ Coze Studio 的后端采用 Golang 开发,前端使用 React + TypeScript, # 启动服务 cd docker cp .env.example .env + + # 如果希望使用私有镜像仓库,取消`REGISTRY`行注释,同时把`REGISTRY`设置成私有镜像仓库地址,注意私有镜像仓库地址结尾不带`/` docker compose up -d ``` **启动失败常见问题可参考[常见问题](https://github.com/coze-dev/coze-studio/wiki/9.-%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)**。 diff --git a/docker/.env.debug.example b/docker/.env.debug.example index 131461ede3..357c8853ff 100644 --- a/docker/.env.debug.example +++ b/docker/.env.debug.example @@ -241,3 +241,7 @@ export PLUGIN_AES_STATE_SECRET='osj^kfhsd*(z!sno' # PLUGIN_AES_OAUTH_TOKEN_SECRET is the secret of used to encrypt oauth refresh token and access token. # The size of secret must be 16, 24 or 32 bytes. export PLUGIN_AES_OAUTH_TOKEN_SECRET='cn+$PJ(HhJ[5d*z9' + +# Pull docker image from your private registry +# Uncomment this env, if you need to switch public registry to private registry +# export REGISTRY="{your private registry}" \ No newline at end of file diff --git a/docker/.env.example b/docker/.env.example index 3f739cf318..f1372df25f 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -238,4 +238,8 @@ export PLUGIN_AES_AUTH_SECRET='^*6x3hdu2nc%-p38' export PLUGIN_AES_STATE_SECRET='osj^kfhsd*(z!sno' # PLUGIN_AES_OAUTH_TOKEN_SECRET is the secret of used to encrypt oauth refresh token and access token. # The size of secret must be 16, 24 or 32 bytes. -export PLUGIN_AES_OAUTH_TOKEN_SECRET='cn+$PJ(HhJ[5d*z9' \ No newline at end of file +export PLUGIN_AES_OAUTH_TOKEN_SECRET='cn+$PJ(HhJ[5d*z9' + +# Pull docker image from your private registry +# Uncomment this env, if you need to switch public registry to private registry +# export REGISTRY="{your private registry}" \ No newline at end of file diff --git a/docker/docker-compose-debug.yml b/docker/docker-compose-debug.yml index 81d901d148..c397339d78 100755 --- a/docker/docker-compose-debug.yml +++ b/docker/docker-compose-debug.yml @@ -5,7 +5,7 @@ x-env-file: &env_file services: mysql: - image: mysql:8.4.5 + image: "${REGISTRY:-docker.io}/mysql:8.4.5" container_name: coze-mysql environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root} @@ -40,7 +40,7 @@ services: - coze-network redis: - image: bitnami/redis:8.0 + image: "${REGISTRY:-docker.io}/bitnami/redis:8.0" container_name: coze-redis user: root privileged: true @@ -184,7 +184,7 @@ services: # start_period: 10s elasticsearch: - image: bitnami/elasticsearch:8.18.0 + image: "${REGISTRY:-docker.io}/bitnami/elasticsearch:8.18.0" container_name: coze-elasticsearch user: root privileged: true @@ -271,7 +271,7 @@ services: " minio: - image: minio/minio:RELEASE.2025-06-13T11-33-47Z-cpuv1 + image: "${REGISTRY:-docker.io}/minio/minio:RELEASE.2025-06-13T11-33-47Z-cpuv1" container_name: coze-minio user: root privileged: true @@ -301,7 +301,7 @@ services: - coze-network etcd: - image: bitnami/etcd:3.5 + image: "${REGISTRY:-docker.io}/bitnami/etcd:3.5" container_name: coze-etcd user: root privileged: true @@ -338,7 +338,7 @@ services: milvus: container_name: coze-milvus - image: milvusdb/milvus:v2.5.10 + image: "${REGISTRY:-docker.io}/milvusdb/milvus:v2.5.10" user: root privileged: true profiles: ['middleware'] @@ -380,7 +380,7 @@ services: networks: - coze-network nsqlookupd: - image: nsqio/nsq:v1.2.1 + image: "${REGISTRY:-docker.io}/nsqio/nsq:v1.2.1" container_name: coze-nsqlookupd command: /nsqlookupd profiles: ['middleware'] @@ -397,7 +397,7 @@ services: start_period: 10s nsqd: - image: nsqio/nsq:v1.2.1 + image: "${REGISTRY:-docker.io}/nsqio/nsq:v1.2.1" container_name: coze-nsqd command: /nsqd --lookupd-tcp-address=coze-nsqlookupd:4160 --broadcast-address=coze-nsqd profiles: ['middleware'] @@ -417,7 +417,7 @@ services: start_period: 10s nsqadmin: - image: nsqio/nsq:v1.2.1 + image: "${REGISTRY:-docker.io}/nsqio/nsq:v1.2.1" container_name: coze-nsqadmin command: /nsqadmin --lookupd-http-address=coze-nsqlookupd:4161 profiles: ['middleware'] @@ -430,7 +430,7 @@ services: - coze-network minio-setup: - image: minio/mc:RELEASE.2025-05-21T01-59-54Z-cpuv1 + image: "${REGISTRY:-docker.io}/minio/mc:RELEASE.2025-05-21T01-59-54Z-cpuv1" container_name: coze-minio-setup profiles: ['middleware'] env_file: *env_file @@ -453,7 +453,7 @@ services: restart: 'no' mysql-setup-schema: - image: arigaio/atlas:0.35.0-community-alpine + image: "${REGISTRY:-docker.io}/arigaio/atlas:0.35.0-community-alpine" container_name: coze-mysql-setup-schema profiles: ['middleware', 'mysql-setup', 'run-server'] env_file: *env_file @@ -491,7 +491,7 @@ services: networks: - coze-network mysql-setup-init-sql: - image: mysql:8.4.5 + image: "${REGISTRY:-docker.io}/mysql:8.4.5" container_name: coze-mysql-setup-init-sql profiles: ['middleware', 'mysql-setup', 'run-server', 'volcano-setup'] env_file: *env_file @@ -529,7 +529,7 @@ services: build: context: ../ dockerfile: backend/Dockerfile - image: opencoze/opencoze:latest + image: "${REGISTRY:-docker.io}/opencoze/opencoze:latest" profiles: ['build-server'] networks: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index f6a80d8d05..c016aabdc8 100755 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -4,7 +4,7 @@ x-env-file: &env_file services: mysql: - image: mysql:8.4.5 + image: "${REGISTRY:-docker.io}/mysql:8.4.5" container_name: coze-mysql restart: always environment: @@ -40,7 +40,7 @@ services: - coze-network redis: - image: bitnami/redis:8.0 + image: "${REGISTRY:-docker.io}/bitnami/redis:8.0" container_name: coze-redis restart: always user: root @@ -73,7 +73,7 @@ services: networks: - coze-network elasticsearch: - image: bitnami/elasticsearch:8.18.0 + image: "${REGISTRY:-docker.io}/bitnami/elasticsearch:8.18.0" container_name: coze-elasticsearch restart: always user: root @@ -160,7 +160,7 @@ services: " minio: - image: minio/minio:RELEASE.2025-06-13T11-33-47Z-cpuv1 + image: "${REGISTRY:-docker.io}/minio/minio:RELEASE.2025-06-13T11-33-47Z-cpuv1" container_name: coze-minio user: root privileged: true @@ -213,7 +213,7 @@ services: - coze-network etcd: - image: bitnami/etcd:3.5 + image: "${REGISTRY:-docker.io}/bitnami/etcd:3.5" container_name: coze-etcd user: root restart: always @@ -250,7 +250,7 @@ services: milvus: container_name: coze-milvus - image: milvusdb/milvus:v2.5.10 + image: "${REGISTRY:-docker.io}/milvusdb/milvus:v2.5.10" user: root privileged: true restart: always @@ -292,7 +292,7 @@ services: networks: - coze-network nsqlookupd: - image: nsqio/nsq:v1.2.1 + image: "${REGISTRY:-docker.io}/nsqio/nsq:v1.2.1" container_name: coze-nsqlookupd command: /nsqlookupd restart: always @@ -309,7 +309,7 @@ services: start_period: 10s nsqd: - image: nsqio/nsq:v1.2.1 + image: "${REGISTRY:-docker.io}/nsqio/nsq:v1.2.1" container_name: coze-nsqd command: /nsqd --lookupd-tcp-address=nsqlookupd:4160 --broadcast-address=nsqd restart: always @@ -329,7 +329,7 @@ services: start_period: 10s nsqadmin: - image: nsqio/nsq:v1.2.1 + image: "${REGISTRY:-docker.io}/nsqio/nsq:v1.2.1" container_name: coze-nsqadmin command: /nsqadmin --lookupd-http-address=nsqlookupd:4161 restart: always @@ -345,7 +345,7 @@ services: # build: # context: ../ # dockerfile: backend/Dockerfile - image: cozedev/coze-studio-server:latest + image: "${REGISTRY:-docker.io}/cozedev/coze-studio-server:latest" restart: always container_name: coze-server env_file: *env_file @@ -377,7 +377,7 @@ services: # build: # context: .. # dockerfile: frontend/Dockerfile - image: cozedev/coze-studio-web:latest + image: "${REGISTRY:-docker.io}/cozedev/coze-studio-web:latest" container_name: coze-web restart: always ports: