diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml index 44b217c59..29254a366 100644 --- a/.github/workflows/scripts-test.yml +++ b/.github/workflows/scripts-test.yml @@ -53,8 +53,8 @@ jobs: - name: Stop all services run: | - sudo chmod +x ./scripts/stop_all.sh - sudo ./scripts/stop_all.sh + sudo chmod +x ./scripts/stop-all.sh + sudo ./scripts/stop-all.sh sudo cat logs/openIM.log 2>/dev/null shell: bash continue-on-error: true @@ -68,8 +68,8 @@ jobs: - name: Start all services run: | - sudo chmod +x ./scripts/start_all.sh - sudo ./scripts/start_all.sh + sudo chmod +x ./scripts/start-all.sh + sudo ./scripts/start-all.sh sudo cat logs/openIM.log 2>/dev/null continue-on-error: true shell: bash diff --git a/Dockerfile b/Dockerfile index 321f8b03d..a145e5912 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,6 @@ WORKDIR ${SERVER_WORKDIR} # Copy scripts and binary files to the production image COPY --from=builder ${OPENIM_SERVER_CMDDIR} /openim/openim-server/scripts COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config -COPY --from=builder ${SERVER_WORKDIR}/_output/bin/platforms /openim/openim-server/_output/bin/platforms -COPY --from=builder ${SERVER_WORKDIR}/_output/bin-tools/platforms /openim/openim-server/_output/bin-tools/platforms +COPY --from=builder ${OPENIM_SERVER_BINDIR} /openim/openim-server/_output/bin -CMD ["bash","-c","${OPENIM_SERVER_CMDDIR}/docker_start_all.sh"] +CMD ["bash","-c","${OPENIM_SERVER_CMDDIR}/docker-start-all-all.sh"] diff --git a/README-zh_CN.md b/README-zh_CN.md index 0d719b63d..c578c9db4 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -260,7 +260,7 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。 ``` bashCopy code -./scripts/start_all.sh; +./scripts/start-all.sh; ``` 检查服务 @@ -274,7 +274,7 @@ bashCopy code ``` bashCopy code -./scripts/stop_all.sh +./scripts/stop-all.sh ``` diff --git a/README.md b/README.md index 38285ef9b..0baef8b3a 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ The config/config.yaml file has detailed configuration instructions for the stor Start services ``` -./scripts/start_all.sh; +./scripts/start-all.sh; ``` Check services @@ -277,7 +277,7 @@ Check services Stop services ``` -./scripts/stop_all.sh +./scripts/stop-all.sh ``` diff --git a/docker-compose.yaml b/docker-compose.yaml index 09702256e..afb77d657 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -180,4 +180,4 @@ services: # container_name: node-exporter # restart: always # ports: - # - "9100:9100" \ No newline at end of file + # - "9100:9100" diff --git a/scripts/README.md b/scripts/README.md index e924cc968..a4bd67d62 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -30,7 +30,7 @@ scripts/ │ └── LICENSE_TEMPLATES # Template for license file ├── README.md # Readme file for scripts directory ├── advertise.sh # Script for advertisement services -├── batch_start_all.sh # Script to start all services in batch +├── batch_start-all.sh # Script to start all services in batch ├── build.cmd # Windows build command script ├── build_all_service.sh # Script to build all services ├── build_push_k8s_images.sh # Script to build and push images for Kubernetes @@ -39,7 +39,7 @@ scripts/ ├── coverage.awk # AWK script for coverage report generation ├── coverage.sh # Script for generating coverage reports ├── docker_check_service.sh # Docker specific service check script -├── docker_start_all.sh # Script to start all services in a docker environment +├── docker-start-all-all.sh # Script to start all services in a docker environment ├── ensure_tag.sh # Script to ensure proper tagging of docker images ├── enterprise # Scripts specific to enterprise version │ ├── check_all.sh # Check status of all enterprise services @@ -78,10 +78,10 @@ scripts/ ├── path_info.sh # Script containing path information ├── openim-push.sh # Script to start push service ├── release.sh # Script to perform release process -├── start_all.sh # Script to start all services +├── start-all.sh # Script to start all services ├── openim-crontask.sh # Script to start cron jobs ├── openim-rpc.sh # Script to start RPC service -├── stop_all.sh # Script to stop all services +├── stop-all.sh # Script to stop all services └── style_info.sh # Script containing style related information ``` diff --git a/scripts/build_all_service.sh b/scripts/build_all_service.sh index f7e131a95..9a94565b3 100755 --- a/scripts/build_all_service.sh +++ b/scripts/build_all_service.sh @@ -78,7 +78,7 @@ else fi if [ $? -eq 0 ]; then - openim::log::success "all service build success, run 'make start' or './scripts/start_all.sh'" + openim::log::success "all service build success, run 'make start' or './scripts/start-all.sh'" else openim::log::error "make build Error, script exits" fi diff --git a/scripts/docker_start_all.sh b/scripts/docker-start-all.sh similarity index 100% rename from scripts/docker_start_all.sh rename to scripts/docker-start-all.sh diff --git a/scripts/init-config.sh b/scripts/init-config.sh index f5945d50c..d5bdda317 100755 --- a/scripts/init-config.sh +++ b/scripts/init-config.sh @@ -29,8 +29,8 @@ readonly ENV_FILE=${ENV_FILE:-${OPENIM_ROOT}/scripts/install/environment.sh} # 定义关联数组,其中键是模板文件,值是对应的输出文件 (en: Defines an associative array where the keys are the template files and the values are the corresponding output files.) declare -A TEMPLATES=( - ["${OPENIM_ROOT}/deployments/templates/env_template.yaml"]="${OPENIM_OUTPUT_SUBPATH}/bin/.env" - ["${OPENIM_ROOT}/deployments/templates/openim.yaml"]="${OPENIM_OUTPUT_SUBPATH}/bin/openim_config.yaml" + ["${OPENIM_ROOT}/deployments/templates/env_template.yaml"]="${OPENIM_ROOT}/.env" + ["${OPENIM_ROOT}/deployments/templates/openim.yaml"]="${OPENIM_ROOT}/openim_config.yaml" ) for template in "${!TEMPLATES[@]}"; do diff --git a/scripts/make-rules/golang.mk b/scripts/make-rules/golang.mk index 697eb565d..1e7545ddb 100644 --- a/scripts/make-rules/golang.mk +++ b/scripts/make-rules/golang.mk @@ -105,13 +105,13 @@ go.build: go.build.verify $(addprefix go.build., $(addprefix $(PLATFORM)., $(BIN .PHONY: go.start go.start: @echo "===========> Starting openim" - @$(ROOT_DIR)/scripts/start_all.sh + @$(ROOT_DIR)/scripts/start-all.sh ## go.stop: Stop openim .PHONY: go.stop go.stop: @echo "===========> Stopping openim" - @$(ROOT_DIR)/scripts/stop_all.sh + @$(ROOT_DIR)/scripts/stop-all.sh ## go.check: Check openim .PHONY: go.check diff --git a/scripts/path_info.sh b/scripts/path_info.sh deleted file mode 100755 index 37ca4fbd8..000000000 --- a/scripts/path_info.sh +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright © 2023 OpenIM. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Don't put the space between "=" -openim_msggateway="openim-msggateway" -msg_gateway_binary_root="$OPENIM_ROOT/$BIN_DIR" - -msg_name="openim-rpc-msg" -msg_binary_root="$OPENIM_ROOT/$BIN_DIR" - -push_name="openim-push" -push_binary_root="$OPENIM_ROOT/$BIN_DIR" -push_source_root="$OPENIM_ROOT/cmd/openim-push/" - -openim_msgtransfer="openim-msgtransfer" -msg_transfer_binary_root="$OPENIM_ROOT/$BIN_DIR" -msg_transfer_service_num=4 - -cron_task_name="openim-crontask" -cron_task_binary_root="$OPENIM_ROOT/$BIN_DIR" - -cmd_utils_name="openim-cmdutils" -cmd_utils_binary_root="$OPENIM_ROOT/$BIN_DIR" - -# Global configuration file default dir -config_path="$OPENIM_ROOT/config/config.yaml" -configfile_path="$OPENIM_ROOT/config" - -# service filename -service_names=( - # api service filename - "openim-api" - # rpc service filename - "openim-rpc-user" - "openim-rpc-friend" - "openim-rpc-group" - "openim-rpc-auth" - "openim-rpc-conversation" - "openim-rpc-third" - "openim-crontask" - "${openim_msggateway}" - "${openim_msgtransfer}" - "${msg_name}" - "${push_name}" - # "${sdk_server_name}" -) \ No newline at end of file diff --git a/scripts/start_all.sh b/scripts/start-all.sh similarity index 100% rename from scripts/start_all.sh rename to scripts/start-all.sh diff --git a/scripts/start_component_check.sh b/scripts/start_component_check.sh old mode 100644 new mode 100755 diff --git a/scripts/stop_all.sh b/scripts/stop-all.sh similarity index 100% rename from scripts/stop_all.sh rename to scripts/stop-all.sh diff --git a/tools/component/main.go b/tools/component/component.go similarity index 100% rename from tools/component/main.go rename to tools/component/component.go