feat(ci): Remove the dependency on the setup Docker image. (#352)
This commit is contained in:
4
Makefile
4
Makefile
@@ -77,10 +77,10 @@ dump_sql_schema:
|
|||||||
@echo "Dumping mysql schema to $(MYSQL_SCHEMA)..."
|
@echo "Dumping mysql schema to $(MYSQL_SCHEMA)..."
|
||||||
@. $(ENV_FILE); \
|
@. $(ENV_FILE); \
|
||||||
{ echo "SET NAMES utf8mb4;\nCREATE DATABASE IF NOT EXISTS opencoze COLLATE utf8mb4_unicode_ci;"; atlas schema inspect -u $$ATLAS_URL --format "{{ sql . }}" --exclude "atlas_schema_revisions,table_*" | sed 's/CREATE TABLE/CREATE TABLE IF NOT EXISTS/g'; } > $(MYSQL_SCHEMA)
|
{ echo "SET NAMES utf8mb4;\nCREATE DATABASE IF NOT EXISTS opencoze COLLATE utf8mb4_unicode_ci;"; atlas schema inspect -u $$ATLAS_URL --format "{{ sql . }}" --exclude "atlas_schema_revisions,table_*" | sed 's/CREATE TABLE/CREATE TABLE IF NOT EXISTS/g'; } > $(MYSQL_SCHEMA)
|
||||||
@sed -I '' -E 's/(\))[[:space:]]+CHARSET utf8mb4/\1 ENGINE=InnoDB CHARSET utf8mb4/' $(MYSQL_SCHEMA)
|
@sed -i.bak -E 's/(\))[[:space:]]+CHARSET utf8mb4/\1 ENGINE=InnoDB CHARSET utf8mb4/' $(MYSQL_SCHEMA) && rm -f $(MYSQL_SCHEMA).bak
|
||||||
|
@cat $(MYSQL_INIT_SQL) >> $(MYSQL_SCHEMA)
|
||||||
@echo "Dumping mysql schema to helm/charts/opencoze/files/mysql ..."
|
@echo "Dumping mysql schema to helm/charts/opencoze/files/mysql ..."
|
||||||
@cp $(MYSQL_SCHEMA) ./helm/charts/opencoze/files/mysql/
|
@cp $(MYSQL_SCHEMA) ./helm/charts/opencoze/files/mysql/
|
||||||
@cp $(MYSQL_INIT_SQL) ./helm/charts/opencoze/files/mysql/
|
|
||||||
|
|
||||||
atlas-hash:
|
atlas-hash:
|
||||||
@echo "Rehash atlas migration files..."
|
@echo "Rehash atlas migration files..."
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ Deployment steps:
|
|||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
docker compose --profile "*" up -d
|
docker compose --profile "*" up -d
|
||||||
```
|
```
|
||||||
After the service starts, it is normal for the `coze-minio-setup` , `coze-mysql-setup-init-sql` , and `coze-mysql-setup-schema` containers to be in an exited state (exit 0). For common startup failure issues, **please refer to the [FAQ](https://github.com/coze-dev/coze-studio/wiki/9.-FAQ)**.
|
For common startup failure issues, **please refer to the [FAQ](https://github.com/coze-dev/coze-studio/wiki/9.-FAQ)**.
|
||||||
4. After starting the service, you can open Coze Studio by accessing `http://localhost:8888/` through your browser.
|
4. After starting the service, you can open Coze Studio by accessing `http://localhost:8888/` through your browser.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ Coze Studio 的后端采用 Golang 开发,前端使用 React + TypeScript,
|
|||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
docker compose --profile "*" up -d
|
docker compose --profile "*" up -d
|
||||||
```
|
```
|
||||||
服务启动之后`coze-minio-setup`、`coze-mysql-setup-init-sql`、`coze-mysql-setup-schema` 这几个容器处于退出状态(exit 0),是正常现象。**启动失败常见问题可参考[常见问题](https://github.com/coze-dev/coze-studio/wiki/9.-%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)**。
|
**启动失败常见问题可参考[常见问题](https://github.com/coze-dev/coze-studio/wiki/9.-%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)**。
|
||||||
|
|
||||||
4. 启动服务后,通过浏览器访问 `http://localhost:8888/` 即可打开 Coze Studio。
|
4. 启动服务后,通过浏览器访问 `http://localhost:8888/` 即可打开 Coze Studio。
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ services:
|
|||||||
mysql:
|
mysql:
|
||||||
image: mysql:8.4.5
|
image: mysql:8.4.5
|
||||||
container_name: coze-mysql
|
container_name: coze-mysql
|
||||||
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root}
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root}
|
||||||
MYSQL_DATABASE: ${MYSQL_DATABASE:-opencoze}
|
MYSQL_DATABASE: ${MYSQL_DATABASE:-opencoze}
|
||||||
@@ -16,6 +17,7 @@ services:
|
|||||||
- '3306:3306'
|
- '3306:3306'
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/mysql:/var/lib/mysql
|
- ./data/mysql:/var/lib/mysql
|
||||||
|
- ./volumes/mysql/schema.sql:/docker-entrypoint-initdb.d/init.sql
|
||||||
command:
|
command:
|
||||||
- --character-set-server=utf8mb4
|
- --character-set-server=utf8mb4
|
||||||
- --collation-server=utf8mb4_unicode_ci
|
- --collation-server=utf8mb4_unicode_ci
|
||||||
@@ -40,6 +42,7 @@ services:
|
|||||||
redis:
|
redis:
|
||||||
image: bitnami/redis:8.0
|
image: bitnami/redis:8.0
|
||||||
container_name: coze-redis
|
container_name: coze-redis
|
||||||
|
restart: always
|
||||||
user: root
|
user: root
|
||||||
privileged: true
|
privileged: true
|
||||||
profiles: ['middleware']
|
profiles: ['middleware']
|
||||||
@@ -62,13 +65,6 @@ services:
|
|||||||
|
|
||||||
exec /opt/bitnami/scripts/redis/entrypoint.sh /opt/bitnami/scripts/redis/run.sh
|
exec /opt/bitnami/scripts/redis/entrypoint.sh /opt/bitnami/scripts/redis/run.sh
|
||||||
"
|
"
|
||||||
depends_on:
|
|
||||||
minio-setup:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
mysql-setup-schema:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
mysql-setup-init-sql:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'redis-cli', 'ping']
|
test: ['CMD', 'redis-cli', 'ping']
|
||||||
interval: 5s
|
interval: 5s
|
||||||
@@ -77,113 +73,10 @@ services:
|
|||||||
start_period: 10s
|
start_period: 10s
|
||||||
networks:
|
networks:
|
||||||
- coze-network
|
- coze-network
|
||||||
|
|
||||||
# rocketmq-namesrv:
|
|
||||||
# image: apache/rocketmq:5.3.2
|
|
||||||
# container_name: coze-rocketmq-namesrv
|
|
||||||
# privileged: true
|
|
||||||
# user: root
|
|
||||||
# profiles: ['middleware']
|
|
||||||
# env_file: *env_file
|
|
||||||
# ports:
|
|
||||||
# - '9876:9876'
|
|
||||||
# volumes:
|
|
||||||
# - ./data/rocketmq/namesrv/logs:/home/rocketmq/logs:rw,Z
|
|
||||||
# - ./data/rocketmq/namesrv/store:/home/rocketmq/store:rw,Z
|
|
||||||
# environment:
|
|
||||||
# - ALLOW_ANONYMOUS_LOGIN=yes
|
|
||||||
# command: >
|
|
||||||
# bash -c "
|
|
||||||
# # Set proper permissions for data directories
|
|
||||||
# mkdir -p /home/rocketmq/logs /home/rocketmq/store
|
|
||||||
# mkdir -p /home/rocketmq/logs/rocketmqlogs
|
|
||||||
# touch /home/rocketmq/logs/rocketmqlogs/tools.log
|
|
||||||
# touch /home/rocketmq/logs/rocketmqlogs/tools_default.log
|
|
||||||
|
|
||||||
# chown -R rocketmq:rocketmq /home/rocketmq/logs /home/rocketmq/store
|
|
||||||
# chmod g+s /home/rocketmq/logs /home/rocketmq/store
|
|
||||||
|
|
||||||
# echo 'Starting RocketMQ NameServer...'
|
|
||||||
# sh mqnamesrv
|
|
||||||
# "
|
|
||||||
# healthcheck:
|
|
||||||
# test: ['CMD', 'sh', 'mqadmin', 'clusterList', '-n', 'localhost:9876']
|
|
||||||
# interval: 5s
|
|
||||||
# timeout: 10s
|
|
||||||
# retries: 10
|
|
||||||
# start_period: 10s
|
|
||||||
# networks:
|
|
||||||
# - coze-network
|
|
||||||
# rocketmq-broker:
|
|
||||||
# image: apache/rocketmq:5.3.2
|
|
||||||
# container_name: coze-rocketmq-broker
|
|
||||||
# privileged: true
|
|
||||||
# user: root
|
|
||||||
# profiles: ['middleware']
|
|
||||||
# env_file: *env_file
|
|
||||||
# ports:
|
|
||||||
# - '10909:10909'
|
|
||||||
# - '10911:10911'
|
|
||||||
# - '10912:10912'
|
|
||||||
# volumes:
|
|
||||||
# - ./data/rocketmq/broker/logs:/home/rocketmq/logs:rw,Z
|
|
||||||
# - ./data/rocketmq/broker/store:/home/rocketmq/store:rw,Z
|
|
||||||
# - ./volumes/rocketmq/broker.conf:/home/rocketmq/conf/broker.conf:rw,Z
|
|
||||||
# networks:
|
|
||||||
# - coze-network
|
|
||||||
# command: >
|
|
||||||
# bash -c '
|
|
||||||
# # Set proper permissions
|
|
||||||
# mkdir -p /home/rocketmq/logs/rocketmqlogs /home/rocketmq/store
|
|
||||||
# touch /home/rocketmq/logs/rocketmqlogs/tools.log \
|
|
||||||
# /home/rocketmq/logs/rocketmqlogs/tools_default.log
|
|
||||||
# chown -R rocketmq:rocketmq /home/rocketmq/logs /home/rocketmq/store
|
|
||||||
# chmod g+s /home/rocketmq/logs /home/rocketmq/store
|
|
||||||
|
|
||||||
# echo "Starting RocketMQ Broker..."
|
|
||||||
# sh mqbroker -n rocketmq-namesrv:9876 -c /home/rocketmq/conf/broker.conf &
|
|
||||||
|
|
||||||
# echo "Waiting for Broker registration..."
|
|
||||||
# broker_ready=false
|
|
||||||
# for i in {1..60}; do
|
|
||||||
# if sh mqadmin clusterList -n rocketmq-namesrv:9876 \
|
|
||||||
# | grep -q "DefaultCluster.*broker-a"; then
|
|
||||||
# echo "Registered."
|
|
||||||
# broker_ready=true
|
|
||||||
# break
|
|
||||||
# fi
|
|
||||||
# echo "Not ready, retry $$i/60..."
|
|
||||||
# sleep 1
|
|
||||||
# done
|
|
||||||
|
|
||||||
# if [ "$$broker_ready" = false ]; then
|
|
||||||
# echo "ERROR: registration timed out."
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# echo "Creating topics..."
|
|
||||||
# for t in opencoze_knowledge opencoze_search_app opencoze_search_resource \
|
|
||||||
# %RETRY%cg_knowledge %RETRY%cg_search_app %RETRY%cg_search_resource; do
|
|
||||||
# sh mqadmin updateTopic -n rocketmq-namesrv:9876 \
|
|
||||||
# -c DefaultCluster -t "$$t"
|
|
||||||
# done
|
|
||||||
|
|
||||||
# touch /tmp/rocketmq_ready
|
|
||||||
# echo "Broker started successfully."
|
|
||||||
# wait
|
|
||||||
# '
|
|
||||||
# depends_on:
|
|
||||||
# - rocketmq-namesrv
|
|
||||||
# healthcheck:
|
|
||||||
# test: ['CMD-SHELL', '[ -f /tmp/rocketmq_ready ]']
|
|
||||||
# interval: 10s
|
|
||||||
# timeout: 10s
|
|
||||||
# retries: 10
|
|
||||||
# start_period: 10s
|
|
||||||
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
image: bitnami/elasticsearch:8.18.0
|
image: bitnami/elasticsearch:8.18.0
|
||||||
container_name: coze-elasticsearch
|
container_name: coze-elasticsearch
|
||||||
|
restart: always
|
||||||
user: root
|
user: root
|
||||||
privileged: true
|
privileged: true
|
||||||
profiles: ['middleware']
|
profiles: ['middleware']
|
||||||
@@ -253,6 +146,7 @@ services:
|
|||||||
container_name: coze-minio
|
container_name: coze-minio
|
||||||
user: root
|
user: root
|
||||||
privileged: true
|
privileged: true
|
||||||
|
restart: always
|
||||||
profiles: ['middleware']
|
profiles: ['middleware']
|
||||||
env_file: *env_file
|
env_file: *env_file
|
||||||
ports:
|
ports:
|
||||||
@@ -260,11 +154,14 @@ services:
|
|||||||
- '9001:9001'
|
- '9001:9001'
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/minio:/data
|
- ./data/minio:/data
|
||||||
|
- ./volumes/minio/default_icon/:/default_icon
|
||||||
|
- ./volumes/minio/official_plugin_icon/:/official_plugin_icon
|
||||||
|
- ./volumes/minio/initialize.sh:/initialize.sh
|
||||||
environment:
|
environment:
|
||||||
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
|
||||||
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin123}
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin123}
|
||||||
MINIO_DEFAULT_BUCKETS: ${MINIO_BUCKET:-opencoze},${MINIO_DEFAULT_BUCKETS:-milvus}
|
MINIO_DEFAULT_BUCKETS: ${MINIO_BUCKET:-opencoze},${MINIO_DEFAULT_BUCKETS:-milvus}
|
||||||
command: server /data --console-address ":9001"
|
entrypoint: ['/bin/sh', '/initialize.sh']
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test:
|
||||||
[
|
[
|
||||||
@@ -282,6 +179,7 @@ services:
|
|||||||
image: bitnami/etcd:3.5
|
image: bitnami/etcd:3.5
|
||||||
container_name: coze-etcd
|
container_name: coze-etcd
|
||||||
user: root
|
user: root
|
||||||
|
restart: always
|
||||||
privileged: true
|
privileged: true
|
||||||
profiles: ['middleware']
|
profiles: ['middleware']
|
||||||
env_file: *env_file
|
env_file: *env_file
|
||||||
@@ -319,6 +217,7 @@ services:
|
|||||||
image: milvusdb/milvus:v2.5.10
|
image: milvusdb/milvus:v2.5.10
|
||||||
user: root
|
user: root
|
||||||
privileged: true
|
privileged: true
|
||||||
|
restart: always
|
||||||
profiles: ['middleware']
|
profiles: ['middleware']
|
||||||
env_file: *env_file
|
env_file: *env_file
|
||||||
command: >
|
command: >
|
||||||
@@ -361,6 +260,7 @@ services:
|
|||||||
image: nsqio/nsq:v1.2.1
|
image: nsqio/nsq:v1.2.1
|
||||||
container_name: coze-nsqlookupd
|
container_name: coze-nsqlookupd
|
||||||
command: /nsqlookupd
|
command: /nsqlookupd
|
||||||
|
restart: always
|
||||||
profiles: ['middleware']
|
profiles: ['middleware']
|
||||||
ports:
|
ports:
|
||||||
- '4160:4160'
|
- '4160:4160'
|
||||||
@@ -379,6 +279,7 @@ services:
|
|||||||
container_name: coze-nsqd
|
container_name: coze-nsqd
|
||||||
command: /nsqd --lookupd-tcp-address=coze-nsqlookupd:4160 --broadcast-address=coze-nsqd
|
command: /nsqd --lookupd-tcp-address=coze-nsqlookupd:4160 --broadcast-address=coze-nsqd
|
||||||
profiles: ['middleware']
|
profiles: ['middleware']
|
||||||
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- '4150:4150'
|
- '4150:4150'
|
||||||
- '4151:4151'
|
- '4151:4151'
|
||||||
@@ -399,6 +300,7 @@ services:
|
|||||||
container_name: coze-nsqadmin
|
container_name: coze-nsqadmin
|
||||||
command: /nsqadmin --lookupd-http-address=coze-nsqlookupd:4161
|
command: /nsqadmin --lookupd-http-address=coze-nsqlookupd:4161
|
||||||
profiles: ['middleware']
|
profiles: ['middleware']
|
||||||
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- '4171:4171'
|
- '4171:4171'
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -407,107 +309,12 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- coze-network
|
- coze-network
|
||||||
|
|
||||||
minio-setup:
|
|
||||||
image: minio/mc:RELEASE.2025-05-21T01-59-54Z-cpuv1
|
|
||||||
container_name: coze-minio-setup
|
|
||||||
profiles: ['middleware']
|
|
||||||
env_file: *env_file
|
|
||||||
depends_on:
|
|
||||||
minio:
|
|
||||||
condition: service_healthy
|
|
||||||
volumes:
|
|
||||||
- ./volumes/minio/default_icon/:/default_icon
|
|
||||||
- ./volumes/minio/official_plugin_icon/:/official_plugin_icon
|
|
||||||
entrypoint: >
|
|
||||||
/bin/sh -c "
|
|
||||||
(/usr/bin/mc alias set localminio http://coze-minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD} && \
|
|
||||||
/usr/bin/mc mb --ignore-existing localminio/${STORAGE_BUCKET} && \
|
|
||||||
/usr/bin/mc cp --recursive /default_icon/ localminio/${STORAGE_BUCKET}/default_icon/ && \
|
|
||||||
/usr/bin/mc cp --recursive /official_plugin_icon/ localminio/${STORAGE_BUCKET}/official_plugin_icon/ && \
|
|
||||||
echo 'upload files to minio complete: Files uploaded to ${STORAGE_BUCKET} bucket.') || exit 1; \
|
|
||||||
"
|
|
||||||
networks:
|
|
||||||
- coze-network
|
|
||||||
restart: 'no'
|
|
||||||
|
|
||||||
mysql-setup-schema:
|
|
||||||
image: arigaio/atlas:0.35.0-community-alpine
|
|
||||||
container_name: coze-mysql-setup-schema
|
|
||||||
profiles: ['middleware', 'mysql-setup', 'run-server']
|
|
||||||
env_file: *env_file
|
|
||||||
depends_on:
|
|
||||||
mysql:
|
|
||||||
condition: service_healthy
|
|
||||||
volumes:
|
|
||||||
- ./atlas/opencoze_latest_schema.hcl:/opencoze_latest_schema.hcl
|
|
||||||
entrypoint:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
set -ex
|
|
||||||
TMP_ATLAS_URL="${ATLAS_URL}"
|
|
||||||
if [ "${MYSQL_HOST}" = "localhost" ] || [ "${MYSQL_HOST}" = "127.0.0.1" ]; then
|
|
||||||
echo "MYSQL_HOST is localhost or 127.0.0.1, replacing with docker network address"
|
|
||||||
TMP_ATLAS_URL="mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@mysql:${MYSQL_PORT}/${MYSQL_DATABASE}?charset=utf8mb4&parseTime=True"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "final atlas url: $${TMP_ATLAS_URL}"
|
|
||||||
for i in `seq 1 60`; do
|
|
||||||
if atlas schema apply \
|
|
||||||
-u "$${TMP_ATLAS_URL}" \
|
|
||||||
--to file:///opencoze_latest_schema.hcl \
|
|
||||||
--exclude "atlas_schema_revisions,table_*" \
|
|
||||||
--auto-approve; then
|
|
||||||
echo "MySQL setup complete."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo "atlas schema apply failed, retrying...($$i/60)"
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
echo "MySQL setup failed after 60 retries."
|
|
||||||
exit 1
|
|
||||||
networks:
|
|
||||||
- coze-network
|
|
||||||
mysql-setup-init-sql:
|
|
||||||
image: mysql:8.4.5
|
|
||||||
container_name: coze-mysql-setup-init-sql
|
|
||||||
profiles: ['middleware', 'mysql-setup', 'run-server', 'volcano-setup']
|
|
||||||
env_file: *env_file
|
|
||||||
depends_on:
|
|
||||||
mysql:
|
|
||||||
condition: service_healthy
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
set -ex
|
|
||||||
for i in $$(seq 1 60); do
|
|
||||||
DB_HOST="$${MYSQL_HOST}"
|
|
||||||
if [ "$${MYSQL_HOST}" = "localhost" ] || [ "$${MYSQL_HOST}" = "127.0.0.1" ]; then
|
|
||||||
DB_HOST="mysql"
|
|
||||||
fi
|
|
||||||
if mysql -h "$${DB_HOST}" -P"$${MYSQL_PORT}" -u"$${MYSQL_USER}" -p"$${MYSQL_PASSWORD}" "$${MYSQL_DATABASE}" < /schema.sql && \
|
|
||||||
mysql -h "$${DB_HOST}" -P"$${MYSQL_PORT}" -u"$${MYSQL_USER}" -p"$${MYSQL_PASSWORD}" "$${MYSQL_DATABASE}" < /sql_init.sql; then
|
|
||||||
echo 'MySQL init success.'
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo "Retrying to connect to mysql... ($$i/60)"
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
echo 'Failed to init mysql db.'
|
|
||||||
exit 1
|
|
||||||
volumes:
|
|
||||||
- ./volumes/mysql/sql_init.sql:/sql_init.sql
|
|
||||||
- ./volumes/mysql/schema.sql:/schema.sql
|
|
||||||
networks:
|
|
||||||
- coze-network
|
|
||||||
restart: 'no'
|
|
||||||
|
|
||||||
coze-server:
|
coze-server:
|
||||||
# build:
|
# build:
|
||||||
# context: ../
|
# context: ../
|
||||||
# dockerfile: backend/Dockerfile
|
# dockerfile: backend/Dockerfile
|
||||||
image: opencoze/opencoze:latest
|
image: opencoze/opencoze:latest
|
||||||
|
restart: always
|
||||||
container_name: coze-server
|
container_name: coze-server
|
||||||
profiles: ['run-server']
|
profiles: ['run-server']
|
||||||
env_file: *env_file
|
env_file: *env_file
|
||||||
@@ -527,20 +334,12 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
# rocketmq-namesrv:
|
|
||||||
# condition: service_healthy
|
|
||||||
# rocketmq-broker:
|
|
||||||
# condition: service_healthy
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
minio:
|
minio:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
milvus:
|
milvus:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
minio-setup:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
mysql-setup-init-sql:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
command: ['/app/bootstrap.sh']
|
command: ['/app/bootstrap.sh']
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
20
docker/volumes/minio/initialize.sh
Normal file
20
docker/volumes/minio/initialize.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Run initialization in background
|
||||||
|
(
|
||||||
|
# Wait for MinIO to be ready
|
||||||
|
until (/usr/bin/mc alias set localminio http://localhost:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD}) do
|
||||||
|
echo "Waiting for MinIO to be ready..."
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
# Create bucket and copy files
|
||||||
|
/usr/bin/mc mb --ignore-existing localminio/${STORAGE_BUCKET}
|
||||||
|
/usr/bin/mc cp --recursive /default_icon/ localminio/${STORAGE_BUCKET}/default_icon/
|
||||||
|
/usr/bin/mc cp --recursive /official_plugin_icon/ localminio/${STORAGE_BUCKET}/official_plugin_icon/
|
||||||
|
|
||||||
|
echo "MinIO initialization complete."
|
||||||
|
) &
|
||||||
|
|
||||||
|
# Start minio server in foreground
|
||||||
|
exec minio server /data --console-address ":9001"
|
||||||
1500
docker/volumes/mysql/schema.sql
Normal file → Executable file
1500
docker/volumes/mysql/schema.sql
Normal file → Executable file
File diff suppressed because one or more lines are too long
1500
helm/charts/opencoze/files/mysql/schema.sql
Normal file → Executable file
1500
helm/charts/opencoze/files/mysql/schema.sql
Normal file → Executable file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user