diff --git a/Makefile b/Makefile index 7179ed8ec..4fcc91f5b 100644 --- a/Makefile +++ b/Makefile @@ -102,6 +102,11 @@ install: check: @$(MAKE) go.check +## check-component +.PHONY: check-component +check-component: + @$(MAKE) go.check-component + ## tidy: tidy go.mod ✨ .PHONY: tidy tidy: diff --git a/docker-compose.yaml b/docker-compose.yaml index 048ead67d..856a0bd8f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -99,19 +99,19 @@ services: command: minio server /data --console-address ':9090' openim-server: - # image: ghcr.io/openimsdk/openim-server:release-v3.2 - image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:release-v3.2 - # image: openim/openim-server:release-v3.2 + # image: ghcr.io/openimsdk/openim-server:main + image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main + # image: openim/openim-server:main container_name: openim-server - # healthcheck: - # test: ["CMD-SHELL", "./scripts/check-all.sh"] - # interval: 30s - # timeout: 10s - # retries: 5 + healthcheck: + test: ["CMD-SHELL", "./scripts/check-all.sh"] + interval: 30s + timeout: 10s + retries: 5 volumes: - - ${DATA_DIR}/_output/openim/logs:/openim/openim-server/logs - - ${DATA_DIR}/config:/openim/openim-server/config - - ${DATA_DIR}/scripts:/openim/openim-server/scripts + - ./logs:/openim/openim-server/logs + - ./config:/openim/openim-server/config + - ./scripts:/openim/openim-server/scripts restart: always depends_on: - zookeeper diff --git a/scripts/install-im-server.sh b/scripts/install-im-server.sh index 3e8061151..54da74aa0 100755 --- a/scripts/install-im-server.sh +++ b/scripts/install-im-server.sh @@ -42,6 +42,6 @@ fi pushd "${OPENIM_ROOT}" >/dev/null ${DOCKER_COMPOSE_COMMAND} up -d sleep 60 - ${DOCKER_COMPOSE_COMMAND} ps ${DOCKER_COMPOSE_COMMAND} logs + ${DOCKER_COMPOSE_COMMAND} ps popd >/dev/null diff --git a/scripts/lib/util.sh b/scripts/lib/util.sh index 5252f8599..55e346888 100755 --- a/scripts/lib/util.sh +++ b/scripts/lib/util.sh @@ -1212,9 +1212,7 @@ function openim::util::get_server_ip() { } function openim::util::onCtrlC() { - kill -9 "${do_sth_pid}" "${progress_pid}" "${countdown_pid}" - echo - echo 'Ctrl+C is captured' + echo -e "\n${t_reset}Ctrl+C Press it. It's exiting openim make init..." exit 1 } diff --git a/scripts/make-rules/golang.mk b/scripts/make-rules/golang.mk index 4aa3b7e3a..17a7abfd6 100644 --- a/scripts/make-rules/golang.mk +++ b/scripts/make-rules/golang.mk @@ -119,6 +119,12 @@ go.check: @echo "===========> Checking openim" @$(ROOT_DIR)/scripts/check-all.sh +## go.check-component: Check openim component +.PHONY: go.check-component +go.check-component: + @echo "===========> Checking openim component" + @$(ROOT_DIR)/scripts/install/openim-tools.sh openim::tools::pre-start + ## go.build.verify: Verify that a suitable version of Go exists .PHONY: go.build.verify go.build.verify: