From 34551a82a2fb8e35931b0e9cd0011b6aa2d134e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 28 Jan 2024 18:30:51 +0800 Subject: [PATCH 1/8] chore(deps): bump golang.org/x/crypto in /tools/data-conversion (#1580) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.16.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tools/data-conversion/go.mod | 2 +- tools/data-conversion/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/data-conversion/go.mod b/tools/data-conversion/go.mod index 37d1776c2..963755923 100644 --- a/tools/data-conversion/go.mod +++ b/tools/data-conversion/go.mod @@ -63,7 +63,7 @@ require ( go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/image v0.13.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/tools/data-conversion/go.sum b/tools/data-conversion/go.sum index 66f85785b..d6dc23742 100644 --- a/tools/data-conversion/go.sum +++ b/tools/data-conversion/go.sum @@ -146,8 +146,8 @@ golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/image v0.13.0 h1:3cge/F/QTkNLauhf2QoE9zp+7sr+ZcL4HnoZmdwg9sg= golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= From f94d8af737439e9c6ec2b5c937e430eb970bff5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 28 Jan 2024 18:32:34 +0800 Subject: [PATCH 2/8] chore(deps): bump google.golang.org/grpc in /tools/url2im (#1283) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.2 to 1.56.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.56.2...v1.56.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tools/url2im/go.mod | 2 +- tools/url2im/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/url2im/go.mod b/tools/url2im/go.mod index 236af91c7..b6011909d 100644 --- a/tools/url2im/go.mod +++ b/tools/url2im/go.mod @@ -15,6 +15,6 @@ require ( golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.56.2 // indirect + google.golang.org/grpc v1.56.3 // indirect google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/tools/url2im/go.sum b/tools/url2im/go.sum index 071d9c3aa..1970dce2c 100644 --- a/tools/url2im/go.sum +++ b/tools/url2im/go.sum @@ -24,8 +24,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= +google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= From 32cd79044bbdd00ff28eea1272ea46c9c528038f Mon Sep 17 00:00:00 2001 From: Brabem <69128477+luhaoling@users.noreply.github.com> Date: Mon, 29 Jan 2024 19:57:37 +0800 Subject: [PATCH 3/8] feat: del the manager configure and it's initializestatement (#1830) * fix: del the manager config and manger init statement * fix: fix the Manger judge condition * fix: fix revokeMsg error * fix: find erors * fix: find error * fix: fix the AdminAccount error * fix: del the debug statement --- deployments/templates/config.yaml | 7 ++++--- docs/contrib/environment.md | 6 ------ internal/push/push_to_client.go | 3 +++ internal/rpc/msg/revoke.go | 9 ++++++++- internal/rpc/msg/verify.go | 10 ++++++++-- internal/rpc/user/user.go | 6 ------ pkg/authverify/token.go | 11 +++++------ scripts/install/environment.sh | 6 ------ 8 files changed, 28 insertions(+), 30 deletions(-) diff --git a/deployments/templates/config.yaml b/deployments/templates/config.yaml index 82f76597c..cc318adcd 100644 --- a/deployments/templates/config.yaml +++ b/deployments/templates/config.yaml @@ -243,9 +243,10 @@ push: # # Built-in app manager user IDs # Built-in app manager nicknames +# Attention, this configure is discarded. If you have used him before, configure your own manager: - userID: [ "${MANAGER_USERID_1}", "${MANAGER_USERID_2}", "${MANAGER_USERID_3}" ] - nickname: [ "${NICKNAME_1}", "${NICKNAME_2}", "${NICKNAME_3}" ] + userID: + nickname: # chatAdmin, use for send notification # @@ -329,7 +330,7 @@ callback: timeout: ${CALLBACK_TIMEOUT} failedContinue: ${CALLBACK_FAILED_CONTINUE} afterSendSingleMsg: - enable: true + enable: ${CALLBACK_ENABLE} timeout: ${CALLBACK_TIMEOUT} failedContinue: ${CALLBACK_FAILED_CONTINUE} beforeSendGroupMsg: diff --git a/docs/contrib/environment.md b/docs/contrib/environment.md index 366a1d94f..fb696eb54 100644 --- a/docs/contrib/environment.md +++ b/docs/contrib/environment.md @@ -477,12 +477,6 @@ This section involves setting up additional configuration variables for Websocke | JPNS_MASTER_SECRET | [User Defined] | JPNS Master Secret | | JPNS_PUSH_URL | [User Defined] | JPNS Push Notification URL | | JPNS_PUSH_INTENT | [User Defined] | JPNS Push Intent | -| MANAGER_USERID_1 | "openIM123456" | Administrator ID 1 | -| MANAGER_USERID_2 | "openIM654321" | Administrator ID 2 | -| MANAGER_USERID_3 | "openIMAdmin" | Administrator ID 3 | -| NICKNAME_1 | "system1" | Nickname 1 | -| NICKNAME_2 | "system2" | Nickname 2 | -| NICKNAME_3 | "system3" | Nickname 3 | | IM_ADMIN_USERID | "imAdmin" | IM Administrator ID | | IM_ADMIN_NAME | "imAdmin" | IM Administrator Nickname | | MULTILOGIN_POLICY | "1" | Multi-login Policy | diff --git a/internal/push/push_to_client.go b/internal/push/push_to_client.go index caa39e618..5fce34e83 100644 --- a/internal/push/push_to_client.go +++ b/internal/push/push_to_client.go @@ -238,6 +238,9 @@ func (p *Pusher) Push2SuperGroup(ctx context.Context, groupID string, msg *sdkws if len(config.Config.Manager.UserID) > 0 { ctx = mcontext.WithOpUserIDContext(ctx, config.Config.Manager.UserID[0]) } + if len(config.Config.Manager.UserID) == 0 && len(config.Config.IMAdmin.UserID) > 0 { + ctx = mcontext.WithOpUserIDContext(ctx, config.Config.IMAdmin.UserID[0]) + } defer func(groupID string) { if err = p.groupRpcClient.DismissGroup(ctx, groupID); err != nil { log.ZError(ctx, "DismissGroup Notification clear members", err, "groupID", groupID) diff --git a/internal/rpc/msg/revoke.go b/internal/rpc/msg/revoke.go index d7362d339..0a24753b2 100644 --- a/internal/rpc/msg/revoke.go +++ b/internal/rpc/msg/revoke.go @@ -111,6 +111,13 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg. return nil, err } revokerUserID := mcontext.GetOpUserID(ctx) + var flag bool + if len(config.Config.Manager.UserID) > 0 { + flag = utils.Contain(revokerUserID, config.Config.Manager.UserID...) + } + if len(config.Config.Manager.UserID) == 0 && len(config.Config.IMAdmin.UserID) > 0 { + flag = utils.Contain(revokerUserID, config.Config.IMAdmin.UserID...) + } tips := sdkws.RevokeMsgTips{ RevokerUserID: revokerUserID, ClientMsgID: msgs[0].ClientMsgID, @@ -118,7 +125,7 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg. Seq: req.Seq, SesstionType: msgs[0].SessionType, ConversationID: req.ConversationID, - IsAdminRevoke: utils.Contain(revokerUserID, config.Config.Manager.UserID...), + IsAdminRevoke: flag, } var recvID string if msgs[0].SessionType == constant.SuperGroupChatType { diff --git a/internal/rpc/msg/verify.go b/internal/rpc/msg/verify.go index 2837cb944..0080b6fdb 100644 --- a/internal/rpc/msg/verify.go +++ b/internal/rpc/msg/verify.go @@ -51,7 +51,10 @@ type MessageRevoked struct { func (m *msgServer) messageVerification(ctx context.Context, data *msg.SendMsgReq) error { switch data.MsgData.SessionType { case constant.SingleChatType: - if utils.IsContain(data.MsgData.SendID, config.Config.Manager.UserID) { + if len(config.Config.Manager.UserID) > 0 && utils.IsContain(data.MsgData.SendID, config.Config.Manager.UserID) { + return nil + } + if utils.IsContain(data.MsgData.SendID, config.Config.IMAdmin.UserID) { return nil } if data.MsgData.ContentType <= constant.NotificationEnd && @@ -88,7 +91,10 @@ func (m *msgServer) messageVerification(ctx context.Context, data *msg.SendMsgRe if groupInfo.GroupType == constant.SuperGroup { return nil } - if utils.IsContain(data.MsgData.SendID, config.Config.Manager.UserID) { + if len(config.Config.Manager.UserID) > 0 && utils.IsContain(data.MsgData.SendID, config.Config.Manager.UserID) { + return nil + } + if utils.IsContain(data.MsgData.SendID, config.Config.IMAdmin.UserID) { return nil } if data.MsgData.ContentType <= constant.NotificationEnd && diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 0be5f97f4..e5567f436 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -71,12 +71,6 @@ func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error { return err } users := make([]*tablerelation.UserModel, 0) - if len(config.Config.Manager.UserID) != len(config.Config.Manager.Nickname) { - return errors.New("len(config.Config.Manager.AppManagerUid) != len(config.Config.Manager.Nickname)") - } - for k, v := range config.Config.Manager.UserID { - users = append(users, &tablerelation.UserModel{UserID: v, Nickname: config.Config.Manager.Nickname[k], AppMangerLevel: constant.AppAdmin}) - } if len(config.Config.IMAdmin.UserID) != len(config.Config.IMAdmin.Nickname) { return errors.New("len(config.Config.AppNotificationAdmin.AppManagerUid) != len(config.Config.AppNotificationAdmin.Nickname)") } diff --git a/pkg/authverify/token.go b/pkg/authverify/token.go index 4c71224ee..224693f85 100644 --- a/pkg/authverify/token.go +++ b/pkg/authverify/token.go @@ -17,7 +17,6 @@ package authverify import ( "context" "fmt" - "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mcontext" "github.com/OpenIMSDK/tools/tokenverify" @@ -35,7 +34,7 @@ func Secret() jwt.Keyfunc { func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) { opUserID := mcontext.GetOpUserID(ctx) - if utils.IsContain(opUserID, config.Config.Manager.UserID) { + if len(config.Config.Manager.UserID) > 0 && utils.IsContain(opUserID, config.Config.Manager.UserID) { return nil } if utils.IsContain(opUserID, config.Config.IMAdmin.UserID) { @@ -48,11 +47,11 @@ func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) { } func IsAppManagerUid(ctx context.Context) bool { - return utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID) || utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.IMAdmin.UserID) + return (len(config.Config.Manager.UserID) > 0 && utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID)) || utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.IMAdmin.UserID) } func CheckAdmin(ctx context.Context) error { - if utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID) { + if len(config.Config.Manager.UserID) > 0 && utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID) { return nil } if utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.IMAdmin.UserID) { @@ -64,7 +63,7 @@ func CheckIMAdmin(ctx context.Context) error { if utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.IMAdmin.UserID) { return nil } - if utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID) { + if len(config.Config.Manager.UserID) > 0 && utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID) { return nil } return errs.ErrNoPermission.Wrap(fmt.Sprintf("user %s is not CheckIMAdmin userID", mcontext.GetOpUserID(ctx))) @@ -75,7 +74,7 @@ func ParseRedisInterfaceToken(redisToken any) (*tokenverify.Claims, error) { } func IsManagerUserID(opUserID string) bool { - return utils.IsContain(opUserID, config.Config.Manager.UserID) || utils.IsContain(opUserID, config.Config.IMAdmin.UserID) + return (len(config.Config.Manager.UserID) > 0 && utils.IsContain(opUserID, config.Config.Manager.UserID)) || utils.IsContain(opUserID, config.Config.IMAdmin.UserID) } func WsVerifyToken(token, userID string, platformID int) error { diff --git a/scripts/install/environment.sh b/scripts/install/environment.sh index aeb4fcc36..b1d2354b9 100755 --- a/scripts/install/environment.sh +++ b/scripts/install/environment.sh @@ -349,12 +349,6 @@ def "JPNS_APP_KEY" "" # JPNS应用密钥 def "JPNS_MASTER_SECRET" "" # JPNS主密钥 def "JPNS_PUSH_URL" "" # JPNS推送URL def "JPNS_PUSH_INTENT" "" # JPNS推送意图 -def "MANAGER_USERID_1" "openIM123456" # 管理员ID 1 -def "MANAGER_USERID_2" "openIM654321" # 管理员ID 2 -def "MANAGER_USERID_3" "openIMAdmin" # 管理员ID 3 -def "NICKNAME_1" "system1" # 昵称1 -def "NICKNAME_2" "system2" # 昵称2 -def "NICKNAME_3" "system3" # 昵称3 def "IM_ADMIN_USERID" "imAdmin" # IM管理员ID def "IM_ADMIN_NAME" "imAdmin" # IM管理员昵称 def "MULTILOGIN_POLICY" "1" # 多登录策略 From bd9e50d9e08edc9d6a87fa8c443cf8f0bf825117 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Mon, 29 Jan 2024 19:58:19 +0800 Subject: [PATCH 4/8] fix(docker-compose): Update the env template to uncomment the mongo port (#1833) --- deployments/templates/env-template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/templates/env-template.yaml b/deployments/templates/env-template.yaml index 9b21c8c65..1044dd6bc 100644 --- a/deployments/templates/env-template.yaml +++ b/deployments/templates/env-template.yaml @@ -100,7 +100,7 @@ ZOOKEEPER_PORT=${ZOOKEEPER_PORT} # MongoDB service port configuration. # Default: MONGO_PORT=37017 -# MONGO_PORT=${MONGO_PORT} +MONGO_PORT=${MONGO_PORT} # Password for MongoDB admin user. Used for service authentication. # Default: MONGO_PASSWORD=openIM123 From 0a245df2f8cf60f5fd0767c840dc66399a668f33 Mon Sep 17 00:00:00 2001 From: OpenIM Bot <124379614+kubbot@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:14:03 +0800 Subject: [PATCH 5/8] cicd: bump League Patch (#1837) --- pkg/authverify/token.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/authverify/token.go b/pkg/authverify/token.go index 224693f85..97bb03391 100644 --- a/pkg/authverify/token.go +++ b/pkg/authverify/token.go @@ -17,6 +17,7 @@ package authverify import ( "context" "fmt" + "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mcontext" "github.com/OpenIMSDK/tools/tokenverify" @@ -47,7 +48,8 @@ func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) { } func IsAppManagerUid(ctx context.Context) bool { - return (len(config.Config.Manager.UserID) > 0 && utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID)) || utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.IMAdmin.UserID) + return (len(config.Config.Manager.UserID) > 0 && utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID)) || + utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.IMAdmin.UserID) } func CheckAdmin(ctx context.Context) error { From 4ded2cffed2bd3abfb29e777e048c628d569294f Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Wed, 31 Jan 2024 14:16:09 +0800 Subject: [PATCH 6/8] Delete build/images/openim-rpc-extend-msg directory (#1841) --- build/images/openim-rpc-extend-msg/Dockerfile | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 build/images/openim-rpc-extend-msg/Dockerfile diff --git a/build/images/openim-rpc-extend-msg/Dockerfile b/build/images/openim-rpc-extend-msg/Dockerfile deleted file mode 100644 index 3ed94019b..000000000 --- a/build/images/openim-rpc-extend-msg/Dockerfile +++ /dev/null @@ -1,45 +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. - -# OpenIM base image: https://github.com/openim-sigs/openim-base-image - -# Set go mod installation source and proxy - -FROM golang:1.20 AS builder - -ARG GO111MODULE=on -ARG GOPROXY=https://goproxy.cn,direct - -WORKDIR /openim/openim-server - -ENV GO111MODULE=$GO111MODULE -ENV GOPROXY=$GOPROXY - -COPY go.mod go.sum ./ -RUN go mod download - -COPY . . - -RUN make build BINS=openim-rpc-extend-msg - -RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-extend-msg /usr/bin/openim-rpc-extend-msg - -# FROM ghcr.io/openim-sigs/openim-bash-image:latest -FROM ghcr.io/openim-sigs/openim-bash-image:latest - -WORKDIR /openim/openim-server - -COPY --from=builder /usr/bin/openim-rpc-extend-msg ./bin/openim-rpc-extend-msg - -ENTRYPOINT ["./bin/openim-rpc-extend-msg"] \ No newline at end of file From 18047859b8f46098b79189d04888845d12202ca1 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Wed, 31 Jan 2024 14:16:19 +0800 Subject: [PATCH 7/8] Delete build/images/openim-rpc-encryption directory (#1842) --- build/images/openim-rpc-encryption/Dockerfile | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 build/images/openim-rpc-encryption/Dockerfile diff --git a/build/images/openim-rpc-encryption/Dockerfile b/build/images/openim-rpc-encryption/Dockerfile deleted file mode 100644 index e3f232eaf..000000000 --- a/build/images/openim-rpc-encryption/Dockerfile +++ /dev/null @@ -1,45 +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. - -# OpenIM base image: https://github.com/openim-sigs/openim-base-image - -# Set go mod installation source and proxy - -FROM golang:1.20 AS builder - -ARG GO111MODULE=on -ARG GOPROXY=https://goproxy.cn,direct - -WORKDIR /openim/openim-server - -ENV GO111MODULE=$GO111MODULE -ENV GOPROXY=$GOPROXY - -COPY go.mod go.sum ./ -RUN go mod download - -COPY . . - -RUN make build BINS=openim-rpc-encryption - -RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-encryption /usr/bin/openim-rpc-encryption - -# FROM ghcr.io/openim-sigs/openim-bash-image:latest -FROM ghcr.io/openim-sigs/openim-bash-image:latest - -WORKDIR /openim/openim-server - -COPY --from=builder /usr/bin/openim-rpc-encryption ./bin/openim-rpc-encryption - -ENTRYPOINT ["./bin/openim-rpc-encryption"] \ No newline at end of file From c205013436b219c0ec629aec425bee23d10bce2f Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Wed, 31 Jan 2024 14:16:32 +0800 Subject: [PATCH 8/8] Update offline-deployment.md openim offine deployment docs (#1843) --- docs/contrib/offline-deployment.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/contrib/offline-deployment.md b/docs/contrib/offline-deployment.md index a96f82d4a..5e44318c4 100644 --- a/docs/contrib/offline-deployment.md +++ b/docs/contrib/offline-deployment.md @@ -1,5 +1,3 @@ - - # OpenIM Offline Deployment Design ## 1. Base Images @@ -10,7 +8,7 @@ Below are the base images and their versions you'll need: - [ ] redis:7.0.0 - [ ] mongo:6.0.2 - [ ] bitnami/zookeeper:3.8 -- [ ] minio/minio:latest +- [ ] minio/minio:RELEASE.2024-01-11T07-46-16Z > [!IMPORTANT] > It is important to note that OpenIM removed mysql components from versions v3.5.0 (release-v3.5) and above, so mysql can be deployed without this requirement or above @@ -22,10 +20,10 @@ OpenIM: > [!TIP] > If you need to install more IM components or monitoring products [images.md](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/images.md) -- [ ] ghcr.io/openimsdk/openim-web:latest -- [ ] ghcr.io/openimsdk/openim-admin:latest -- [ ] ghcr.io/openimsdk/openim-chat:latest -- [ ] ghcr.io/openimsdk/openim-server:latest +- [ ] ghcr.io/openimsdk/openim-web: +- [ ] ghcr.io/openimsdk/openim-admin: +- [ ] ghcr.io/openimsdk/openim-chat: +- [ ] ghcr.io/openimsdk/openim-server: Monitoring: @@ -42,9 +40,9 @@ Use the following commands to pull these base images: docker pull bitnami/kafka:3.5.1 docker pull redis:7.0.0 docker pull mongo:6.0.2 -docker pull mysql:5.7 +docker pull mariadb:10.6 docker pull bitnami/zookeeper:3.8 -docker pull minio/minio:latest +docker pull minio/minio:2024-01-11T07-46-16Z ``` If you need to install more IM components or monitoring products: @@ -177,4 +175,4 @@ docker compose ps # Verify - [openimsdk Issue #432](https://github.com/openimsdk/open-im-server/issues/432) - [Notion Link](https://nsddd.notion.site/435ee747c0bc44048da9300a2d745ad3?pvs=25) -- [openimsdk Issue #474](https://github.com/openimsdk/open-im-server/issues/474) \ No newline at end of file +- [openimsdk Issue #474](https://github.com/openimsdk/open-im-server/issues/474)