diff --git a/Dockerfile b/Dockerfile index ddaf167b6..4c030921e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,7 @@ FROM ghcr.io/openim-sigs/openim-bash-image:v1.3.0 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 diff --git a/cmd/openim-api/Makefile b/cmd/openim-api/Makefile deleted file mode 100644 index b72c6c717..000000000 --- a/cmd/openim-api/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-api -BIN_DIR=../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-cmdutils/Makefile b/cmd/openim-cmdutils/Makefile deleted file mode 100644 index e78ac33f6..000000000 --- a/cmd/openim-cmdutils/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-cmdutils -BIN_DIR=../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-crontask/Makefile b/cmd/openim-crontask/Makefile deleted file mode 100644 index 58528ccb5..000000000 --- a/cmd/openim-crontask/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-crontask -BIN_DIR=../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-msggateway/Makefile b/cmd/openim-msggateway/Makefile deleted file mode 100644 index d5238beae..000000000 --- a/cmd/openim-msggateway/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-rpc-msg_gateway -BIN_DIR=../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-msgtransfer/Makefile b/cmd/openim-msgtransfer/Makefile deleted file mode 100644 index e2d058f6d..000000000 --- a/cmd/openim-msgtransfer/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-msgtransfer -BIN_DIR=../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-push/Makefile b/cmd/openim-push/Makefile deleted file mode 100644 index b417faecf..000000000 --- a/cmd/openim-push/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-push -BIN_DIR=../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-rpc/openim-rpc-auth/Makefile b/cmd/openim-rpc/openim-rpc-auth/Makefile deleted file mode 100644 index 068d50fd8..000000000 --- a/cmd/openim-rpc/openim-rpc-auth/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-rpc-auth -BIN_DIR=../../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-rpc/openim-rpc-conversation/Makefile b/cmd/openim-rpc/openim-rpc-conversation/Makefile deleted file mode 100644 index 4c9726011..000000000 --- a/cmd/openim-rpc/openim-rpc-conversation/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-rpc-conversation -BIN_DIR=../../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-rpc/openim-rpc-friend/Makefile b/cmd/openim-rpc/openim-rpc-friend/Makefile deleted file mode 100644 index e0068e97d..000000000 --- a/cmd/openim-rpc/openim-rpc-friend/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-rpc-friend -BIN_DIR=../../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-rpc/openim-rpc-group/Makefile b/cmd/openim-rpc/openim-rpc-group/Makefile deleted file mode 100644 index 8ba79043d..000000000 --- a/cmd/openim-rpc/openim-rpc-group/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-rpc-group -BIN_DIR=../../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-rpc/openim-rpc-msg/Makefile b/cmd/openim-rpc/openim-rpc-msg/Makefile deleted file mode 100644 index 872fbfbba..000000000 --- a/cmd/openim-rpc/openim-rpc-msg/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-rpc-msg -BIN_DIR=../../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-rpc/openim-rpc-third/Makefile b/cmd/openim-rpc/openim-rpc-third/Makefile deleted file mode 100644 index 28059b2c4..000000000 --- a/cmd/openim-rpc/openim-rpc-third/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-rpc-third -BIN_DIR=../../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/openim-rpc/openim-rpc-user/Makefile b/cmd/openim-rpc/openim-rpc-user/Makefile deleted file mode 100644 index 1a7eed913..000000000 --- a/cmd/openim-rpc/openim-rpc-user/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: all build run gotool install clean help - -NAME=openim-rpc-user -BIN_DIR=../../../bin/ - -OS:= $(or $(os),linux) -ARCH:=$(or $(arch),amd64) -all: gotool build - -ifeq ($(OS),windows) - -BINARY_NAME=${NAME}.exe - -else - -BINARY_NAME=${NAME} - -endif - -build: - CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME} - -run: - @go run ./ - -gotool: - go fmt ./ - go vet ./ - -install:build - mv ${BINARY_NAME} ${BIN_DIR} - -clean: - @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/docker-compose.yaml b/docker-compose.yaml index 416ac0e17..57240cf19 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -100,7 +100,7 @@ services: openim_server: - image: ghcr.io/openimsdk/openim-server:latels + image: openim-server:v1 #ghcr.io/openimsdk/openim-server:latels container_name: openim-server volumes: - ./logs:/openim/openim-server/logs @@ -122,12 +122,12 @@ services: max-file: "2" openim_chat: - image: ghcr.io/openimsdk/openim-chat:latels + image: openim-chat:v1.3 #ghcr.io/openimsdk/openim-chat:latels container_name: openim_chat - volumes: - - ./_output/openim/openim-chat/logs:/openim/openim-chat/logs - - ./_output/openim/openim-chat/config:/openim/openim-chat/config - - ./_output/openim/openim-chat/scripts:/openim/openim-chat/scripts + # volumes: + # - ./_output/openim/openim-chat/logs:/openim/openim-chat/logs + # - ./_output/openim/openim-chat/config:/openim/openim-chat/config + # - ./_output/openim/openim-chat/scripts:/openim/openim-chat/scripts restart: always depends_on: - mysql diff --git a/scripts/common.sh b/scripts/common.sh index 8ae2abfa5..97d5968ba 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -104,9 +104,7 @@ openim::build::get_docker_wrapped_binaries() { "openim-rpc-msg,${OPENIM_BASE_IMAGE_REGISTRY}/debian-base-${arch}:${debian_base_version}" "openim-rpc-third,${OPENIM_BASE_IMAGE_REGISTRY}/debian-base-${arch}:${debian_base_version}" "openim-rpc-user,${OPENIM_BASE_IMAGE_REGISTRY}/debian-base-${arch}:${debian_base_version}" - ) - echo "${targets[@]}" } diff --git a/scripts/enterprise/path_info.cfg b/scripts/enterprise/path_info.cfg index 7e2c092b2..a64e95bfc 100644 --- a/scripts/enterprise/path_info.cfg +++ b/scripts/enterprise/path_info.cfg @@ -1,6 +1,5 @@ #Don't put the space between "=" - demo_server_name="openim_chat_api" demo_server_binary_root="$BIN_DIR/" diff --git a/scripts/start_rpc_service.sh b/scripts/start_rpc_service.sh index f1624c34e..f5c512b21 100755 --- a/scripts/start_rpc_service.sh +++ b/scripts/start_rpc_service.sh @@ -30,7 +30,6 @@ echo -e "${BACKGROUND_GREEN}${CYAN_PREFIX}=======>pwd=$PWD${COLOR_SUFFIX}" bin_dir="$BIN_DIR" logs_dir="$OPENIM_ROOT/logs" -sdk_db_dir="$OPENIM_ROOT/sdk/db/" #service filename service_filename=(