Compare commits

..

675 Commits

Author SHA1 Message Date
Xinwei Xiong(cubxxw-openim)
db081e6a4c feat: add more deployment docs
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
2023-09-06 11:34:46 +08:00
wangchuxiao
6b0a2c9464 update 2023-05-25 16:29:22 +08:00
wangchuxiao
775aba52bd dockerfile add ca 2023-05-17 19:03:27 +08:00
wangchuxiao
e1770173ef getui 2023-04-12 15:46:29 +08:00
wangchuxiao
c73ce45e9e fix getui req 2023-04-12 15:34:15 +08:00
Gordon
7aefb7fa2b message add ex field to return 2023-04-04 15:55:57 +08:00
wangchuxiao
baece7eb3a getui update 2023-03-27 17:56:08 +08:00
soasurs
1b31a07b40 feat: allow modify msg for any content type by callback (#352)
* feat: add recvID/groupID for msg modification callback

Signed-off-by: soasurs <soasurs@gmail.com>

* feat: allow modify msg for any content type by callback

Signed-off-by: soasurs <soasurs@gmail.com>

---------

Signed-off-by: soasurs <soasurs@gmail.com>
2023-03-23 12:53:22 +08:00
wangchuxiao
83ba487c61 add log for bk 2023-03-23 12:23:48 +08:00
wangchuxiao
8dc0b639a2 signal both push 2023-03-22 18:42:42 +08:00
wangchuxiao
9a636a15de redis 2023-03-21 20:18:39 +08:00
wangchuxiao
7b12a8755a fix sync conversation bug 2023-03-21 17:31:30 +08:00
soasurs
b67c244bbd feat: add recvID/groupID for msg modification callback (#351)
Signed-off-by: soasurs <soasurs@gmail.com>
2023-03-20 15:27:43 +08:00
Gordon
0bd2c00088 push message update 2023-03-15 18:36:44 +08:00
wangchuxiao
cb1487109a Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2023-03-13 16:19:08 +08:00
wangchuxiao
c9d8625274 connID to md5 2023-03-13 16:18:18 +08:00
Gordon
d0b659ccea super group notification 2023-03-07 11:09:17 +08:00
Gordon
c182001fcf ws support same terminal login 2023-03-02 19:36:48 +08:00
Gordon
c8038213c7 ws support same terminal login 2023-03-02 19:24:24 +08:00
Gordon
40a7bb9d48 test log 2023-03-02 19:08:35 +08:00
Gordon
7e48d1a00f ws support same terminal login 2023-03-02 18:47:11 +08:00
Gordon
a64e5a776a Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2023-03-01 14:54:48 +08:00
Gordon
9dc798bc53 ws recycle conn bug fix 2023-03-01 14:54:22 +08:00
wangchuxiao
c6ea841064 k8s 2023-03-01 00:38:36 +08:00
Gordon
0e03c5f89e Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2023-02-28 16:36:21 +08:00
Gordon
70502685ce invite user to groups api add 2023-02-28 16:35:53 +08:00
wangchuxiao
a2fe6ffc7a Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2023-02-28 16:32:15 +08:00
wangchuxiao
1c724aa89b deploy 2023-02-28 16:32:02 +08:00
Gordon
5d307c16b4 Makefile update 2023-02-28 10:21:59 +08:00
Gordon
96c264981e Makefile update 2023-02-27 20:22:28 +08:00
Gordon
60c507ff10 Makefile update 2023-02-27 20:03:06 +08:00
Gordon
33ee58904b callback add 2023-02-27 17:08:34 +08:00
Gordon
0938b11f83 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2023-02-27 15:42:22 +08:00
Gordon
c0d633bc34 message reaction bug fix 2023-02-27 15:41:22 +08:00
wangchuxiao
7a9506f616 modify msg 2023-02-27 12:47:18 +08:00
wangchuxiao
36afd67a2c modify msg 2023-02-27 12:41:29 +08:00
wangchuxiao
59d1090a6d modify msg 2023-02-27 12:29:40 +08:00
wangchuxiao
f384bb2aff fix bug 2023-02-24 18:52:58 +08:00
wangchuxiao
4411ba3482 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2023-02-24 18:40:16 +08:00
wangchuxiao
379118e481 fix bug 2023-02-24 18:39:31 +08:00
Gordon
661b1a5e6a not kick user 2023-02-23 14:21:39 +08:00
Gordon
fd2d5252c5 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2023-02-23 12:18:27 +08:00
Gordon
284e89d410 websocket update 2023-02-23 12:14:58 +08:00
wangchuxiao
d7a649f699 fix mongoDB bug 2023-02-20 18:58:55 +08:00
wangchuxiao
c758628701 fix mongoDB bug 2023-02-20 18:36:30 +08:00
wangchuxiao
28614e4c13 fix mongoDB bug 2023-02-20 16:14:40 +08:00
wangchuxiao
beb9a37649 Merge branch 'v2.3.0release' 2023-02-20 16:14:11 +08:00
wangchuxiao
0e9810e9ff fix mongoDB bug 2023-02-20 15:13:03 +08:00
wangchuxiao
0c5cec8413 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2023-02-20 10:25:06 +08:00
wangchuxiao
6135ce0919 fix mongoDB bug 2023-02-20 10:24:51 +08:00
Gordon
fdd765f982 extend msg update 2023-02-15 10:45:12 +08:00
Gordon
529821475e ws pb update 2023-02-10 12:37:51 +08:00
Gordon
f2b21cbce6 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2023-02-10 12:31:59 +08:00
Gordon
061ee3abd2 ws pb update 2023-02-10 12:31:35 +08:00
wangchuxiao
e2c53754b5 Merge remote-tracking branch 'origin/main' 2023-02-10 11:33:45 +08:00
wangchuxiao
f328ebc300 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2023-02-10 11:32:25 +08:00
wangchuxiao
135c2c36aa errcode 2023-02-10 11:32:02 +08:00
Gordon
16cf98213c extend msg update 2023-02-09 15:54:59 +08:00
Gordon
094911bab2 Merge branch 'v2.3.0release'
# Conflicts:
#	README.md
#	config/config.yaml
2023-02-08 11:53:54 +08:00
Gordon
6ee90b60c3 remove super group add kicked user notification 2023-02-08 10:21:59 +08:00
skiffer-git
c80b625977 Update config.example.yaml 2023-02-03 13:52:39 +08:00
skiffer-git
cc4ae8648e Update README.md 2023-02-03 09:55:38 +08:00
skiffer-git
4f7eead38c Update config.yaml 2023-02-02 18:04:08 +08:00
skiffer-git
386a99edbd Update config.yaml 2023-02-02 17:47:38 +08:00
skiffer-git
982506c2fb Update config.yaml 2023-02-02 17:38:47 +08:00
skiffer-git
5767a0fadc Update config.yaml 2023-02-02 17:33:09 +08:00
skiffer-git
a01fec538e Update config.yaml 2023-02-02 17:30:27 +08:00
skiffer-git
d451c36b2d Update config.yaml 2023-02-02 17:24:15 +08:00
skiffer-git
0ae8433436 Update README.md 2023-02-02 14:57:57 +08:00
Gordon
863c90e8bd del msg bug fix 2023-02-01 17:44:34 +08:00
Gordon
396a87ab71 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2023-02-01 17:37:47 +08:00
Gordon
a60b584dca kick group member add kicked notification 2023-02-01 17:33:56 +08:00
Gordon
3cb3b6ba2d group update 2023-01-31 10:07:48 +08:00
Gordon
16fbf7c63e set revoke message not to count 2023-01-28 22:29:52 +08:00
Gordon
b980c9e751 db update 2023-01-18 11:54:46 +08:00
Gordon
127d45abc9 db update 2023-01-18 11:53:36 +08:00
Gordon
e99f441e50 db update 2023-01-18 11:37:10 +08:00
Gordon
186cfa7226 remove notification limit 2023-01-17 15:53:49 +08:00
skiffer-git
7627ebed5c Update README.md 2023-01-16 20:50:42 +08:00
Gordon
1be159b47c resp return update 2023-01-16 17:19:44 +08:00
Gordon
4e3ab62f6c log 2023-01-16 16:24:41 +08:00
Gordon
85cb95602d Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2023-01-16 16:00:49 +08:00
Gordon
ff917466eb log 2023-01-16 16:00:11 +08:00
wangchuxiao
1235715c22 push 2023-01-16 15:49:10 +08:00
wangchuxiao
1393e40eb9 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release
# Conflicts:
#	internal/rpc/user/user.go
2023-01-16 15:17:42 +08:00
wangchuxiao
442c838bda Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release
# Conflicts:
#	internal/rpc/user/user.go
2023-01-16 15:05:07 +08:00
wangchuxiao
ea5039d2ae Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release
# Conflicts:
#	internal/rpc/user/user.go
2023-01-16 14:53:29 +08:00
wangchuxiao
8f2e9f5261 sg recv opt 2023-01-16 14:52:12 +08:00
Gordon
e1147aff9e user update 2023-01-16 13:26:14 +08:00
wangchuxiao
f9b39e91ee Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2023-01-13 19:47:47 +08:00
wangchuxiao
4bf73b0a47 sg recv opt 2023-01-13 19:47:32 +08:00
Gordon
05ee20613b reaction message update 2023-01-13 18:28:09 +08:00
Gordon
286163ce18 reaction message update 2023-01-13 17:42:23 +08:00
Gordon
f0976c9ade reaction message update 2023-01-13 17:04:52 +08:00
Gordon
1ab7660f0d remove extend msg limit 2023-01-13 13:57:24 +08:00
Gordon
84c7b8827e message 2023-01-13 11:32:02 +08:00
Gordon
5e1aa43793 file update 2023-01-12 10:59:42 +08:00
skiffer-git
a9b71e5a96 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2023-01-11 16:00:56 +08:00
skiffer-git
08ed131e19 sendKickMsg add operationID 2023-01-11 16:00:38 +08:00
Gordon
85e3a81419 super group remove unread message 2023-01-11 14:33:33 +08:00
wangchuxiao
818ed107c6 fix Pb2String 2023-01-10 13:07:42 +08:00
wangchuxiao
4f322254b0 fix Pb2String 2023-01-09 19:11:50 +08:00
wangchuxiao
decd6a98be Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2023-01-09 18:58:53 +08:00
wangchuxiao
5ae35bfee1 fix Pb2String 2023-01-09 18:58:40 +08:00
Gordon
a6ba349cb6 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2023-01-06 16:13:35 +08:00
Gordon
3e3818d4b5 reaction message update 2023-01-06 16:11:49 +08:00
withchao
6661c5baac group member cache 2023-01-05 16:11:20 +08:00
Gordon
e813016402 del msg 2023-01-04 17:14:30 +08:00
wangchuxiao
924aa8ecb5 Merge branch 'main' into v2.3.0release 2023-01-03 18:17:39 +08:00
wangchuxiao
64edd9b7ea fix script 2023-01-03 18:16:32 +08:00
wangchuxiao
4400423fca add group proto 2023-01-03 18:08:59 +08:00
wangchuxiao
0554778c83 add group proto 2023-01-03 17:26:25 +08:00
wangchuxiao
2bc6d77d10 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2023-01-03 17:08:45 +08:00
wangchuxiao
7ac790e4d0 Merge branch 'v2.3.0release' 2023-01-03 17:01:54 +08:00
wangchuxiao
0732fe6171 update version for docker 2023-01-03 17:01:39 +08:00
wangchuxiao
d7b3ea0a6e Merge branch 'main' of github.com:OpenIMSDK/Open-IM-Server 2023-01-03 16:58:40 +08:00
Gordon
0a2b6605d7 core version 2023-01-03 16:39:54 +08:00
Gordon
f559795ba3 file add 2023-01-03 16:39:27 +08:00
Gordon
6b8b5f7896 push update 2023-01-02 19:07:24 +08:00
Gordon
1bf4fa0d87 push update 2023-01-02 19:07:05 +08:00
Gordon
d53507b7b6 callback update 2022-12-30 12:04:48 +08:00
Gordon
787bfccc2c Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-12-30 11:44:30 +08:00
Gordon
955bfe3f40 callback update 2022-12-30 11:44:17 +08:00
wangchuxiao
78d7588af7 kfk log 2022-12-29 19:10:43 +08:00
wangchuxiao
bbde362570 Merge branch 'v2.3.0release' of https://github.com/OpenIMSDK/Open-IM-Server into v2.3.0release 2022-12-29 11:01:25 +08:00
wangchuxiao
972dd5f531 fix bug 2022-12-29 11:00:41 +08:00
withchao
464320a3ec Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-12-28 21:24:51 +08:00
wangchuxiao
2aa49f080e cron 2022-12-28 19:19:26 +08:00
wangchuxiao
9dac12cf2b cron 2022-12-28 18:56:49 +08:00
wangchuxiao
d1f3266383 cron 2022-12-28 18:00:09 +08:00
withchao
1e2a60c802 join group 2022-12-28 17:56:13 +08:00
wangchuxiao
ee9c3cbde3 cron 2022-12-28 17:49:41 +08:00
wangchuxiao
235be5da0c cron 2022-12-28 17:26:53 +08:00
withchao
29adb5de07 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-12-28 17:09:39 +08:00
withchao
4618bf990d invite user to group 2022-12-28 16:17:54 +08:00
wangchuxiao
0a57830925 test cron 2022-12-28 15:42:52 +08:00
wangchuxiao
71a2090363 test cron 2022-12-28 15:41:04 +08:00
withchao
e420871e1f agree user join group 2022-12-28 15:38:27 +08:00
wangchuxiao
01b2de80ae test cron 2022-12-28 15:33:53 +08:00
wangchuxiao
cdd86349d0 test cron 2022-12-28 15:27:04 +08:00
wangchuxiao
45293152bb test cron 2022-12-28 15:20:04 +08:00
wangchuxiao
7bf7686314 test cron 2022-12-28 14:54:22 +08:00
wangchuxiao
5888dc3b5d test cron 2022-12-28 14:20:17 +08:00
wangchuxiao
3d9355848b test cron 2022-12-28 14:13:16 +08:00
wangchuxiao
7033b603ca test cron 2022-12-28 13:56:07 +08:00
wangchuxiao
71ad683614 test cron 2022-12-28 12:42:17 +08:00
wangchuxiao
1fdc4d06d1 test cron 2022-12-28 12:10:10 +08:00
wangchuxiao
cff9ee39be test cron 2022-12-28 12:02:56 +08:00
wangchuxiao
458f872fe3 test cron 2022-12-28 11:47:39 +08:00
wangchuxiao
ac99da044a test cron 2022-12-28 11:33:49 +08:00
wangchuxiao
a6bd8e5205 test cron 2022-12-28 11:15:15 +08:00
wangchuxiao
f9fdd540f9 test cron 2022-12-28 11:03:12 +08:00
wangchuxiao
1706f5df07 test cron 2022-12-28 11:02:14 +08:00
wangchuxiao
40fc3e6c08 test cron 2022-12-28 10:58:30 +08:00
wangchuxiao
2608ae58df test cron 2022-12-28 10:55:00 +08:00
wangchuxiao
0e62deed0a test cron 2022-12-27 22:27:44 +08:00
wangchuxiao
e588091bf6 mongodb 2022-12-27 11:01:21 +08:00
wangchuxiao
eb49b27e16 Merge branch 'v2.3.0release' of https://github.com/OpenIMSDK/Open-IM-Server into v2.3.0release 2022-12-26 10:25:53 +08:00
wangchuxiao
4fd31e4367 getui 2022-12-26 10:25:42 +08:00
Gordon
aaad0c03a6 callback update 2022-12-23 16:31:37 +08:00
Gordon
1026a6b2b6 Merge remote-tracking branch 'origin/modify' into v2.3.0release
# Conflicts:
#	config/config.yaml
#	pkg/common/constant/constant.go
#	pkg/proto/sdk_ws/ws.pb.go
#	pkg/proto/sdk_ws/ws.proto
2022-12-23 16:16:28 +08:00
Gordon
f5ed0be023 callback update 2022-12-23 16:09:59 +08:00
Gordon
a7f44b6ce7 callback update 2022-12-23 16:05:51 +08:00
wangchuxiao
481f12af5e Merge branch 'v2.3.0release' of https://github.com/OpenIMSDK/Open-IM-Server into v2.3.0release 2022-12-23 10:51:00 +08:00
Gordon
16a7bc63f2 callback update 2022-12-22 17:37:34 +08:00
wangchuxiao
e8dc5ce085 push 2022-12-22 17:35:09 +08:00
Gordon
98ce12d74e Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-12-22 17:25:29 +08:00
Gordon
edb09f2081 callback update 2022-12-22 17:25:14 +08:00
Gordon
86fc0e4101 reaction message update 2022-12-22 17:23:14 +08:00
wangchuxiao
fb72f4b1ae push 2022-12-22 17:17:28 +08:00
wangchuxiao
6bf0a3a804 push 2022-12-22 16:28:36 +08:00
wangchuxiao
4bcaa5eaca push 2022-12-22 15:42:16 +08:00
wangchuxiao
8ca6584299 push 2022-12-22 15:23:46 +08:00
wangchuxiao
e86e8820f3 push 2022-12-22 11:30:19 +08:00
wangchuxiao
07c300f35f push 2022-12-22 11:10:19 +08:00
wangchuxiao
b08936c27e push 2022-12-21 19:56:25 +08:00
wangchuxiao
0b4b408552 push 2022-12-21 18:58:36 +08:00
wangchuxiao
36e37052e0 push 2022-12-21 18:37:58 +08:00
wangchuxiao
9a3373a43d push 2022-12-21 18:29:31 +08:00
wangchuxiao
428e5a7a4e push 2022-12-21 18:15:25 +08:00
wangchuxiao
7445b84756 push 2022-12-21 18:03:39 +08:00
wangchuxiao
fa5be03fc3 push 2022-12-21 17:41:35 +08:00
wangchuxiao
49b21fb577 push 2022-12-21 17:39:48 +08:00
wangchuxiao
1f7e788585 push 2022-12-21 17:30:49 +08:00
wangchuxiao
43ac9de714 getui 2022-12-21 16:55:44 +08:00
wangchuxiao
e80afa610d getui 2022-12-21 16:46:16 +08:00
Gordon
20a2cb3d3c reaction message update 2022-12-19 11:18:23 +08:00
Gordon
26b3f742ce pb 2022-12-18 13:16:26 +08:00
Gordon
2ccbade642 pb 2022-12-18 12:29:39 +08:00
Gordon
fc8523da46 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-12-16 17:23:01 +08:00
Gordon
b67ad01d97 platform update 2022-12-16 17:22:40 +08:00
wangchuxiao
cdf49b2e37 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-12-16 16:54:31 +08:00
wangchuxiao
920a7cfdac set groupMemberInfo callback 2022-12-16 16:54:18 +08:00
Gordon
023ec9e53e Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-12-16 16:18:36 +08:00
Gordon
7c9b4576f0 platform update 2022-12-16 16:17:53 +08:00
wangchuxiao
4f2d543651 Merge branch 'main' into v2.3.0release 2022-12-16 15:56:04 +08:00
Gordon
25aa6a4345 message reaction 2022-12-16 15:52:30 +08:00
wangchuxiao
0b9d9fa8d7 install script 2022-12-15 18:43:52 +08:00
skiffer-git
a01781d5b7 Get Internet IP automatically 2022-12-15 17:21:04 +08:00
skiffer-git
b15ae542aa check time synchronize 2022-12-14 17:40:51 +08:00
skiffer-git
b68f69dfc7 Merge branch 'v2.3.0release' of https://github.com/OpenIMSDK/Open-IM-Server into v2.3.0release 2022-12-14 17:36:03 +08:00
skiffer-git
7d1cafc3d3 check time synchronize 2022-12-14 17:35:48 +08:00
wangchuxiao
386c837f1a pb 2022-12-14 16:14:56 +08:00
wangchuxiao
be8c544da3 proto 2022-12-14 16:14:12 +08:00
skiffer-git
a78e43bfe3 Simplify logs 2022-12-14 15:22:06 +08:00
skiffer-git
7b57b924ee Simplify logs 2022-12-14 14:52:39 +08:00
skiffer-git
46ee4e41a1 simplify init logging 2022-12-14 14:15:53 +08:00
Gordon
f87eed1336 reaction message add expiration 2022-12-13 15:21:27 +08:00
Gordon
e4964b050b reaction message add expiration 2022-12-13 15:19:33 +08:00
wangchuxiao
83f128ddcc upgrade open_im_enterprise 2022-12-13 15:11:42 +08:00
skiffer-git
13b2aa675f Merge branch 'v2.3.0release' of https://github.com/OpenIMSDK/Open-IM-Server into v2.3.0release 2022-12-13 14:45:23 +08:00
skiffer-git
a98f89a4e7 Update group application list for group administrator 2022-12-13 14:43:09 +08:00
wangchuxiao
d42d4308e5 upgrade enterprise 2022-12-13 13:59:58 +08:00
wangchuxiao
0608649961 upgrade enterprise 2022-12-13 13:58:51 +08:00
wangchuxiao
3013af8e62 upgrade enterprise 2022-12-13 12:42:04 +08:00
Gordon
915118140f reaction message add expiration 2022-12-12 20:41:40 +08:00
wangchuxiao
a662414b7f Merge branch 'modify' of github.com:OpenIMSDK/Open-IM-Server into modify
# Conflicts:
#	pkg/proto/msg/msg.pb.go
2022-12-12 19:53:04 +08:00
wangchuxiao
112ce9b450 Merge branch 'modify' of github.com:OpenIMSDK/Open-IM-Server into modify
# Conflicts:
#	pkg/proto/msg/msg.pb.go
2022-12-12 19:24:53 +08:00
wangchuxiao
0f1208dba9 mongo operation 2022-12-12 19:22:50 +08:00
Gordon
21dcb55c82 reaction message add expiration 2022-12-12 19:15:42 +08:00
Gordon
25871aea49 reaction message add expiration 2022-12-12 19:15:31 +08:00
Gordon
63d75bb68b reaction message add expiration 2022-12-12 17:36:12 +08:00
Gordon
8e95e8c4f8 reaction message add expiration 2022-12-12 16:52:52 +08:00
Gordon
2b0a997573 reaction message add expiration 2022-12-12 16:52:36 +08:00
Gordon
84df956293 reaction message add expiration 2022-12-12 15:39:40 +08:00
Gordon
1acf21371b reaction message add expiration 2022-12-12 15:35:02 +08:00
Gordon
acee47e861 reaction message add expiration 2022-12-12 15:34:49 +08:00
skiffer-git
2dab70697c set group member ex == "" if ex == nil 2022-12-12 14:46:49 +08:00
Gordon
b3f5c2f185 reaction message add expiration 2022-12-12 12:12:53 +08:00
skiffer-git
25a848c4e4 Merge branch 'v2.3.0release' of https://github.com/OpenIMSDK/Open-IM-Server into v2.3.0release 2022-12-12 11:43:56 +08:00
Gordon
ad814b6cbb add web push 2022-12-12 11:16:55 +08:00
Gordon
ac55951c74 message reaction 2022-12-11 13:16:24 +08:00
Gordon
a0520ce5d8 log 2022-12-10 20:12:13 +08:00
Gordon
6f20cdd905 reaction message 2022-12-09 20:53:13 +08:00
wangchuxiao
6d45f0730c mongo operation 2022-12-09 19:54:49 +08:00
wangchuxiao
24288aa597 modify msg 2022-12-09 18:03:40 +08:00
wangchuxiao
66f49feebb modify msg 2022-12-09 17:29:18 +08:00
wangchuxiao
b77bbe6a66 modify msg 2022-12-09 16:55:01 +08:00
wangchuxiao
084fe0e00f Merge branch 'modify' of github.com:OpenIMSDK/Open-IM-Server into modify 2022-12-09 16:42:56 +08:00
wangchuxiao
7f449aed5b modify msg 2022-12-09 16:42:43 +08:00
Gordon
9cb30e0ec6 reaction message 2022-12-09 14:28:24 +08:00
skiffer-git
1d78b68831 set group member ex == "" if ex == nil 2022-12-09 13:18:36 +08:00
wangchuxiao
0fbf882059 modify 2022-12-09 12:18:38 +08:00
wangchuxiao
4d56dfdfa2 modify 2022-12-09 12:13:14 +08:00
wangchuxiao
53cd4205e8 modify 2022-12-09 10:45:51 +08:00
wangchuxiao
a4e2e23fbe modify 2022-12-08 19:50:28 +08:00
wangchuxiao
0e726a20ba modify 2022-12-08 12:54:39 +08:00
wangchuxiao
be01c4da0c dek jinzhu 2022-12-07 21:12:48 +08:00
Gordon
f190611bcc add friend notification 2022-12-07 10:56:57 +08:00
skiffer-git
c0a2abeae9 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-12-07 10:01:28 +08:00
skiffer-git
5d4600a080 Separate the notification 2022-12-07 10:00:53 +08:00
Gordon
e6136cac08 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-12-06 22:42:48 +08:00
Gordon
f2a35fb833 callback add seq 2022-12-06 21:26:47 +08:00
wangchuxiao
11342a54c9 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-12-06 15:43:10 +08:00
wangchuxiao
ab176b5b1d app background 2022-12-06 15:42:57 +08:00
skiffer-git
189911c77f Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-12-06 14:45:07 +08:00
wangchuxiao
4c9859a1ac ws backgroundStatus 2022-12-06 14:24:29 +08:00
skiffer-git
01b1116017 log 2022-12-06 13:06:20 +08:00
skiffer-git
d3af2e6547 log 2022-12-06 12:51:39 +08:00
skiffer-git
b5a031be9f log 2022-12-06 12:06:37 +08:00
wangchuxiao
c24b0e1425 ws connID 2022-12-06 10:37:16 +08:00
wangchuxiao
4272955097 ws connID 2022-12-05 18:44:19 +08:00
wangchuxiao
0a267f69e6 ws connID 2022-12-05 18:42:53 +08:00
wangchuxiao
5d5788e67e ws connID 2022-12-05 18:38:24 +08:00
wangchuxiao
10ec7e8708 ws connID 2022-12-05 18:36:11 +08:00
wangchuxiao
233ecf8b5f ws connID 2022-12-05 18:35:34 +08:00
wangchuxiao
156c6429d3 ws connID 2022-12-05 18:34:51 +08:00
wangchuxiao
d5e7d3298a Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-12-05 18:30:13 +08:00
wangchuxiao
837efc90b6 ws connID 2022-12-05 18:29:58 +08:00
skiffer-git
9394d340a2 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-12-05 17:10:15 +08:00
skiffer-git
be820e8401 set MaxNotificationNum = 500 2022-12-05 17:10:00 +08:00
wangchuxiao
75629ba5ea group 2022-12-05 16:44:46 +08:00
wangchuxiao
7e428e8f94 group 2022-12-05 16:34:54 +08:00
wangchuxiao
5a69eb2dd3 group 2022-12-05 16:27:01 +08:00
wangchuxiao
5b5abd2601 ws 2022-12-05 15:49:08 +08:00
wangchuxiao
7c302cb19c ws 2022-12-05 14:55:38 +08:00
wangchuxiao
71c836ae1a ws 2022-12-05 14:53:16 +08:00
wangchuxiao
b2be663ba6 conversation 2022-12-05 11:30:54 +08:00
wangchuxiao
f6533b2ca4 group admin send mute msg 2022-12-02 18:39:15 +08:00
wangchuxiao
a499112ece group admin send mute msg 2022-12-02 17:27:12 +08:00
wangchuxiao
df78d87ec5 ex msg 2022-12-02 16:40:11 +08:00
wangchuxiao
a9edd036e0 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-12-01 19:35:10 +08:00
wangchuxiao
b75507396b EX MSG 2022-12-01 19:34:54 +08:00
Gordon
6f69653a8b Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-12-01 14:55:42 +08:00
Gordon
14fd7444e8 callback add seq 2022-12-01 14:55:30 +08:00
wangchuxiao
8d66128009 mongo 2022-12-01 01:40:13 +08:00
wangchuxiao
d9ecfddecd error log 2022-11-30 18:04:58 +08:00
wangchuxiao
19da03dfa4 msg rpc max 2022-11-30 16:13:03 +08:00
wangchuxiao
271934ef4b fix groupMuted send msg 2022-11-29 18:08:47 +08:00
wangchuxiao
6f22b37e1d fix groupMuted send msg 2022-11-29 14:41:20 +08:00
wangchuxiao
ad2df2f36f conn 2022-11-29 12:07:48 +08:00
wangchuxiao
99739810a0 conn 2022-11-29 11:57:21 +08:00
wangchuxiao
d2c1daf4e3 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-11-29 11:40:16 +08:00
wangchuxiao
a30c8953c8 conn 2022-11-29 11:39:39 +08:00
Gordon
a6d676700d compression 2022-11-29 10:56:41 +08:00
Gordon
66aa690104 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-11-29 10:31:23 +08:00
Gordon
05b6fb4a7d compression 2022-11-29 10:31:13 +08:00
wangchuxiao
c1c72927c1 conn 2022-11-29 10:13:46 +08:00
wangchuxiao
d78bf6d1e1 conn 2022-11-28 19:32:31 +08:00
wangchuxiao
86512f0dcb conn 2022-11-28 19:12:30 +08:00
wangchuxiao
f738113020 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-11-28 19:09:56 +08:00
wangchuxiao
1be16380da conn 2022-11-28 19:09:38 +08:00
Gordon
a9bb365760 user get token add account judge 2022-11-26 12:09:36 +08:00
skiffer-git
10a0666de9 Update README.md 2022-11-25 19:56:28 +08:00
wangchuxiao
cf8dc4e529 cron 2022-11-25 18:50:51 +08:00
wangchuxiao
ebed875c46 get chat log do not need time 2022-11-25 12:04:17 +08:00
wangchuxiao
8ac36526a8 get chat log do not need time 2022-11-25 12:02:14 +08:00
wangchuxiao
dce0e370cf get chat log do not need time 2022-11-25 11:45:01 +08:00
wangchuxiao
067d23e2bc cron 2022-11-24 19:24:04 +08:00
wangchuxiao
e494d21a57 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-11-24 19:17:49 +08:00
wangchuxiao
0654ecc9bb cron 2022-11-24 19:17:29 +08:00
Gordon
b235c71c76 offline 2022-11-24 17:41:27 +08:00
Gordon
07842b0fa7 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-11-24 14:21:01 +08:00
Gordon
e0ad4e6e7b offline 2022-11-24 14:20:32 +08:00
wangchuxiao
9be70d640e api 2022-11-23 11:08:44 +08:00
skiffer-git
44a9724827 readme 2022-11-23 09:47:24 +08:00
wangchuxiao
9065e8ed25 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-11-22 18:28:43 +08:00
wangchuxiao
e1c7c11bdf fix callback 2022-11-22 18:28:37 +08:00
skiffer-git
56436adf4d Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-11-22 16:20:35 +08:00
skiffer-git
1a8197aef1 add admin platform id 2022-11-22 16:20:18 +08:00
wangchuxiao
e9f6521c6a add callback and fix cache 2022-11-22 14:44:52 +08:00
wangchuxiao
07cdd8bbab add callback and fix cache 2022-11-22 14:18:57 +08:00
wangchuxiao
53d7f60ebc Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-11-22 11:08:00 +08:00
wangchuxiao
819ebf0ede add callback and fix cache 2022-11-22 11:07:20 +08:00
Gordon
157f858975 user 2022-11-21 15:57:56 +08:00
Gordon
a1a79ea619 user 2022-11-21 15:47:30 +08:00
Gordon
672de78c81 user 2022-11-21 15:41:38 +08:00
wangchuxiao
d446bbb451 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-11-21 10:21:09 +08:00
wangchuxiao
135973de09 fix bug 2022-11-21 10:20:56 +08:00
Gordon
9fddf6819b user notification 2022-11-20 17:45:49 +08:00
wangchuxiao
7f9812a488 cron 2022-11-18 18:16:44 +08:00
wangchuxiao
f3a16e1ecd cron 2022-11-18 18:09:43 +08:00
wangchuxiao
11405adcf6 cron test 2022-11-18 17:35:45 +08:00
wangchuxiao
c0d7f0f5fd cron test 2022-11-18 16:59:31 +08:00
wangchuxiao
68ad1e9645 log print size 2022-11-18 10:45:48 +08:00
wangchuxiao
4b0a95fc1b fix bug 2022-11-17 16:18:13 +08:00
wangchuxiao
fdb0ba4349 msg size 2022-11-17 11:17:26 +08:00
wangchuxiao
4a3f168720 gzip msg 2022-11-16 19:26:49 +08:00
wangchuxiao
05d83ebe8b gzip msg 2022-11-16 18:55:42 +08:00
wangchuxiao
9aaee04a69 read after burn time 2022-11-16 12:40:44 +08:00
wangchuxiao
3f5dd5bad8 read after burn time 2022-11-16 11:54:24 +08:00
wangchuxiao
e53a895471 check script 2022-11-15 19:31:43 +08:00
wangchuxiao
bfc8314f52 Merge branch 'main' of github.com:OpenIMSDK/Open-IM-Server 2022-11-15 19:19:41 +08:00
wangchuxiao
199d2e8298 Merge branch 'main' into v2.3.0release 2022-11-15 19:14:40 +08:00
wangchuxiao
4c7d7fad1b Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-11-15 19:14:07 +08:00
wangchuxiao
df58abfcdb check script 2022-11-15 19:13:53 +08:00
skiffer-git
710d37c640 config 2022-11-15 19:08:58 +08:00
skiffer-git
56c63fb1a1 config 2022-11-15 19:07:31 +08:00
wangchuxiao
3e21c841be docker 2022-11-15 18:29:33 +08:00
wangchuxiao
298763a4a7 docker 2022-11-15 18:28:27 +08:00
wangchuxiao
d6f8f9704c docker 2022-11-15 15:55:02 +08:00
wangchuxiao
f3e5b03af2 docker 2022-11-15 14:55:03 +08:00
wangchuxiao
603f0d289a docker 2022-11-15 14:49:50 +08:00
wangchuxiao
e7f0979c9e docker 2022-11-15 14:30:31 +08:00
wangchuxiao
9b69a5c8f2 docker 2022-11-15 14:27:29 +08:00
wangchuxiao
99b445e7bc docker 2022-11-15 14:09:39 +08:00
wangchuxiao
a85bbc8ce8 docker 2022-11-15 11:21:51 +08:00
wangchuxiao
ea85628389 etcd conf 2022-11-14 20:03:09 +08:00
wangchuxiao
bafd2f3b86 etcd conf 2022-11-14 19:58:57 +08:00
wangchuxiao
bd7009732f etcd conf 2022-11-14 19:45:05 +08:00
wangchuxiao
051f73013c etcd conf 2022-11-14 19:36:49 +08:00
wangchuxiao
6484b796cd etcd conf 2022-11-14 19:24:20 +08:00
wangchuxiao
7a5a308c9b etcd conf 2022-11-14 19:21:56 +08:00
wangchuxiao
4709e536ee etcd conf 2022-11-14 19:19:56 +08:00
wangchuxiao
4eb5df3f28 etcd conf 2022-11-14 19:14:51 +08:00
wangchuxiao
d3751da0e4 etcd conf 2022-11-14 19:07:44 +08:00
wangchuxiao
de90205b66 etcd conf 2022-11-14 19:07:34 +08:00
wangchuxiao
5d54225f9d etcd conf 2022-11-14 19:04:34 +08:00
wangchuxiao
a556cfcd40 etcd conf 2022-11-14 18:37:42 +08:00
wangchuxiao
405a60c4f8 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release
# Conflicts:
#	config/usualConfig.yaml
2022-11-14 18:35:53 +08:00
wangchuxiao
de528270a2 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release
# Conflicts:
#	config/usualConfig.yaml
2022-11-14 18:18:48 +08:00
wangchuxiao
ea0365b9da Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release
# Conflicts:
#	config/usualConfig.yaml
2022-11-14 18:17:41 +08:00
wangchuxiao
f8ca38b7e3 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release
# Conflicts:
#	config/usualConfig.yaml
2022-11-14 18:07:14 +08:00
wangchuxiao
bfeb434920 conf script 2022-11-14 18:03:44 +08:00
skiffer-git
7101ba472d config 2022-11-14 16:02:00 +08:00
wangchuxiao
a314f2d1cb conf script 2022-11-14 15:42:50 +08:00
wangchuxiao
99e1c53a41 conf script 2022-11-14 15:41:24 +08:00
wangchuxiao
b21cc930af Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-11-14 15:37:51 +08:00
wangchuxiao
ccad06b7b6 conf script 2022-11-14 15:37:32 +08:00
wangchuxiao
7364dc1989 fix config 2022-11-12 17:12:06 +08:00
wangchuxiao
5b816b095d fix conf 2022-11-11 19:01:23 +08:00
wangchuxiao
08a4b92f3a mute member cant send msg 2022-11-11 18:06:15 +08:00
wangchuxiao
3c8a0bb011 k8s version update 2022-11-11 15:24:37 +08:00
wangchuxiao
d6e14eafef k8s version update 2022-11-11 15:18:04 +08:00
wangchuxiao
15df8e0a08 k8s version update 2022-11-11 12:17:04 +08:00
wangchuxiao
42d9e7175f k8s version update 2022-11-11 11:22:45 +08:00
wangchuxiao
2aa7d6095d Merge branch 'main' into v2.3.0release 2022-11-11 11:21:22 +08:00
wangchuxiao
31aa75d745 k8s version update 2022-11-11 11:16:17 +08:00
wangchuxiao
dfd2847c12 Merge branch 'v2.3.0release' 2022-11-11 11:04:30 +08:00
wangchuxiao
db5f9572b1 Merge branch 'main' of github.com:OpenIMSDK/Open-IM-Server
# Conflicts:
#	.env
#	config/config.yaml
#	script/.env
2022-11-11 11:03:02 +08:00
wangchuxiao
cb9db10052 Merge branch 'main' of github.com:OpenIMSDK/Open-IM-Server
# Conflicts:
#	.env
#	config/config.yaml
#	script/.env
2022-11-11 10:56:47 +08:00
skiffer-git
66960b147a nginx config 2022-11-10 22:09:05 +08:00
wangchuxiao
8ec4f2e814 add usualConfig` 2022-11-10 19:09:15 +08:00
wangchuxiao
081e34f953 add usualConfig` 2022-11-10 18:45:46 +08:00
wangchuxiao
2800eef199 add usualConfig` 2022-11-10 18:41:16 +08:00
wangchuxiao
08f3a79e6e add usualConfig 2022-11-10 18:23:11 +08:00
wangchuxiao
1c528b0f04 fix friend bug 2022-11-10 18:05:14 +08:00
wangchuxiao
c5d144bcc4 fix friend bug 2022-11-10 17:37:46 +08:00
wangchuxiao
9a9d6ac524 config 2022-11-10 15:32:01 +08:00
skiffer-git
6ced618c1c nginx config 2022-11-10 14:56:29 +08:00
wangchuxiao
bb1babad11 config 2022-11-10 14:51:35 +08:00
wangchuxiao
1a93592253 Merge branch 'main' into v2.3.0release
# Conflicts:
#	.env
#	install_im_server.sh
2022-11-10 14:30:00 +08:00
skiffer-git
e52be45659 slack 2022-11-10 14:26:39 +08:00
skiffer-git
e7e08a94a9 slack 2022-11-10 14:24:30 +08:00
skiffer-git
d22c3867c1 slack 2022-11-10 09:23:28 +08:00
skiffer-git
e52f65f690 slack 2022-11-10 09:23:19 +08:00
skiffer-git
dfcfa643f0 nginx config 2022-11-09 21:05:14 +08:00
wangchuxiao
a986068cbb Merge branch 'main' into v2.3.0release
# Conflicts:
#	.env
#	install_im_server.sh
2022-11-09 19:40:16 +08:00
skiffer-git
af6915b1b0 install_im_server 2022-11-09 18:24:45 +08:00
wangchuxiao
af46999a16 Merge branch 'main' into v2.3.0release
# Conflicts:
#	.env
#	install_im_server.sh
2022-11-09 18:18:35 +08:00
skiffer-git
322ec26829 install_im_server 2022-11-09 15:52:59 +08:00
skiffer-git
935f80cd8a install_im_server 2022-11-09 15:52:01 +08:00
skiffer-git
8379652ad5 config 2022-11-09 15:49:11 +08:00
skiffer-git
decef23751 config 2022-11-09 12:36:55 +08:00
skiffer-git
c639cf7162 2.3.4 2022-11-09 12:07:17 +08:00
skiffer-git
2785ab6913 Merge remote-tracking branch 'origin/main' 2022-11-09 12:06:35 +08:00
skiffer-git
d92aca5b16 Optimize the script 2022-11-09 12:06:07 +08:00
wangchuxiao
4cf00a4198 Merge branch 'main' of github.com:OpenIMSDK/Open-IM-Server 2022-11-09 10:49:38 +08:00
wangchuxiao
f6b549678d fix k8s 2022-11-09 10:40:50 +08:00
wangchuxiao
978a7e209e Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-11-08 17:10:45 +08:00
skiffer-git
b06b8e4d2b Optimize the configuration 2022-11-08 17:10:27 +08:00
wangchuxiao
3a3412486a fix callback bug 2022-11-08 17:10:27 +08:00
skiffer-git
624014572c Optimize the configuration 2022-11-08 17:06:18 +08:00
skiffer-git
24d917bb2d Optimize the configuration 2022-11-08 17:04:18 +08:00
skiffer-git
2a4fae4718 Optimize the configuration 2022-11-08 17:01:18 +08:00
skiffer-git
9f4a8952a4 remove log 2022-11-08 11:13:07 +08:00
skiffer-git
029c020fe0 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-11-08 11:12:00 +08:00
skiffer-git
1f0040ceb6 Specify the relative path for the configuration file 2022-11-08 11:08:27 +08:00
wangchuxiao
76a3334f9d test cron 2022-11-04 18:40:38 +08:00
wangchuxiao
22d0d80bfe test cron 2022-11-04 17:56:21 +08:00
wangchuxiao
de13f5edbd test cron 2022-11-04 16:29:38 +08:00
wangchuxiao
953e284566 test cron 2022-11-04 16:24:56 +08:00
wangchuxiao
1b3fbf56d0 test cron 2022-11-04 16:18:45 +08:00
skiffer-git
83779a684b limit memory 2022-11-04 15:00:54 +08:00
skiffer-git
d33e15a2bb log 2022-11-04 15:00:42 +08:00
skiffer-git
a9b60b8052 encryption 2022-11-04 15:00:42 +08:00
skiffer-git
329d475106 limit memory 2022-11-04 15:00:28 +08:00
wangchuxiao
2cbecf439e test cron 2022-11-03 20:08:56 +08:00
wangchuxiao
389271c00d test cron 2022-11-03 19:50:06 +08:00
wangchuxiao
8839c36917 test cron 2022-11-03 19:26:41 +08:00
wangchuxiao
3649846423 test cron 2022-11-03 19:23:10 +08:00
wangchuxiao
f3858e8300 test cron 2022-11-03 19:19:43 +08:00
wangchuxiao
741cfec1ec test cron 2022-11-03 19:16:23 +08:00
wangchuxiao
9326b10d3a Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-11-03 18:31:51 +08:00
wangchuxiao
6d90cd59f2 test cron 2022-11-03 18:31:29 +08:00
Gordon
5c503e71ed message update 2022-11-02 15:32:36 +08:00
wangchuxiao
cdf851d196 test cron 2022-11-02 12:00:23 +08:00
wangchuxiao
bf09e49164 test cron 2022-11-02 11:55:48 +08:00
wangchuxiao
d391a4d023 test cron 2022-11-02 11:40:55 +08:00
wangchuxiao
9182f15ee0 test cron 2022-11-02 11:17:20 +08:00
wangchuxiao
be6811ddbd test cron 2022-11-01 19:51:10 +08:00
wangchuxiao
10d299d1b3 test cron 2022-11-01 19:49:19 +08:00
wangchuxiao
4989bb07f6 test cron 2022-11-01 19:39:56 +08:00
wangchuxiao
0d46349386 test cron 2022-11-01 19:18:17 +08:00
wangchuxiao
267e7c3b08 test cron 2022-11-01 19:14:33 +08:00
wangchuxiao
cad689b337 test cron 2022-11-01 19:03:54 +08:00
wangchuxiao
e54d5a13e8 test cron 2022-11-01 18:57:53 +08:00
wangchuxiao
ac7619de55 test cron 2022-11-01 18:51:14 +08:00
wangchuxiao
c75e258f81 test cron 2022-11-01 17:41:08 +08:00
wangchuxiao
e4ed6dde0c test cron 2022-11-01 17:05:48 +08:00
wangchuxiao
9025d8bd90 test cron 2022-11-01 16:54:23 +08:00
wangchuxiao
2433e27eb5 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-10-28 15:43:18 +08:00
wangchuxiao
2610a27894 add birthStr field 2022-10-28 15:42:37 +08:00
Gordon
eba25f1bb8 ws add logout remove push token 2022-10-27 17:15:06 +08:00
Gordon
59b625b7c0 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-10-27 11:46:13 +08:00
Gordon
0eeb2f6752 log 2022-10-27 11:45:42 +08:00
Gordon
cd7b484fc2 message pull 2022-10-22 17:53:15 +08:00
wangchuxiao
16b3ea8b7e callback update 2022-10-21 15:44:55 +08:00
wangchuxiao
942afd7fec callback update 2022-10-20 12:01:06 +08:00
wangchuxiao
de271d5b76 callback update 2022-10-20 12:00:32 +08:00
wangchuxiao
7e826c70df add friend callback 2022-10-19 21:09:05 +08:00
wangchuxiao
162478563c add friend callback 2022-10-19 21:06:48 +08:00
wangchuxiao
8d0ae922b8 k8s deploy 2022-10-17 18:03:18 +08:00
wangchuxiao
2200f757dc Merge branch 'shichuang2' into v2.3.0release 2022-10-17 11:09:10 +08:00
Gordon
4f65882b5d user update 2022-10-11 17:30:21 +08:00
Gordon
5ba67af0e3 message update 2022-10-10 17:51:57 +08:00
wangchuxiao
efeb394f3e k8s deploy 2022-10-09 11:53:46 +08:00
wangchuxiao
9a0ee3516b singal 2022-10-09 11:42:28 +08:00
wangchuxiao
55a873d0ef singal 2022-10-08 15:23:34 +08:00
wangchuxiao
0561f3e398 singal 2022-10-08 15:17:58 +08:00
wangchuxiao
68d587e484 singal 2022-10-08 11:37:11 +08:00
wangchuxiao
c026754a68 singal 2022-10-08 11:04:34 +08:00
wangchuxiao
32561b5616 fix bug 2022-10-06 11:30:45 +08:00
wangchuxiao
6b30097bde index fix 2022-09-30 18:58:19 +08:00
wangchuxiao
7dc1f9b81b index fix 2022-09-30 18:39:10 +08:00
wangchuxiao
9964650014 Merge branch 'main' into v2.3.0release 2022-09-30 17:59:46 +08:00
wangchuxiao
a705f6a8b7 proto 2022-09-30 17:32:06 +08:00
wangchuxiao
151cf3daf2 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-30 11:05:38 +08:00
wangchuxiao
5758f1701d proto 2022-09-30 11:05:32 +08:00
Gordon
ac631f7c49 revoke message 2022-09-29 19:29:22 +08:00
Gordon
e814d9ea63 revoke message 2022-09-29 18:35:47 +08:00
Gordon
d7e88a3213 revoke message 2022-09-29 18:32:20 +08:00
Gordon
9b3dee6aa4 revoke message 2022-09-29 18:31:36 +08:00
Gordon
879ad86e0f revoke message 2022-09-29 18:14:36 +08:00
Gordon
ed63b9f3cc Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-29 17:58:14 +08:00
Gordon
ef3f41bb69 revoke message 2022-09-29 17:57:40 +08:00
Gordon
4d9ed1a6cb revoke message 2022-09-29 17:57:26 +08:00
wangchuxiao
4b8f6f1f66 fix bug 2022-09-29 17:53:02 +08:00
wangchuxiao
cf57f999c5 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-29 17:47:30 +08:00
wangchuxiao
fd9630ea84 fix bug 2022-09-29 17:47:12 +08:00
wangchuxiao
9fed812872 fix bug 2022-09-29 15:53:54 +08:00
wangchuxiao
41b7e5f32d fix bug 2022-09-29 15:24:56 +08:00
wangchuxiao
3345b6e242 fix bug 2022-09-29 15:23:28 +08:00
Gordon
52a4577b4c del msg test 2022-09-28 17:29:08 +08:00
Gordon
267d93168d Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-28 16:45:24 +08:00
Gordon
78895288d0 del msg test 2022-09-28 16:44:50 +08:00
wangchuxiao
249d5e2788 signal 2022-09-28 16:35:20 +08:00
wangchuxiao
488346979d Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-28 15:39:19 +08:00
wangchuxiao
cadecdb3b8 signal 2022-09-28 15:39:03 +08:00
Gordon
9d9d3db701 http status change 2022-09-28 15:33:49 +08:00
Gordon
5b216e6a3a revoke message struct update 2022-09-28 14:43:43 +08:00
wangchuxiao
c03e26ee5e signal 2022-09-27 17:18:25 +08:00
wangchuxiao
bcc2f05aa5 workmoment 2022-09-27 16:59:56 +08:00
wangchuxiao
b18813689d workmoment 2022-09-27 15:45:47 +08:00
wangchuxiao
79999edcea Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-27 15:35:50 +08:00
wangchuxiao
764b34d947 workmoment 2022-09-27 15:35:36 +08:00
Gordon
51fa675e90 callback update 2022-09-26 12:22:28 +08:00
liu ming
e000dc18aa 添加袤博推送 (#284)
Co-authored-by: liuming <liuming@example.com>
2022-09-23 17:40:48 +08:00
skiffer-git
1f81c7ba2d Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-21 20:20:41 +08:00
skiffer-git
c1811463cb add ParseToken rpc 2022-09-21 20:20:26 +08:00
Gordon
7a1dc6da01 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-21 18:58:25 +08:00
Gordon
0a28bcfbe9 mongo index modify 2022-09-21 18:58:15 +08:00
skiffer-git
93f3dd14a5 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-21 18:45:06 +08:00
skiffer-git
6d82c9c3db add ParseToken rpc 2022-09-21 18:44:21 +08:00
Gordon
3714873b7b online push info callback update 2022-09-21 16:14:57 +08:00
Gordon
5534c2a8f8 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-21 16:09:31 +08:00
Gordon
cad23f1672 online push info callback update 2022-09-21 16:09:02 +08:00
skiffer-git
2bf50bb8c2 update proto 2022-09-21 09:23:10 +08:00
skiffer-git
6ad50e4e04 jwt import update 2022-09-21 09:13:58 +08:00
skiffer-git
1c5aae2301 update proto 2022-09-21 09:09:00 +08:00
skiffer-git
aed95ed4fc update proto 2022-09-21 08:40:31 +08:00
skiffer-git
2a97801aae update proto 2022-09-21 08:39:15 +08:00
skiffer-git
c6aefa984d update proto 2022-09-21 08:37:15 +08:00
skiffer-git
5e9f1ac00f update proto 2022-09-21 08:36:33 +08:00
skiffer-git
0a83470019 update proto 2022-09-20 23:33:46 +08:00
skiffer-git
0ed1f6c341 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-20 23:31:47 +08:00
skiffer-git
e85463c4a1 update proto 2022-09-20 23:31:28 +08:00
wangchuxiao
31c18bf856 organization 2022-09-20 19:18:10 +08:00
wangchuxiao
ca1d36556b organization 2022-09-20 11:23:14 +08:00
wangchuxiao
3085bc1443 orgization 2022-09-20 11:14:31 +08:00
wangchuxiao
7843d81c18 orgization 2022-09-20 11:11:33 +08:00
wangchuxiao
8155551464 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-20 11:09:08 +08:00
wangchuxiao
168dd1d01f orgization 2022-09-20 11:08:46 +08:00
Gordon
18e92ccbd3 push update 2022-09-20 10:39:43 +08:00
skiffer-git
2ad71fc4ac Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-20 09:23:42 +08:00
skiffer-git
29380b93ef update version 2022-09-20 09:23:16 +08:00
Gordon
00d2ff810b media message change to push directly 2022-09-19 22:16:45 +08:00
wangchuxiao
a99295f594 cms add api 2022-09-19 12:15:01 +08:00
wangchuxiao
cc8a2e5fce cms add api 2022-09-19 12:12:52 +08:00
wangchuxiao
7137320f1a Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-19 12:00:41 +08:00
wangchuxiao
376c9bbdc7 cms add api 2022-09-19 11:52:03 +08:00
skiffer-git
49d57f46ae prometheus for statistics 2022-09-19 11:10:37 +08:00
skiffer-git
a4fe45d58c Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-18 10:51:07 +08:00
skiffer-git
db8763b610 fix bug :KickUserOffline panic: runtime error: invalid memory address or nil pointer dereference 2022-09-18 10:50:51 +08:00
wangchuxiao
1a61598322 v2.3.3 2022-09-16 19:06:25 +08:00
wangchuxiao
d971397c8b v2.3.3 2022-09-16 18:41:11 +08:00
wangchuxiao
427a598385 check login 2022-09-16 18:11:14 +08:00
wangchuxiao
4c0b96d81a check login 2022-09-16 18:10:27 +08:00
wangchuxiao
af2baba1e3 merge shichuang 2022-09-16 17:23:28 +08:00
skiffer-git
93cb01e7e6 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-16 16:52:15 +08:00
skiffer-git
139285c46a Support mongodb cluster 2022-09-16 16:52:03 +08:00
wangchuxiao
dc401c784a Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-16 16:51:25 +08:00
wangchuxiao
bb0f5e97a2 kafka 2022-09-16 16:51:12 +08:00
skiffer-git
82cd3fd9f1 Support mongodb cluster 2022-09-16 16:29:37 +08:00
skiffer-git
06117c98b1 Support mongodb cluster 2022-09-16 16:17:21 +08:00
skiffer-git
aa41dc3650 Support mongodb cluster 2022-09-16 15:54:26 +08:00
skiffer-git
98fe00a171 Support mongodb cluster 2022-09-16 15:14:02 +08:00
skiffer-git
3bdafc2a11 Support mongodb cluster 2022-09-16 15:11:13 +08:00
skiffer-git
3c4227696c Support mongodb cluster 2022-09-16 15:08:48 +08:00
skiffer-git
5d78fa9519 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-16 15:07:13 +08:00
skiffer-git
eb2a9d540e Support mongodb cluster 2022-09-16 15:06:49 +08:00
wangchuxiao
665e2e3e83 add mysql 2022-09-16 11:57:01 +08:00
wangchuxiao
c025d0d030 add mysql 2022-09-15 20:17:09 +08:00
wangchuxiao
1ce0a3b5d3 add mysql 2022-09-15 20:12:18 +08:00
wangchuxiao
7c79d10f5d add mysql 2022-09-15 20:07:29 +08:00
wangchuxiao
eeb5ba4c7b prome 2022-09-15 19:55:24 +08:00
wangchuxiao
5d32627553 grafana 2022-09-15 19:46:13 +08:00
wangchuxiao
07a038503e grafana 2022-09-15 19:22:36 +08:00
wangchuxiao
3a878f8426 prometheus 2022-09-15 17:58:51 +08:00
wangchuxiao
1cfa55817a prometheus 2022-09-15 17:50:45 +08:00
wangchuxiao
78ce5c3f69 prometheus 2022-09-15 16:39:49 +08:00
skiffer-git
97187af0c7 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-15 16:28:34 +08:00
skiffer-git
d26076c0e4 prometheus for statistics 2022-09-15 16:28:19 +08:00
wangchuxiao
1f81bd121f Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-15 16:27:46 +08:00
wangchuxiao
02fa9142fe prometheus 2022-09-15 16:27:36 +08:00
skiffer-git
6759e0c25b fix bug: invited/kick failed due to json tag validation 2022-09-15 15:52:48 +08:00
wangchuxiao
46e233ccbb fix bug 2022-09-15 15:40:26 +08:00
skiffer-git
1b31de18e4 Remove duplicate messageVerification call in sendMsg 2022-09-15 15:03:57 +08:00
skiffer-git
ccc65c846f prometheus for statistics 2022-09-15 13:17:53 +08:00
skiffer-git
9d73fc9932 Remove duplicate messageVerification call in sendMsg 2022-09-15 12:55:40 +08:00
skiffer-git
d6abbacbf7 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release
# Conflicts:
#	internal/rpc/msg/rpcChat.go
#	pkg/common/prometheus/gather.go
2022-09-15 12:27:55 +08:00
skiffer-git
979100850c prometheus for statistics 2022-09-15 12:07:28 +08:00
wangchuxiao
a0a2b6c340 fix bug 2022-09-15 11:38:31 +08:00
wangchuxiao
7f1acb4532 prome 2022-09-15 09:30:23 +08:00
wangchuxiao
9afaba4382 prome 2022-09-15 09:16:08 +08:00
wangchuxiao
355c672ed1 prome 2022-09-15 08:50:29 +08:00
wangchuxiao
144cf279f9 prome 2022-09-15 08:45:10 +08:00
wangchuxiao
c1a94a1b6c prome 2022-09-15 01:48:24 +08:00
wangchuxiao
c091b5f385 prome 2022-09-15 01:46:22 +08:00
wangchuxiao
aa6b439e8c prome 2022-09-15 01:35:08 +08:00
wangchuxiao
07170135e6 prome 2022-09-15 01:28:56 +08:00
wangchuxiao
024ee6e602 prome 2022-09-15 01:23:57 +08:00
wangchuxiao
a1f79f4508 prome 2022-09-15 01:22:20 +08:00
skiffer-git
6a6009827c prometheus for statistics 2022-09-14 21:42:04 +08:00
skiffer-git
375fc0c89e prometheus for statistics 2022-09-14 21:11:40 +08:00
skiffer-git
a110b4c26b prometheus for statistics 2022-09-14 20:27:54 +08:00
skiffer-git
ebdb875c56 prometheus for statistics 2022-09-14 19:36:59 +08:00
wangchuxiao
266a2b4c76 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-14 19:28:56 +08:00
wangchuxiao
7e5b62377f add 2022-09-14 19:28:17 +08:00
skiffer-git
8dce5396b0 prometheus for statistics 2022-09-14 18:58:30 +08:00
skiffer-git
e78f7a2a37 prometheus for statistics 2022-09-14 18:47:11 +08:00
Gordon
aafbda47d4 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-14 18:33:18 +08:00
Gordon
e1b1af9a48 private message cache update 2022-09-14 18:31:56 +08:00
Gordon
19f725965d private message cache update 2022-09-14 18:30:52 +08:00
wangchuxiao
5ce0cf1aad prome 2022-09-14 18:16:02 +08:00
wangchuxiao
88bcb35a14 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-14 17:45:51 +08:00
wangchuxiao
d534f026b0 promethues 2022-09-14 17:45:38 +08:00
skiffer-git
939eb95cdc log 2022-09-14 16:39:03 +08:00
skiffer-git
46d3dd409a log 2022-09-14 16:29:22 +08:00
skiffer-git
398be73f5b log 2022-09-14 15:34:09 +08:00
skiffer-git
e7ab59a932 log 2022-09-14 15:24:56 +08:00
skiffer-git
285cb346b9 log 2022-09-14 14:52:14 +08:00
skiffer-git
72d0920458 log 2022-09-14 14:42:35 +08:00
skiffer-git
4aaa1a7afa log 2022-09-14 13:09:04 +08:00
skiffer-git
f2f35e115c log 2022-09-14 13:08:15 +08:00
skiffer-git
7295f39d68 log 2022-09-14 12:45:42 +08:00
skiffer-git
685cacf490 log 2022-09-14 12:43:10 +08:00
skiffer-git
1f36d970f9 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-14 12:31:46 +08:00
skiffer-git
60f0c80c36 log 2022-09-14 12:31:24 +08:00
wangchuxiao
c018d63117 add log 2022-09-14 12:24:29 +08:00
wangchuxiao
88af048e90 add log 2022-09-14 12:19:17 +08:00
wangchuxiao
c0190e21c6 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-14 11:00:42 +08:00
wangchuxiao
2368a8fba3 fix transfer 2022-09-14 11:00:27 +08:00
skiffer-git
e9ad462f9e log 2022-09-14 10:42:02 +08:00
wangchuxiao
4ac9d0410c Merge branch 'shichuang' of github.com:OpenIMSDK/Open-IM-Server into shichuang 2022-09-14 10:29:55 +08:00
wangchuxiao
1c53c90ab5 hash 2022-09-14 10:29:49 +08:00
wangchuxiao
4d6e05989e prome 2022-09-14 10:25:44 +08:00
wangchuxiao
54a3a755d6 prome 2022-09-14 10:25:31 +08:00
wangchuxiao
e32a3fbfca hash 2022-09-13 19:58:48 +08:00
wangchuxiao
f498f67f1e Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-13 18:32:01 +08:00
wangchuxiao
d491c482a5 hash 2022-09-13 18:31:47 +08:00
skiffer-git
7062676f9a Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-13 18:15:50 +08:00
skiffer-git
0d52759455 fix bug : messages can be sent after the group is disbanded 2022-09-13 18:15:33 +08:00
wangchuxiao
9a5c0bae50 hash 2022-09-13 18:02:37 +08:00
wangchuxiao
eb30e54dc8 Merge branch 'v2.3.0release' 2022-09-13 16:19:32 +08:00
wangchuxiao
4ea97ab23f group cms 2022-09-13 16:19:01 +08:00
wangchuxiao
82f2ec24fb group 2022-09-13 15:27:00 +08:00
wangchuxiao
d487465b2a prome 2022-09-13 11:40:08 +08:00
wangchuxiao
899e88babe prome 2022-09-13 01:06:18 +08:00
wangchuxiao
83f923aa10 prome 2022-09-13 00:53:17 +08:00
wangchuxiao
04a0614319 prome 2022-09-13 00:22:34 +08:00
wangchuxiao
632ff783c6 fix bug 2022-09-12 23:50:14 +08:00
wangchuxiao
e4f86ee823 add prome 2022-09-12 23:46:28 +08:00
wangchuxiao
f7390c757b add prome 2022-09-12 23:38:34 +08:00
wangchuxiao
7a9b45d257 add prome 2022-09-12 22:55:30 +08:00
wangchuxiao
b699ce3512 add prome 2022-09-12 22:47:51 +08:00
wangchuxiao
da9003ec46 prome 2022-09-12 21:24:39 +08:00
wangchuxiao
30a0743c8c prome 2022-09-12 21:24:05 +08:00
wangchuxiao
a4fc493ea5 prome 2022-09-12 20:51:54 +08:00
wangchuxiao
f5f6e9a882 prome 2022-09-12 20:50:22 +08:00
wangchuxiao
21cda37380 prome 2022-09-12 20:25:37 +08:00
wangchuxiao
941670a420 prome 2022-09-12 20:23:45 +08:00
wangchuxiao
15b01a07b5 prome 2022-09-12 20:11:33 +08:00
wangchuxiao
85565dc137 prome 2022-09-12 19:56:15 +08:00
wangchuxiao
d59f699937 Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release 2022-09-12 19:34:21 +08:00
wangchuxiao
ef66b10501 prome 2022-09-12 19:32:24 +08:00
Gordon
081c47aba9 docker compose file update 2022-09-10 21:48:29 +08:00
Gordon
6cdb64fb8b Merge remote-tracking branch 'origin/v2.3.0release' into main 2022-09-10 21:31:03 +08:00
Gordon
765e8d4f79 log test 2022-09-10 00:15:31 +08:00
Gordon
8e7e496b44 Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release 2022-09-09 23:40:53 +08:00
Gordon
cf14b19bf6 log test 2022-09-09 23:40:35 +08:00
wangchuxiao
2131061482 v2.3.2 2022-09-09 18:30:49 +08:00
wangchuxiao
3d184c95ba Merge branch 'shichuang' of https://github.com/OpenIMSDK/Open-IM-Server into shichuang 2022-09-07 18:23:06 +08:00
wangchuxiao
6754fdb580 getui 2022-09-07 18:20:41 +08:00
skiffer-git
3fcc2c2678 cache for GetDefaultGatewayConn4Unique 2022-09-03 15:48:45 +08:00
268 changed files with 26174 additions and 9511 deletions

4
.env Normal file
View File

@@ -0,0 +1,4 @@
USER=root
PASSWORD=openIM123
MINIO_ENDPOINT=http://127.0.0.1:10005
DATA_DIR=./

411
.gitignore vendored
View File

@@ -1,22 +1,403 @@
bin
# Copyright © 2023 OpenIMSDK.
#
# 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.
# ==============================================================================
# For the entire design of.gitignore, ignore git commits and ignore files
#===============================================================================
#
### OpenIM developer supplement ###
logs
.devcontainer
components
logs
out-test
.github
.idea
Dockerfile.cross
### Makefile ###
tmp/
bin/
output/
_output/
deploy/open_im_demo
deploy/open_im_api
deploy/open_im_msg_gateway
deploy/open_im_msg_transfer
deploy/open_im_push
deploy/open_im_timer_task
deploy/open_im_rpc_user
deploy/open_im_rpc_friend
deploy/open_im_rpc_group
deploy/open_im_rpc_msg
deploy/open_im_rpc_auth
### OpenIM Config ###
config/config.yaml
./config/config.yaml
.env
./.env
### OpenIM deploy ###
deploy/openim_demo
deploy/openim-api
deploy/openim-rpc-msg_gateway
deploy/openim-msgtransfer
deploy/openim-push
deploy/openim_timer_task
deploy/openim-rpc-user
deploy/openim-rpc-friend
deploy/openim-rpc-group
deploy/openim-rpc-msg
deploy/openim-rpc-auth
deploy/Open-IM-SDK-Core
# files used by the developer
.idea.md
.todo.md
.note.md
# ==============================================================================
# Created by https://www.toptal.com/developers/gitignore/api/go,git,vim,tags,test,emacs,backup,jetbrains
# Edit at https://www.toptal.com/developers/gitignore?templates=go,git,vim,tags,test,emacs,backup,jetbrains
### Backup ###
*.bak
*.gho
*.ori
*.orig
*.tmp
### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
# directory configuration
.dir-locals.el
# network security
/network-security.data
### vscode ###
.vscode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# End of https://www.toptal.com/developers/gitignore/api/vim,jetbrains,vscode,git,go,tags,backup,test
### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
# Created by git when using merge tools for conflicts
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*_BACKUP_*.txt
*_BASE_*.txt
*_LOCAL_*.txt
*_REMOTE_*.txt
### Go ###
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
vendor/
# Go workspace file
# go.work
go.work.sum
### JetBrains ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### JetBrains Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml
### Tags ###
# Ignore tags created by etags, ctags, gtags (GNU global) and cscope
TAGS
.TAGS
!TAGS/
tags
.tags
!tags/
gtags.files
GTAGS
GRTAGS
GPATH
GSYMS
cscope.files
cscope.out
cscope.in.out
cscope.po.out
### Test ###
### Ignore all files that could be used to test your code and
### you wouldn't want to push
# Reference https://en.wikipedia.org/wiki/Metasyntactic_variable
# Most common
*foo
*bar
*fubar
*foobar
*baz
# Less common
*qux
*quux
*bongo
*bazola
*ztesch
# UK, Australia
*wibble
*wobble
*wubble
*flob
*blep
*blah
*boop
*beep
# Japanese
*hoge
*piyo
*fuga
*hogera
*hogehoge
# Portugal, Spain
*fulano
*sicrano
*beltrano
*mengano
*perengano
*zutano
# France, Italy, the Netherlands
*toto
*titi
*tata
*tutu
*pipppo
*pluto
*paperino
*aap
*noot
*mies
# Other names that would make sense
*tests
*testsdir
*testsfile
*testsfiles
*testdir
*testfile
*testfiles
*testing
*testingdir
*testingfile
*testingfiles
*temp
*tempdir
*tempfile
*tempfiles
*tmp
*tmpdir
*tmpfile
*tmpfiles
*lol
### Vim ###
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
Sessionx.vim
# Temporary
.netrwhist
# Auto-generated tag files
# Persistent undo
[._]*.un~
# End of https://www.toptal.com/developers/gitignore/api/go,git,vim,tags,test,emacs,backup,jetbrains
.idea
dist/
.env
config/config.yaml

View File

@@ -26,8 +26,6 @@ By deployment of the Open-IM-Server on the customer's server, developers can int
- Supports multiple protocols
## Community
- Join the Telegram-OpenIM group: https://t.me/joinchat/zSJLPaHBNLZmODI1
- 中文官网访问这里:[Open-IM中文开发文档](https://doc.rentsoft.cn/)
## Quick start
@@ -36,75 +34,69 @@ By deployment of the Open-IM-Server on the customer's server, developers can int
> Open-IM relies on five open source high-performance components: ETCD, MySQL, MongoDB, Redis, and Kafka. Privatization deployment Before Open-IM-Server, please make sure that the above five components have been installed. If your server does not have the above components, you must first install Missing components. If you have the above components, it is recommended to use them directly. If not, it is recommended to use Docker-compose, no To install dependencies, one-click deployment, faster and more convenient.
#### Source code deployment
#### Deploy using Docker
1. Install [Go environment](https://golang.org/doc/install). Make sure Go version is at least 1.15.
1. Install [Go environment](https://golang.org/doc/install). Make sure Go version is at least 1.17
2. Clone the Open-IM project to your server.
2. Clone the Open-IM project to your server
```
git clone https://github.com/OpenIMSDK/Open-IM-Server.git --recursive
```
3. Build and start Service.
3. Deploy
1. Shell authorization
1. Modify env
```
#cd Open-IM-server/script
chmod +x *.sh
#cd Open-IM-server
USER=root
PASSWORD=openIM123 #Password with more than 8 digits, excluding special characters
ENDPOINT=http://127.0.0.1:10005 #Replace 127.0.0.1 with Internet IP
DATA_DIR=./
```
2. Execute the build shell
2. Deploy && Start
```
./build_all_service.sh
chmod +x install_im_server.sh;
./install_im_server.sh;
```
3. Start service
```
./start_all.sh
```
4. Check service
```
./check_all.sh
cd script;
./docker_check_service.sh./check_all.sh
```
![OpenIMServersonSystempng](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/Open-IM-Servers-on-System.png)
#### Docker deployment
#### Deploy using source code
All images are available at https://hub.docker.com/r/lyt1123/open_im_server
1. Go 1.17 or above
2. Clone
1. [Install Docker](https://docs.docker.com/install/) 1.13 or above.
```shell
git clone https://github.com/OpenIMSDK/Open-IM-Server.git --recursive
cd cmd/Open-IM-SDK-Core
git checkout main
```
2. [Install Docker Compose](https://docs.docker.com/compose/install/) 1.22 or above.
1. Set executable permissions
3. Clone the Open-IM project to your server.
```shell
cd ../../script/
chmod +x *.sh
```
```
git clone https://github.com/OpenIMSDK/Open-IM-Server.git --recursive
```
1. build
4. Start docker-compose with one click(Docker automatically pulls all images)
```shell
./batch_build_all_service.sh
```
```
cd Open-IM-Server
docker-compose up -d
```
5. Check service
```
./docker_check_service.sh
./check_all.sh
```
![OpenIMServersondockerpng](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/Open-IM-Servers-on-docker.png)
all services build success
### CONFIGURATION INSTRUCTIONS

View File

@@ -1,13 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_api
NAME=open_im_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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -16,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -15,6 +15,7 @@ import (
"Open_IM/internal/api/user"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
"Open_IM/pkg/utils"
"flag"
"fmt"
@@ -30,6 +31,7 @@ import (
"github.com/gin-gonic/gin"
//"syscall"
"Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus"
)
// @title open-IM-Server API
@@ -45,10 +47,18 @@ func main() {
f, _ := os.Create("../logs/api.log")
gin.DefaultWriter = io.MultiWriter(f)
// gin.SetMode(gin.DebugMode)
r := gin.Default()
r := gin.New()
r.Use(gin.Recovery())
r.Use(utils.CorsHandler())
log.Info("load config: ", config.Config)
log.Info("load config: ", config.Config)
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
if config.Config.Prometheus.Enable {
promePkg.NewApiRequestCounter()
promePkg.NewApiRequestFailedCounter()
promePkg.NewApiRequestSuccessCounter()
r.Use(promePkg.PromeTheusMiddleware)
r.GET("/metrics", promePkg.PrometheusHandler())
}
// user routing group, which handles user registration and login services
userRouterGroup := r.Group("/user")
{
@@ -101,6 +111,8 @@ func main() {
groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMemberList) //1
groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) //1
groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1
//only for supergroup
groupRouterGroup.POST("/invite_user_to_groups", group.InviteUserToGroups)
groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList)
groupRouterGroup.POST("/dismiss_group", group.DismissGroup) //
groupRouterGroup.POST("/mute_group_member", group.MuteGroupMember)
@@ -153,6 +165,11 @@ func main() {
chatGroup.POST("/batch_send_msg", manage.ManagementBatchSendMsg)
chatGroup.POST("/check_msg_is_send_success", manage.CheckMsgIsSendSuccess)
chatGroup.POST("/set_msg_min_seq", apiChat.SetMsgMinSeq)
chatGroup.POST("/set_message_reaction_extensions", apiChat.SetMessageReactionExtensions)
chatGroup.POST("/get_message_list_reaction_extensions", apiChat.GetMessageListReactionExtensions)
chatGroup.POST("/add_message_reaction_extensions", apiChat.AddMessageReactionExtensions)
chatGroup.POST("/delete_message_reaction_extensions", apiChat.DeleteMessageReactionExtensions)
}
//Conversation
conversationGroup := r.Group("/conversation")
@@ -160,8 +177,10 @@ func main() {
conversationGroup.POST("/get_all_conversations", conversation.GetAllConversations)
conversationGroup.POST("/get_conversation", conversation.GetConversation)
conversationGroup.POST("/get_conversations", conversation.GetConversations)
//deprecated
conversationGroup.POST("/set_conversation", conversation.SetConversation)
conversationGroup.POST("/batch_set_conversation", conversation.BatchSetConversations)
//deprecated
conversationGroup.POST("/set_recv_msg_opt", conversation.SetRecvMsgOpt)
conversationGroup.POST("/modify_conversation_field", conversation.ModifyConversationField)
}
@@ -205,7 +224,7 @@ func main() {
organizationGroup.POST("/get_department_member", organization.GetDepartmentMember)
organizationGroup.POST("/delete_user_in_department", organization.DeleteUserInDepartment)
organizationGroup.POST("/get_user_in_organization", organization.GetUserInOrganization)
}
initGroup := r.Group("/init")
@@ -213,7 +232,7 @@ func main() {
initGroup.POST("/set_client_config", clientInit.SetClientInitConfig)
initGroup.POST("/get_client_config", clientInit.GetClientInitConfig)
}
go getcdv3.RegisterConf()
go apiThird.MinioInit()
defaultPorts := config.Config.Api.GinPort
ginPort := flag.Int("port", defaultPorts[0], "get ginServerPort from cmd,default 10002 as port")
@@ -222,10 +241,10 @@ func main() {
if config.Config.Api.ListenIP != "" {
address = config.Config.Api.ListenIP + ":" + strconv.Itoa(*ginPort)
}
address = config.Config.Api.ListenIP + ":" + strconv.Itoa(*ginPort)
fmt.Println("start api server, address: ", address)
fmt.Println("start api server, address: ", address, ", OpenIM version: ", constant.CurrentVersion)
err := r.Run(address)
if err != nil {
log.Error("", "api run failed ", *ginPort, err.Error())
log.Error("", "api run failed ", address, err.Error())
panic("api start failed " + err.Error())
}
}

View File

@@ -1,13 +1,25 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_cms_api
NAME=open_im_cms_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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -16,8 +28,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -2,6 +2,7 @@ package main
import (
"Open_IM/internal/cms_api"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/utils"
"flag"
"fmt"
@@ -24,6 +25,6 @@ func main() {
address = config.Config.Api.ListenIP + ":" + strconv.Itoa(*ginPort)
}
address = config.Config.CmsApi.ListenIP + ":" + strconv.Itoa(*ginPort)
fmt.Println("start cms api server, address: ", address)
fmt.Println("start cms api server, address: ", address, ", OpenIM version: ", constant.CurrentVersion, "\n")
router.Run(address)
}

View File

@@ -1,12 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_cron_task
NAME=open_im_cron_task
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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -2,10 +2,15 @@ package main
import (
"Open_IM/internal/cron_task"
"flag"
"fmt"
"time"
)
func main() {
fmt.Println("start cronTask")
cronTask.StartCronTask()
var userID = flag.String("userID", "", "userID to clear msg and reset seq")
var workingGroupID = flag.String("workingGroupID", "", "workingGroupID to clear msg and reset seq")
flag.Parse()
fmt.Println(time.Now(), "start cronTask", *userID, *workingGroupID)
cronTask.StartCronTask(*userID, *workingGroupID)
}

View File

@@ -1,13 +1,25 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_demo
NAME=open_im_demo
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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -16,8 +28,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -13,6 +13,8 @@ import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log"
promePkg "Open_IM/pkg/common/prometheus"
"github.com/gin-gonic/gin"
)
@@ -21,10 +23,11 @@ func main() {
gin.SetMode(gin.ReleaseMode)
f, _ := os.Create("../logs/api.log")
gin.DefaultWriter = io.MultiWriter(f)
r := gin.Default()
r.Use(utils.CorsHandler())
if config.Config.Prometheus.Enable {
r.GET("/metrics", promePkg.PrometheusHandler())
}
authRouterGroup := r.Group("/demo")
{
authRouterGroup.POST("/code", register.SendVerificationCode)
@@ -62,13 +65,12 @@ func main() {
defaultPorts := config.Config.Demo.Port
ginPort := flag.Int("port", defaultPorts[0], "get ginServerPort from cmd,default 10004 as port")
flag.Parse()
fmt.Println("start demo api server, port: ", *ginPort)
address := "0.0.0.0:" + strconv.Itoa(*ginPort)
if config.Config.Api.ListenIP != "" {
address = config.Config.Api.ListenIP + ":" + strconv.Itoa(*ginPort)
}
address = config.Config.CmsApi.ListenIP + ":" + strconv.Itoa(*ginPort)
fmt.Println("start demo api server address: ", address)
fmt.Println("start demo api server address: ", address, ", OpenIM version: ", constant.CurrentVersion, "\n")
go register.OnboardingProcessRoutine()
go register.ImportFriendRoutine()
err := r.Run(address)

View File

@@ -1,12 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_msg_gateway
NAME=open_im_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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -14,13 +14,15 @@ func main() {
log.NewPrivateLog(constant.LogFileName)
defaultRpcPorts := config.Config.RpcPort.OpenImMessageGatewayPort
defaultWsPorts := config.Config.LongConnSvr.WebsocketPort
defaultPromePorts := config.Config.Prometheus.MessageGatewayPrometheusPort
rpcPort := flag.Int("rpc_port", defaultRpcPorts[0], "rpc listening port")
wsPort := flag.Int("ws_port", defaultWsPorts[0], "ws listening port")
prometheusPort := flag.Int("prometheus_port", defaultPromePorts[0], "PushrometheusPort default listen port")
flag.Parse()
var wg sync.WaitGroup
wg.Add(1)
fmt.Println("start rpc/msg_gateway server, port: ", *rpcPort, *wsPort)
fmt.Println("start rpc/msg_gateway server, port: ", *rpcPort, *wsPort, *prometheusPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
gate.Init(*rpcPort, *wsPort)
gate.Run()
gate.Run(*prometheusPort)
wg.Wait()
}

View File

@@ -1,13 +1,25 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_msg_transfer
NAME=open_im_msg_transfer
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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -16,8 +28,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -13,10 +13,11 @@ import (
func main() {
var wg sync.WaitGroup
wg.Add(1)
rpcPort := flag.Int("port", config.Config.Prometheus.MessageTransferPrometheusPort[0], "MessageTransferPrometheusPort default listen port")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.MessageTransferPrometheusPort[0], "MessageTransferPrometheusPort default listen port")
flag.Parse()
log.NewPrivateLog(constant.LogFileName)
logic.Init()
fmt.Println("start msg_transfer server")
logic.Run(*rpcPort)
fmt.Println("start msg_transfer server ", ", OpenIM version: ", constant.CurrentVersion, "\n")
logic.Run(*prometheusPort)
wg.Wait()
}

View File

@@ -1,12 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_push
NAME=open_im_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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -13,12 +13,13 @@ import (
func main() {
defaultPorts := config.Config.RpcPort.OpenImPushPort
rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.MessageTransferPrometheusPort[0], "PushrometheusPort default listen port")
flag.Parse()
var wg sync.WaitGroup
wg.Add(1)
log.NewPrivateLog(constant.LogFileName)
fmt.Println("start push rpc server, port: ", *rpcPort)
fmt.Println("start push rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
logic.Init(*rpcPort)
logic.Run()
logic.Run(*prometheusPort)
wg.Wait()
}

View File

@@ -1,12 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_admin_cms
NAME=open_im_admin_cms
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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -3,6 +3,8 @@ package main
import (
rpcMessageCMS "Open_IM/internal/rpc/admin_cms"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus"
"flag"
"fmt"
)
@@ -10,8 +12,15 @@ import (
func main() {
defaultPorts := config.Config.RpcPort.OpenImAdminCmsPort
rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.AdminCmsPrometheusPort[0], "adminCMSPrometheusPort default listen port")
flag.Parse()
fmt.Println("start cms rpc server, port: ", *rpcPort)
fmt.Println("start cms rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
rpcServer := rpcMessageCMS.NewAdminCMSServer(*rpcPort)
go func() {
err := promePkg.StartPromeSrv(*prometheusPort)
if err != nil {
panic(err)
}
}()
rpcServer.Run()
}

View File

@@ -1,12 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_auth
NAME=open_im_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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -3,6 +3,8 @@ package main
import (
rpcAuth "Open_IM/internal/rpc/auth"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus"
"flag"
"fmt"
)
@@ -10,9 +12,15 @@ import (
func main() {
defaultPorts := config.Config.RpcPort.OpenImAuthPort
rpcPort := flag.Int("port", defaultPorts[0], "RpcToken default listen port 10800")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.AuthPrometheusPort[0], "authPrometheusPort default listen port")
flag.Parse()
fmt.Println("start auth rpc server, port: ", *rpcPort)
fmt.Println("start auth rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
rpcServer := rpcAuth.NewRpcAuthServer(*rpcPort)
go func() {
err := promePkg.StartPromeSrv(*prometheusPort)
if err != nil {
panic(err)
}
}()
rpcServer.Run()
}

View File

@@ -1,12 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_cache
NAME=open_im_cache
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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -3,6 +3,9 @@ package main
import (
rpcCache "Open_IM/internal/rpc/cache"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus"
"flag"
"fmt"
)
@@ -10,9 +13,15 @@ import (
func main() {
defaultPorts := config.Config.RpcPort.OpenImCachePort
rpcPort := flag.Int("port", defaultPorts[0], "RpcToken default listen port 10800")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.CachePrometheusPort[0], "cachePrometheusPort default listen port")
flag.Parse()
fmt.Println("start auth rpc server, port: ", *rpcPort)
fmt.Println("start cache rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
rpcServer := rpcCache.NewCacheServer(*rpcPort)
go func() {
err := promePkg.StartPromeSrv(*prometheusPort)
if err != nil {
panic(err)
}
}()
rpcServer.Run()
}

View File

@@ -1,12 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_conversation
NAME=open_im_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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -3,6 +3,8 @@ package main
import (
rpcConversation "Open_IM/internal/rpc/conversation"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus"
"flag"
"fmt"
)
@@ -10,9 +12,16 @@ import (
func main() {
defaultPorts := config.Config.RpcPort.OpenImConversationPort
rpcPort := flag.Int("port", defaultPorts[0], "RpcConversation default listen port 11300")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.ConversationPrometheusPort[0], "conversationPrometheusPort default listen port")
flag.Parse()
fmt.Println("start conversation rpc server, port: ", *rpcPort)
fmt.Println("start conversation rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion)
rpcServer := rpcConversation.NewRpcConversationServer(*rpcPort)
go func() {
err := promePkg.StartPromeSrv(*prometheusPort)
if err != nil {
panic(err)
}
}()
rpcServer.Run()
}

View File

@@ -1,12 +1,25 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_friend
NAME=open_im_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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +28,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -3,6 +3,8 @@ package main
import (
"Open_IM/internal/rpc/friend"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus"
"flag"
"fmt"
)
@@ -10,8 +12,15 @@ import (
func main() {
defaultPorts := config.Config.RpcPort.OpenImFriendPort
rpcPort := flag.Int("port", defaultPorts[0], "get RpcFriendPort from cmd,default 12000 as port")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.FriendPrometheusPort[0], "friendPrometheusPort default listen port")
flag.Parse()
fmt.Println("start friend rpc server, port: ", *rpcPort)
fmt.Println("start friend rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
rpcServer := friend.NewFriendServer(*rpcPort)
go func() {
err := promePkg.StartPromeSrv(*prometheusPort)
if err != nil {
panic(err)
}
}()
rpcServer.Run()
}

View File

@@ -1,12 +1,25 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_group
NAME=open_im_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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +28,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -3,6 +3,8 @@ package main
import (
"Open_IM/internal/rpc/group"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus"
"flag"
"fmt"
)
@@ -10,8 +12,15 @@ import (
func main() {
defaultPorts := config.Config.RpcPort.OpenImGroupPort
rpcPort := flag.Int("port", defaultPorts[0], "get RpcGroupPort from cmd,default 16000 as port")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.GroupPrometheusPort[0], "groupPrometheusPort default listen port")
flag.Parse()
fmt.Println("start group rpc server, port: ", *rpcPort)
fmt.Println("start group rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
rpcServer := group.NewGroupServer(*rpcPort)
go func() {
err := promePkg.StartPromeSrv(*prometheusPort)
if err != nil {
panic(err)
}
}()
rpcServer.Run()
}

View File

@@ -1,12 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_msg
NAME=open_im_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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -3,6 +3,8 @@ package main
import (
"Open_IM/internal/rpc/msg"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus"
"flag"
"fmt"
)
@@ -10,8 +12,15 @@ import (
func main() {
defaultPorts := config.Config.RpcPort.OpenImMessagePort
rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.MessagePrometheusPort[0], "msgPrometheusPort default listen port")
flag.Parse()
fmt.Println("start msg rpc server, port: ", *rpcPort)
fmt.Println("start msg rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
rpcServer := msg.NewRpcChatServer(*rpcPort)
go func() {
err := promePkg.StartPromeSrv(*prometheusPort)
if err != nil {
panic(err)
}
}()
rpcServer.Run()
}

View File

@@ -1,12 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_office
NAME=open_im_office
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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -3,6 +3,8 @@ package main
import (
rpc "Open_IM/internal/rpc/office"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus"
"flag"
"fmt"
)
@@ -10,8 +12,15 @@ import (
func main() {
defaultPorts := config.Config.RpcPort.OpenImOfficePort
rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.OfficePrometheusPort[0], "officePrometheusPort default listen port")
flag.Parse()
fmt.Println("start office rpc server, port: ", *rpcPort)
fmt.Println("start office rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
rpcServer := rpc.NewOfficeServer(*rpcPort)
go func() {
err := promePkg.StartPromeSrv(*prometheusPort)
if err != nil {
panic(err)
}
}()
rpcServer.Run()
}

View File

@@ -1,12 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_organization
NAME=open_im_organization
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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -3,6 +3,8 @@ package main
import (
"Open_IM/internal/rpc/organization"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus"
"flag"
"fmt"
)
@@ -10,8 +12,15 @@ import (
func main() {
defaultPorts := config.Config.RpcPort.OpenImOrganizationPort
rpcPort := flag.Int("port", defaultPorts[0], "get RpcOrganizationPort from cmd,default 11200 as port")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.OrganizationPrometheusPort[0], "organizationPrometheusPort default listen port")
flag.Parse()
fmt.Println("start organization rpc server, port: ", *rpcPort)
fmt.Println("start organization rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
rpcServer := organization.NewServer(*rpcPort)
go func() {
err := promePkg.StartPromeSrv(*prometheusPort)
if err != nil {
panic(err)
}
}()
rpcServer.Run()
}

View File

@@ -1,12 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_user
NAME=open_im_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=linux GOARCH=amd64 go build -ldflags="-w -s"
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-w -s"
run:
@go run ./
@@ -15,8 +27,7 @@ gotool:
go fmt ./
go vet ./
install:
make build
install:build
mv ${BINARY_NAME} ${BIN_DIR}
clean:

View File

@@ -3,6 +3,8 @@ package main
import (
"Open_IM/internal/rpc/user"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus"
"flag"
"fmt"
)
@@ -10,8 +12,15 @@ import (
func main() {
defaultPorts := config.Config.RpcPort.OpenImUserPort
rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port")
prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.UserPrometheusPort[0], "userPrometheusPort default listen port")
flag.Parse()
fmt.Println("start user rpc server, port: ", *rpcPort)
fmt.Println("start user rpc server, port: ", *rpcPort, ", OpenIM version: ", constant.CurrentVersion, "\n")
rpcServer := user.NewUserServer(*rpcPort)
go func() {
err := promePkg.StartPromeSrv(*prometheusPort)
if err != nil {
panic(err)
}
}()
rpcServer.Run()
}

View File

@@ -7,32 +7,36 @@ serverversion: 2.3.1
etcd:
etcdSchema: openim #默认即可
etcdAddr: [ 127.0.0.1:2379 ] #单机部署时,默认即可
k8sMod: false #开启k8s模式 使用pod里面环境变量请求services调用服务 而并非etcd
userName:
password:
secret:
mysql:
dbMysqlAddress: [ 127.0.0.1:13306 ] #mysql地址 目前仅支持单机,默认即可
dbMysqlUserName: root #mysql用户名建议修改
dbMysqlPassword: openIM # mysql密码建议修改
dbMysqlUserName: #mysql用户名建议修改
dbMysqlPassword: # mysql密码建议修改
dbMysqlDatabaseName: openIM_v2 #默认即可
dbTableName: eMsg #默认即可
dbMsgTableNum: 1
dbMaxOpenConns: 100
dbMaxIdleConns: 10
dbMaxLifeTime: 5
logLevel: 1 #1=slient 2=error 3=warn 4=info
slowThreshold: 500
mongo:
dbUri: ""#当dbUri值不为空则直接使用该值
dbAddress: 127.0.0.1:37017 #单机时为mongo地址使用分片集群时为mongos地址 默认即可
#dbAddress: 127.0.0.1:37017 #单机时为mongo地址使用分片集群时为mongos地址 默认即可
dbAddress: [ 127.0.0.1:37017 ] #单机时为mongo地址使用分片集群时为mongos地址 默认即可
dbDirect: false
dbTimeout: 60
dbDatabase: openIM #mongo db 默认即可
dbSource: admin
dbUserName: #mongo用户名建议先不设置
dbPassword: #mongo密码建议先不设置
dbPassword: #mongo密码建议先不设置
dbMaxPoolSize: 100
dbRetainChatRecords: 3650 #mongo保存离线消息时间根据需求修改
chatRecordsClearTime: "* * * * *" # 每天凌晨3点清除消息该配置和linux定时任务一样 清理操作建议设置在用户活跃少的时候 # 0 3 * * *
chatRecordsClearTime: "0 3 * * *" # 每天凌晨3点清除消息该配置和linux定时任务一样 清理操作建议设置在用户活跃少的时候 # 0 3 * * *
redis:
dbAddress: [ 127.0.0.1:16379 ] #redis地址 单机时填写一个地址即可使用redis集群时候填写集群中多个节点地址主从地址都可以填写增加容灾能力默认即可
@@ -40,10 +44,12 @@ redis:
dbMaxActive: 0
dbIdleTimeout: 120
dbUserName: #only redis version 6.0+ need username
dbPassWord: openIM #redis密码 建议修改
dbPassWord: #redis密码 建议修改
enableCluster: false #如果外部redis以集群方式启动需要打开此开关
kafka:
SASLUserName:
SASLPassword:
ws2mschat:
addr: [ 127.0.0.1:9092 ] #kafka配置默认即可
topic: "ws2ms_chat" #用于mongo和mysql保存消息
@@ -56,12 +62,15 @@ kafka:
ms2pschat:
addr: [ 127.0.0.1:9092 ] #kafka配置默认即可
topic: "ms2ps_chat" #消息push
msgtomodify:
addr: [ 127.0.0.1:9092 ] #kafka配置默认即可
topic: "msg_to_modify"
consumergroupid:
msgToTransfer: mongo
msgToMongo: mongo_ex
msgToMySql: mysql
msgToPush: push
msgToModify: modify
#---------------Internal service configuration---------------------#
@@ -106,44 +115,42 @@ sdk:
#对象存储服务以下配置二选一目前支持两种腾讯云和minio二者配置好其中一种即可如果使用minio参考https://doc.rentsoft.cn/#/qa/minio搭建minio服务器
credential: #腾讯cos发送图片、视频、文件时需要请自行申请后替换必须修改
tencent:
appID: 1302656840
region: ap-chengdu
bucket: echat-1302656840
secretID: AKIDGNYVChzIQinu7QEgtNp0hnNgqcV8vZTC1
secretKey: kz15vW83qM6dBUWIq681eBZA0c0vlIbe1
appID:
region:
bucket:
secretID:
secretKey:
minio: #MinIO 发送图片、视频、文件时需要,请自行申请后替换,必须修改。 客户端初始化InitSDK中 object_storage参数为minio
bucket: openim # 存储内容桶
appBucket: app # 存储app的桶
location: us-east-1
endpoint: http://127.0.0.1:10005 #minio外网ip 这个ip是给客户端访问的
endpointInner: http://127.0.0.1:10005 #minio内网地址 如果im server 可以通过内网访问到 minio就可以填写
endpoint: #minio外网ip 这个ip是给客户端访问的
endpointInner: http://127.0.0.1:10005 #minio内网地址 如果im server 可以通过内网访问到 minio就可以
endpointInnerEnable: true #是否启用minio内网地址 启用可以让桶初始化IM server连接minio走内网地址访问
accessKeyID: user12345
secretAccessKey: key12345
accessKeyID:
secretAccessKey:
storageTime: 50 #文件在minio中保存的时间
isDistributedMod: false # 是否分布式多硬盘部署 默认docker-compose中为false
ali: # ali oss
regionID: "oss-cn-beijing"
accessKeyID: ""
accessKeySecret: ""
stsEndpoint: "sts.cn-beijing.aliyun.com"
ossEndpoint: "oss-cn-beijing.aliyuncs.com"
bucket: "bucket1"
finalHost: "http://bucket1.oss-cn-beijing.aliyuncs.com"
stsDurationSeconds: 3600
OssRoleArn: "acs:ram::xxx:role/xxx"
regionID:
accessKeyID:
accessKeySecret:
stsEndpoint:
ossEndpoint:
bucket:
finalHost:
stsDurationSeconds:
OssRoleArn:
aws:
accessKeyID: 1 #AssumeRole用户关联的accessKeyID
accessKeySecret: 2 #AssumeRole用户关联的accessKeySecrect
region: ap-southeast-1 #分区
bucket: ouyang #桶
finalHost: ouyang.s3.ap-southeast-1.amazonaws.com #对外Host
roleArn: arn:aws:iam::192209831083:role/AWS_S3_FOR_OUYANG #RoleArn
externalId: AssumeRoleExtend #角色扩展Id
roleSessionName: Required-AWS-ID-OPENIM #角色SESSION名称
accessKeyID: #AssumeRole用户关联的accessKeyID
accessKeySecret: #AssumeRole用户关联的accessKeySecrect
region: #分区
bucket: #桶
finalHost: #对外Host
roleArn: #RoleArn
externalId: #角色扩展Id
roleSessionName: #角色SESSION名称
dtm:
serverURL: 127.0.0.1:10007
rpcport: #rpc服务端口 默认即可
openImUserPort: [ 10110 ]
@@ -209,26 +216,41 @@ longconnsvr:
push:
tpns: #腾讯推送,暂未测试 暂不要使用
ios:
accessID: 1600018281
secretKey: 3cd68a77a95b89e5089a1aca523f318f
accessID:
secretKey:
android:
accessID: 111
secretKey: 111
enable: false
accessID:
secretKey:
enable: false # true or false (bool)
jpns: #极光推送 在极光后台申请后,修改以下四项,必须修改
appKey: cf47465a368f24c659608e7e
masterSecret: 02204efe3f3832947a236ee5
pushUrl: "https://api.jpush.cn/v3/push"
pushIntent: "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end"
enable: true
appKey:
masterSecret:
pushUrl:
pushIntent:
enable: false # true or false (bool)
getui: #个推推送
pushUrl: "https://restapi.getui.com/v2/$appId"
pushUrl:
masterSecret: ""
appKey: ""
intent: ""
enable: false
enable: # true or false (bool)
channelID: ""
channelName: ""
channel:
HW:
category:
XM:
channelID:
OPPO:
channelID:
fcm: #firebase cloud message 消息推送
serviceAccount: "openim-5c6c0-firebase-adminsdk-ppwol-8765884a78.json" #帐号文件,此处需要改修配置,并且这个文件放在 config目录下
serviceAccount: #帐号文件,此处需要改修配置,并且这个文件放在 config目录下
enable: false
mob: #袤博推送
appKey: #帐号文件,此处需要改修配置,并且这个文件放在 config目录下
pushUrl:
scheme:
appSecret:
enable: false
@@ -239,7 +261,7 @@ manager:
secrets: [ "openIM1","openIM2", "openIM333", "openIMAdmin"]
appSysNotificationName: "系统通知"
secret: tuoyun
secret:
# 多端互踢策略
# 1多平台登录Android、iOS、Windows、Mac 每种平台只能一个在线web端可以多个同时在线
multiloginpolicy: 1
@@ -257,11 +279,11 @@ singleMessageHasReadReceiptEnable: true
#token config
tokenpolicy:
accessSecret: "open_im_server" #token生成相关默认即可
accessSecret: #token生成相关默认即可
# Token effective time day as a unit
accessExpire: 90 #token过期时间 默认即可
accessExpire: #token过期时间 默认即可
messageverify:
friendVerify: false
friendVerify:
# c2c:
# callbackBeforeSendMsg:
@@ -296,7 +318,10 @@ callback:
callbackAfterSendGroupMsg:
enable: false
callbackTimeOut: 2
callbackWordFilter:
callbackAfterConsumeGroupMsg:
enable: false
callbackTimeOut: 2
callbackMsgModify:
enable: false
callbackTimeOut: 2
callbackFailedContinue: true
@@ -321,6 +346,26 @@ callback:
enable: false
callbackTimeOut: 2
callbackFailedContinue: true # 回调超时是否继续离线推送
callbackBeforeAddFriend:
enable: false
callbackTimeOut: 2
callbackFailedContinue: true # 回调超时是否继续
callbackBeforeCreateGroup:
enable: false
callbackTimeOut: 2
callbackFailedContinue: true # 回调超时是否继续
callbackBeforeMemberJoinGroup:
enable: false
callbackTimeOut: 2
callbackFailedContinue: true # 回调超时是否继续
callbackBeforeSetGroupMemberInfo:
enable: false
callbackTimeOut: 2
callbackFailedContinue: true # 回调超时是否继续
callbackSetMessageReactionExtensions:
enable: false
callbackTimeOut: 2
callbackFailedContinue: true # 回调超时是否继续
notification:
@@ -642,6 +687,19 @@ notification:
defaultTips:
tips: "Remove a blocked user"
friendInfoUpdated:
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
title: "friend info updated"
desc: "friend info updated"
ext: "friend info updated"
defaultTips:
tips: "friend info updated"
#####################user#########################
userInfoUpdated:
conversation:
@@ -717,18 +775,18 @@ demo:
#demo对外服务端口默认即可需要开放此端口或做nginx转发
openImDemoPort: [ 10004 ]
alismsverify: #阿里云短信配置在阿里云申请成功后修改以下四项enable为true则必须修改阿里云为默认短信验证方式
accessKeyId: LTAI5tJPkn4HuuePdiLdGqe7
accessKeySecret: 4n9OJ7ZCVN1U6KeHDAtOyNeVZcjOuV
signName: 托云信息技术
verificationCodeTemplateCode: SMS_226810164
accessKeyId:
accessKeySecret:
signName:
verificationCodeTemplateCode:
enable: false
tencentsms: #腾讯云短信配置在腾讯云申请成功后修改以下选项enable为true则必须修改
appID: 2400000648
region: "ap-singapore"
secretID: IKIDra4JPGsFMDwQedMq42lESQBgwwgBQQAe
secretKey: HI6fz4uUotjJdiX6QUIrAE2buxlKdgU2
signName: ""
verificationCodeTemplateCode: 2902877
appID:
region:
secretID:
secretKey:
signName:
verificationCodeTemplateCode:
enable: true
superCode: 666666 #超级验证码,建议修改掉,收不到短信验证码时可以用此替代
needInvitationCode: false
@@ -736,11 +794,11 @@ demo:
codeTTL: 60
useSuperCode: true
mail: #仅支持qq邮箱具体操作参考 https://service.mail.qq.com/cgi-bin/help?subtype=1&id=28&no=1001256 必须修改
title: "openIM"
senderMail: "765567899@qq.com"
senderAuthorizationCode: "gxyausfoevlzbfag"
smtpAddr: "smtp.qq.com"
smtpPort: 25 #需开放此端口 出口方向
title:
senderMail:
senderAuthorizationCode:
smtpAddr:
smtpPort: #需开放此端口 出口方向
testDepartMentID: 001
imAPIURL: http://127.0.0.1:10002
onboardProcess: false # 是否开启注册流程
@@ -749,9 +807,14 @@ demo:
joinDepartmentGroups: false # 注册是否加部门群
oaNotification: false # 注册是否发送OA通知
workMoment:
onlyFriendCanSee: false
rtc:
signalTimeout: 35
# prometheus每个服务监听的端口数量需要和rpc port保持一致
prometheus:
enable: false
userPrometheusPort: [ 20110 ]
@@ -767,4 +830,4 @@ prometheus:
conversationPrometheusPort: [ 20230 ]
cachePrometheusPort: [ 20240 ]
realTimeCommPrometheusPort: [ 21300 ]
messageTransferPrometheusPort: [ 21400 ]
messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] # 端口数量和 script/path_info.cfg msg_transfer_service_num保持一致

View File

@@ -0,0 +1,205 @@
upstream im_msg_gateway{
server 127.0.0.1:10001; #IM消息服务器地址 根据部署情况可指定多台
}
upstream im_api{
server 127.0.0.1:10002; #IM群组用户api服务器地址 根据部署情况可指定多台
}
upstream im_jssdk_gateway{
server 127.0.0.1:10003; #IM jssdk服务器地址 根据部署情况可指定多台
}
upstream im_demo{
server 127.0.0.1:10004; #IM demo登录注册服务器地址 根据部署情况可指定多台
}
upstream storage {
server 127.0.0.1:10005; #MinIO服务器地址 暂时支持1台
}
upstream im_admin{
server 127.0.0.1:10006; #IM admin服务器地址 根据部署情况可指定多台
}
upstream im_grafana{
server 127.0.0.1:10007; #IM 统计服务器地址 docker-compose启动所在机器
}
upstream im_chat{
server 127.0.0.1:10008; #IM 商业版登录注册服务器地址 根据部署情况可指定多台
}
upstream im_complete_admin{
server 127.0.0.1:10009; #IM 商业版admin地址 根据部署情况可指定多台
}
upstream im_organization{
server 127.0.0.1:10010; #IM 商业版组织架构服务器地址 根据部署情况可指定多台
}
upstream im_open_rtc{
server 127.0.0.1:7880; #rtc 音视频通话 服务器地址 根据部署情况可指定多台
}
server {
listen 443;
server_name web.rentsoft.cn; #1 web im 端 域名
ssl on;
ssl_certificate /etc/nginx/conf.d/ssl/web.rentsoft.cn.crt; #2 证书
ssl_certificate_key /etc/nginx/conf.d/ssl/web.rentsoft.cn.key; #3 证书
ssl_session_timeout 5m;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png application/wasm;
gzip_vary off;
gzip_disable "MSIE [1-6]\.";
error_page 405 =200 $uri;
default_type application/wasm;
location /{ #web demo
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-NginX-Proxy true;
root /data1/online/Pc-Web-Demo/build/; # web im静态资源存放路径
index index.html;
try_files $uri $uri/ /index.html;
}
location /msg_gateway { #10001 ws
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://im_msg_gateway/;
}
location ^~/api/ { #10002 api
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://im_api/;
}
location /jssdk_gateway { #10003 jssdk
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://im_jssdk_gateway/;
}
location ^~/demo/ { # 10004 demo
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://im_demo/;
}
location ^~/admin/ { #10006 admin
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://im_admin/;
}
location ^~/grafana/ { #10007 prometheus
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://im_grafana/;
}
location ^~/chat/ { #10008 chat login
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://im_chat/;
}
location ^~/complete_admin/ { #10009 admin
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://im_complete_admin/;
}
location ^~/organization/ { #10010 organization
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://im_organization/;
}
location ^~/open_rtc/ { #7880 rtc
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://im_open_rtc/;
}
}
server {
listen 80;
server_name web.rentsoft.cn ; #1 web im 端 域名
rewrite ^(.*)$ https://${server_name}$1 permanent;
}
server {
ssl_session_timeout 5m;
listen 443;
server_name storage.rentsoft.cn; #1 MinIO存储域名
ssl on;
ssl_certificate /etc/nginx/conf.d/ssl/storage.rentsoft.cn.crt; #证书
ssl_certificate_key /etc/nginx/conf.d/ssl/storage.rentsoft.cn.key; #证书
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary off;
gzip_disable "MSIE [1-6]\.";
location / {
proxy_pass http://storage;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
client_max_body_size 8000M;
}
}
server {
listen 443;
server_name admin.rentsoft.cn; #后台管理域名
ssl on;
ssl_certificate /etc/nginx/conf.d/ssl/admin.rentsoft.cn.crt; # 证书
ssl_certificate_key /etc/nginx/conf.d/ssl/admin.rentsoft.cn.key; #证书
ssl_session_timeout 5m;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary off;
gzip_disable "MSIE [1-6]\.";
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-NginX-Proxy true;
root /data1/online/Open-IM-Admin/dist/; #管理后台web静态资源存放路径
index index.html;
try_files $uri $uri/ /index.html;
}
}
server {
listen 80;
server_name admin.rentsoft.cn; #管理后台 域名
rewrite ^(.*)$ https://${server_name}$1 permanent;
}

43
config/usualConfig.yaml Normal file
View File

@@ -0,0 +1,43 @@
etcd:
userName:
password:
secret: openIM123 # etcd 配置密钥
mysql:
dbMysqlUserName: root #mysql用户名
dbMysqlPassword: openIM123 # mysql密码
mongo:
dbUserName: root #mongo用户名
dbPassword: openIM123 #mongo密码
redis:
dbUserName:
dbPassWord: openIM123 #redis密码
kafka:
SASLUserName:
SASLPassword:
credential:
minio:
endpoint: http://127.0.0.1:10005 #发图片视频文件需要填写
accessKeyID: root
secretAccessKey: openIM123
secret: tuoyun #建议修改
tokenpolicy:
accessSecret: "open_im_server" #token生成相关 建议修改
accessExpire: 90 #token过期时间 默认即可
messageverify:
friendVerify: false #发送消息是否验证好友关系 false表示不验证好友关系
push:
getui:
pushUrl: "https://restapi.getui.com/v2/$appId"
masterSecret: "" #需添加
appKey: "" #需添加
enable: false #true启动个推推送

View File

@@ -79,11 +79,11 @@ cmsapi:
credential:
tencent:
appID: 1302656840
region: ap-chengdu
bucket: echat-1302656840
secretID: AKIDGNYVChzIQinu7QEgtNp0hnNgqcV8vZTC
secretKey: kz15vW83qM6dBUWIq681eBZA0c0vlIbe
appID:
region:
bucket:
secretID:
secretKey:
rpcport:
@@ -131,16 +131,16 @@ longconnsvr:
push:
tpns:
ios:
accessID: 1600018281
secretKey: 3cd68a77a95b89e5089a1aca523f318f
accessID:
secretKey:
android:
accessID: 111
secretKey: 111
accessID:
secretKey:
jpns:
appKey: cf47465a368f24c659608e7e
masterSecret: 02204efe3f3832947a236ee5
pushUrl: "https://api.jpush.cn/v3/push"
pushIntent: "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end"
appKey:
masterSecret:
pushUrl:
pushIntent:
manager:
appManagerUid: ["openIM123456","openIM654321"]
secrets: ["openIM1","openIM2"]
@@ -168,16 +168,16 @@ demoswitch: true
demo:
openImDemoPort: [ 42233 ]
alismsverify:
accessKeyId: LTAI5tJPkn4HuuePdiLdGqe71
accessKeySecret: 4n9OJ7ZCVN1U6KeHDAtOyNeVZcjOuV1
signName: OpenIM Corporation
verificationCodeTemplateCode: SMS_2268101641
accessKeyId:
accessKeySecret:
signName:
verificationCodeTemplateCode:
superCode: 666666
mail:
title: "openIM"
senderMail: "1765567899@qq.com"
senderAuthorizationCode: "1gxyausfoevlzbfag"
smtpAddr: "smtp.qq.com"
smtpPort: 25
title:
senderMail:
senderAuthorizationCode:
smtpAddr:
smtpPort:

View File

@@ -12,7 +12,8 @@ ADD ./open_im_admin_cms $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config", "/Open-IM-Server/script"]

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: admin-cms
image: openim/admin_cms:v2.3.0release
image: openim/admin_cms:v2.3.8
# imagePullPolicy: Always #每次启动都重新拉取镜像
ports:
- containerPort: 10200
@@ -25,11 +25,18 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -11,7 +11,8 @@ ADD ./open_im_api $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: api
image: openim/api:v2.3.0release
image: openim/api:v2.3.8
# imagePullPolicy: Always
ports:
- containerPort: 10002
@@ -25,11 +25,17 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新
---

View File

@@ -11,7 +11,8 @@ ADD ./open_im_auth $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: auth
image: openim/auth:v2.3.0release
image: openim/auth:v2.3.8
# imagePullPolicy: Always
ports:
- containerPort: 10160
@@ -25,10 +25,16 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -2,7 +2,7 @@
source ./path_info.cfg
# images version
version=v2.2.0
version=v2.3.8
git pull
cd ../script/; ./build_all_service.sh
cd ../deploy_k8s/

View File

@@ -12,7 +12,8 @@ ADD ./open_im_cache $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]
WORKDIR $CMDDIR

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: cache
image: openim/cache:v2.3.0release
image: openim/cache:v2.3.8
# imagePullPolicy: Always
ports:
- containerPort: 10240
@@ -25,10 +25,16 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -11,7 +11,8 @@ ADD ./open_im_cms_api $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]
WORKDIR $CMDDIR

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: cms-api
image: openim/cms_api:v2.3.0release
image: openim/cms_api:v2.3.8
imagePullPolicy: Always
ports:
- containerPort: 10006
@@ -25,11 +25,17 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新
---

View File

@@ -11,7 +11,8 @@ ADD ./open_im_conversation $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]
WORKDIR $CMDDIR

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: conversation
image: openim/conversation:v2.3.0release
image: openim/conversation:v2.3.8
# imagePullPolicy: Always
ports:
- containerPort: 10230
@@ -24,13 +24,19 @@ spec:
mountPath: /Open-IM-Server/config
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
- name: CONFIG_NAME
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -11,7 +11,8 @@ ADD ./open_im_demo $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: demo
image: openim/demo:v2.3.0release
image: openim/demo:v2.3.8
imagePullPolicy: Always
ports:
- containerPort: 10004
@@ -25,11 +25,17 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新
---

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: friend
image: openim/friend:v2.3.0release
image: openim/friend:v2.3.8
# imagePullPolicy: Always
ports:
- containerPort: 10120
@@ -25,11 +25,17 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -12,7 +12,8 @@ ADD ./open_im_friend $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]
WORKDIR $CMDDIR

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: group
image: openim/group:v2.3.0release
image: openim/group:v2.3.8
# imagePullPolicy: Always
ports:
- containerPort: 10150
@@ -25,10 +25,16 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -11,7 +11,8 @@ ADD ./open_im_group $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]

View File

@@ -9,17 +9,17 @@
6. 将rpcRegisterIP修改为空, 此地址为每个rpc注册到ETCD的地址, 置空每个rpc将会将pod地址注册到ETCD, 才能正确rpc请求(重要)
7. 如果使用minio作为对象存储, 还需要修改minio的地址
8. 其他如果使用离线推送,需要修改push离线推送配置
9. 修改demo中的imAPIURL字段为openIM api的ingress或者service地址, 需要让demo的pod能正确请求到(重要)
10. 其他非必须配置修改, 如短信,推送等
### 2. 项目根目录创建im configMap到k8s openim namespace
1. 为open-IM项目创建单独命名空间
```
kubectl create namespace openim
```
2. 在项目根目录通过config/config.yaml
2. 修改config.yaml后在项目根目录创建configmap, config/usualConfig.yaml只需要挂载不需要修改配置
```
kubectl -n openim create configmap config --from-file=config/config.yaml
kubectl -n openim create configmap openim-config --from-file=config/config.yaml
kubectl -n openim create configmap openim-usualconfig --from-file=config/usualConfig.yaml
```
查看configmap
```

View File

@@ -10,8 +10,6 @@ service=(
group
auth
admin-cms
message-cms
statistics
office
organization
conversation

View File

@@ -1,34 +0,0 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: message-cms-deployment
spec:
selector:
matchLabels:
app: message-cms # 选择这个指定标签执行
replicas: 1 # 运行pod数量
template:
metadata:
labels:
app: message-cms # 标签
spec:
containers:
- name: message-cms
image: openim/message_cms:v2.3.0release
# imagePullPolicy: Always
ports:
- containerPort: 10190
volumeMounts:
- name: config
mountPath: /Open-IM-Server/config
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -1,19 +0,0 @@
FROM ubuntu
# 设置固定的项目路径
ENV WORKDIR /Open-IM-Server
ENV CMDDIR $WORKDIR/cmd
ENV CONFIG_NAME $WORKDIR/config/config.yaml
# 将可执行文件复制到目标目录
ADD ./open_im_message_cms $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]
WORKDIR $CMDDIR
CMD ./main

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: msg
image: openim/msg:v2.3.0release
image: openim/msg:v2.3.8
# imagePullPolicy: Always
ports:
- containerPort: 10130
@@ -25,10 +25,16 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -12,7 +12,8 @@ ADD ./open_im_msg $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: msg-gateway
image: openim/msg_gateway:v2.3.0release
image: openim/msg_gateway:v2.3.8
# imagePullPolicy: Always
ports:
- name: rpc-port
@@ -28,11 +28,17 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新
---

View File

@@ -11,7 +11,8 @@ ADD ./open_im_msg_gateway $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: msg-transfer
image: openim/msg_transfer:v2.3.0release
image: openim/msg_transfer:v2.3.8
# imagePullPolicy: Always
volumeMounts:
- name: config
@@ -23,10 +23,16 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -11,7 +11,8 @@ ADD ./open_im_msg_transfer $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: office
image: openim/office:v2.3.0release
image: openim/office:v2.3.8
# imagePullPolicy: Always
ports:
- containerPort: 10210
@@ -25,10 +25,16 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -12,7 +12,8 @@ ADD ./open_im_office $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: organization
image: openim/organization:v2.3.0release
image: openim/organization:v2.3.8
# imagePullPolicy: Always
ports:
- containerPort: 10220
@@ -25,10 +25,16 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -12,7 +12,8 @@ ADD ./open_im_organization $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]

View File

@@ -9,8 +9,6 @@ service=(
group
auth
admin_cms
message_cms
statistics
office
organization
conversation

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: push
image: openim/push:v2.3.0release
image: openim/push:v2.3.8
# imagePullPolicy: Always
ports:
- containerPort: 10170
@@ -25,10 +25,16 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -12,7 +12,8 @@ ADD ./open_im_push $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: sdk-server
image: openim/sdk_server:v2.3.0release
image: openim/sdk_server:v2.3.8
# imagePullPolicy: Always
ports:
- containerPort: 10003
@@ -29,7 +29,7 @@ spec:
- name: CONFIG_NAME
value: "/Open-IM-Server"
command: ["/Open-IM-Server/main"]
args: ["-openIM_ws_address", "ws_addr", "-sdk_ws_port", "10001", "-openIM_api_address", "api_address", "-openIM_log_level", "6"]
args: ["-openIM_ws_address", "ws_addr", "-sdk_ws_port", "10003", "-openIM_api_address", "api_address", "-openIM_log_level", "6"]
volumes:
- name: config
configMap:

View File

@@ -11,7 +11,8 @@ ADD ./open_im_sdk_server $WORKDIR/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/db && \
chmod +x $WORKDIR/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script","/Open-IM-Server/db/sdk"]
WORKDIR $CMDDIR

View File

@@ -1,34 +0,0 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: statistics-deployment
spec:
selector:
matchLabels:
app: statistics # 选择这个指定标签执行
replicas: 1 # 运行pod数量
template:
metadata:
labels:
app: statistics # 标签
spec:
containers:
- name: statistics
image: openim/statistics:v2.3.0release
# imagePullPolicy: Always
ports:
- containerPort: 10180
volumeMounts:
- name: config
mountPath: /Open-IM-Server/config
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -1,19 +0,0 @@
FROM ubuntu
# 设置固定的项目路径
ENV WORKDIR /Open-IM-Server
ENV CMDDIR $WORKDIR/cmd
ENV CONFIG_NAME $WORKDIR/config/config.yaml
# 将可执行文件复制到目标目录
ADD ./open_im_statistics $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]
WORKDIR $CMDDIR
CMD ./main

View File

@@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: user
image: openim/user:v2.3.0release
image: openim/user:v2.3.8
# imagePullPolicy: Always
volumeMounts:
- name: config
@@ -23,10 +23,16 @@ spec:
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: openim-config
projected:
sources:
- configMap:
name: openim-config
- configMap:
name: openim-usualconfig
strategy: #更新策略
type: RollingUpdate # 滚动更新

View File

@@ -11,7 +11,8 @@ ADD ./open_im_user $WORKDIR/cmd/main
# 创建用于挂载的几个目录,添加可执行权限
RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \
chmod +x $WORKDIR/cmd/main
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"]

View File

@@ -1,6 +1,5 @@
version: "3"
#fixme Clone openIM Server project before using docker-compose,project addresshttps://github.com/OpenIMSDK/Open-IM-Server.git
version: "3"
services:
mysql:
image: mysql:5.7
@@ -9,10 +8,10 @@ services:
- 23306:33060
container_name: mysql
volumes:
- ./components/mysql/data:/var/lib/mysql
- ${DATA_DIR}/components/mysql/data:/var/lib/mysql
- /etc/localtime:/etc/localtime
environment:
MYSQL_ROOT_PASSWORD: openIM
MYSQL_ROOT_PASSWORD: ${PASSWORD}
restart: always
mongodb:
@@ -20,21 +19,22 @@ services:
ports:
- 37017:27017
container_name: mongo
command: --wiredTigerCacheSizeGB 1
command: --wiredTigerCacheSizeGB 1 --auth
volumes:
- ./components/mongodb/data/db:/data/db
- ./components/mongodb/data/logs:/data/logs
- ./components/mongodb/data/conf:/etc/mongo
# - ./script/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh
- ${DATA_DIR}/components/mongodb/data/db:/data/db
- ${DATA_DIR}/components/mongodb/data/logs:/data/logs
- ${DATA_DIR}/components/mongodb/data/conf:/etc/mongo
- ./script/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro
environment:
- TZ=Asia/Shanghai
# cache
- wiredTigerCacheSizeGB=1
# - MONGO_USERNAME=openIM
# - MONGO_PASSWORD=openIM
# - MONGO_INITDB_ROOT_USERNAME=root
# - MONGO_INITDB_ROOT_PASSWORD=root
# - MONGO_INITDB_DATABASE=openIM
- MONGO_INITDB_ROOT_USERNAME=${USER}
- MONGO_INITDB_ROOT_PASSWORD=${PASSWORD}
- MONGO_INITDB_DATABASE=openIM
- MONGO_USERNAME=${USER}
- MONGO_PASSWORD=${PASSWORD}
#
restart: always
redis:
@@ -43,15 +43,15 @@ services:
- 16379:6379
container_name: redis
volumes:
- ./components/redis/data:/data
- ${DATA_DIR}/components/redis/data:/data
#redis config file
- ./components/redis/config/redis.conf:/usr/local/redis/config/redis.conf
- ${DATA_DIR}/components/redis/config/redis.conf:/usr/local/redis/config/redis.conf
environment:
TZ: Asia/Shanghai
restart: always
sysctls:
net.core.somaxconn: 1024
command: redis-server --requirepass openIM --appendonly yes
command: redis-server --requirepass ${PASSWORD} --appendonly yes
zookeeper:
@@ -108,19 +108,20 @@ services:
- /mnt/data:/data
- /mnt/config:/root/.minio
environment:
MINIO_ROOT_USER: user12345
MINIO_ROOT_PASSWORD: key12345
MINIO_ROOT_USER: ${USER}
MINIO_ROOT_PASSWORD: ${PASSWORD}
restart: always
command: minio server /data --console-address ':9090'
open_im_server:
image: openim/open_im_server:v2.3.2
image: openim/open_im_server:v2.3.8
container_name: open_im_server
volumes:
- ./logs:/Open-IM-Server/logs
- ./config/config.yaml:/Open-IM-Server/config/config.yaml
- ./db/sdk:/Open-IM-Server/db/sdk
- ./config/usualConfig.yaml:/Open-IM-Server/config/usualConfig.yaml
- ${DATA_DIR}/db/sdk:/Open-IM-Server/db/sdk
- ./script:/Open-IM-Server/script
restart: always
depends_on:
@@ -137,14 +138,36 @@ services:
max-size: "1g"
max-file: "2"
open_im_enterprise:
image: openim/open_im_enterprise:v1.0.3
container_name: open_im_enterprise
volumes:
- ./logs:/Open-IM-Enterprise/logs
- ./docker-compose_cfg/config.yaml:/Open-IM-Enterprise/config/config.yaml
restart: always
depends_on:
- mysql
- mongodb
- redis
- etcd
- minio
- open_im_server
network_mode: "host"
logging:
driver: json-file
options:
max-size: "1g"
max-file: "2"
environment:
CONFIG_NAME: "/Open-IM-Enterprise"
prometheus:
image: prom/prometheus
volumes:
- ./docker-compose_cfg/prometheus-compose.yml:/etc/prometheus/prometheus.yml
# - ./components/prometheus_data:/prometheus
container_name: prometheus
ports:
- 9091:9091
# ports:
# - 9091:9091
depends_on:
- open_im_server
command: --web.listen-address=:9091 --config.file="/etc/prometheus/prometheus.yml"
@@ -159,8 +182,8 @@ services:
- ./docker-compose_cfg/grafana.ini:/etc/grafana/grafana.ini
- ./docker-compose_cfg/node-exporter-full_rev1.json:/var/lib/grafana/dashboards/node-exporter-full_rev1.json
container_name: grafana
ports:
- 10007:10007
# ports:
# - 10007:10007
depends_on:
- prometheus
network_mode: "host"
@@ -171,4 +194,3 @@ services:
restart: always
ports:
- "9100:9100"
# command: --collector.ENTER-THE-NAME-OF-COLLECTOR

View File

@@ -0,0 +1,65 @@
#---------------Infrastructure configuration---------------------#
etcd:
etcdSchema: openim #默认即可
etcdAddr: [ 127.0.0.1:2379 ] #单机部署时,默认即可
userName:
password:
secret: openIM123
mysql:
dbMysqlDatabaseName: admin_chat # 数据库名字 默认即可
# 默认管理员账号
admin:
defaultAccount:
account: [ "admin1", "admin2" ]
defaultPassword: [ "password1", "password2" ]
openIMUserID: [ "openIM123456", "openIMAdmin" ]
faceURL: [ "", "" ]
nickname: [ "admin1", "admin2" ]
level: [ 1, 100 ]
adminapi:
openImAdminApiPort: [ 10009 ] #管理后台api服务端口默认即可需要开放此端口或做nginx转发
listenIP: 0.0.0.0
chatapi:
openImChatApiPort: [ 10008 ] #登录注册默认即可需要开放此端口或做nginx转发
listenIP: 0.0.0.0
rpcport: # rpc服务端口 默认即可
openImAdminPort: [ 30200 ]
openImChatPort: [ 30300 ]
rpcregistername: #rpc注册服务名默认即可
openImChatName: Chat
openImAdminCMSName: Admin
chat:
codeTTL: 300 #短信验证码有效时间(秒)
superVerificationCode: 666666 # 超级验证码
alismsverify: #阿里云短信配置,在阿里云申请成功后修改以下四项
accessKeyId:
accessKeySecret:
signName:
verificationCodeTemplateCode:
oss:
tempDir: enterprise-temp # 临时密钥上传的目录
dataDir: enterprise-data # 最终存放目录
aliyun:
endpoint: https://oss-cn-chengdu.aliyuncs.com
accessKeyID: ""
accessKeySecret: ""
bucket: ""
tencent:
BucketURL: ""
serviceURL: https://cos.COS_REGION.myqcloud.com
secretID: ""
secretKey: ""
sessionToken: ""
bucket: ""
use: "minio"

BIN
docker-compose_cfg/grafana.db Executable file

Binary file not shown.

View File

@@ -1105,7 +1105,7 @@ disable_sanitize_html = false
enable_alpha = false
app_tls_skip_verify_insecure = false
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
allow_loading_unsigned_plugins =
allow_loading_unsigned_plugins = grafana-simple-json-backend-datasource
# Enable or disable installing / uninstalling / updating plugins directly from within Grafana.
plugin_admin_enabled = true
plugin_admin_external_manage_enabled = false

View File

@@ -13,14 +13,76 @@ scrape_configs:
- job_name: 'openIM-server'
metrics_path: /metrics
static_configs:
- targets: ['localhost:10002']
labels:
group: 'api'
- targets: ['localhost:10006']
labels:
group: 'cms-api'
- targets: ['localhost:21400']
- targets: ['localhost:20110']
labels:
group: 'user'
- targets: ['localhost:20120']
labels:
group: 'friend'
- targets: ['localhost:20130']
labels:
group: 'message'
- targets: ['localhost:20140']
labels:
group: 'msg-gateway'
- targets: ['localhost:20150']
labels:
group: 'group'
- targets: ['localhost:20160']
labels:
group: 'auth'
- targets: ['localhost:20170']
labels:
group: 'push'
- targets: ['localhost:20120']
labels:
group: 'friend'
- targets: ['localhost:20200']
labels:
group: 'admin-cms'
- targets: ['localhost:20120']
labels:
group: 'office'
- targets: ['localhost:20220']
labels:
group: 'organization'
- targets: ['localhost:20230']
labels:
group: 'conversation'
- targets: ['localhost:20240']
labels:
group: 'cache'
- targets: ['localhost:21400', 'localhost:21401', 'localhost:21402', 'localhost:21403']
labels:
group: 'msg-transfer'
- job_name: 'node'
scrape_interval: 8s
static_configs:

7
go.mod
View File

@@ -24,11 +24,11 @@ require (
github.com/go-playground/validator/v10 v10.11.0
github.com/go-redis/redis/v8 v8.11.5
github.com/gogo/protobuf v1.3.2
github.com/golang-jwt/jwt/v4 v4.1.0
github.com/golang-jwt/jwt/v4 v4.4.2
github.com/golang/protobuf v1.5.2
github.com/gorilla/websocket v1.4.2
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/jinzhu/copier v0.3.4
github.com/jinzhu/gorm v1.9.16
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible
github.com/lestrrat-go/strftime v1.0.4 // indirect
@@ -38,7 +38,7 @@ require (
github.com/olivere/elastic/v7 v7.0.23
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.13.0 // indirect
github.com/prometheus/client_golang v1.13.0
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5
github.com/robfig/cron/v3 v3.0.1
github.com/sirupsen/logrus v1.8.1
@@ -49,7 +49,6 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.428
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.428
github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca
github.com/xuri/excelize/v2 v2.6.0
go.etcd.io/etcd/api/v3 v3.5.4
go.etcd.io/etcd/client/v3 v3.5.4
go.mongodb.org/mongo-driver v1.8.3

30
go.sum
View File

@@ -156,6 +156,7 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM=
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
@@ -178,6 +179,7 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y=
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
@@ -247,8 +249,9 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.1.0 h1:XUgk2Ex5veyVFVeLm0xhusUTQybEbexJXrvPNOKkSY0=
github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs=
github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -341,6 +344,7 @@ github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7Fsg
github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE=
@@ -364,8 +368,6 @@ github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZ
github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
github.com/jinzhu/copier v0.3.4 h1:mfU6jI9PtCeUjkjQ322dlff9ELjGDu975C2p/nrubVI=
github.com/jinzhu/copier v0.3.4/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o=
github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
@@ -419,6 +421,7 @@ github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible h1:Y6sqxHMyB1D2YSzWkL
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible/go.mod h1:ZQnN8lSECaebrkQytbHj4xNgtg8CR7RYXnPok8e0EHA=
github.com/lestrrat-go/strftime v1.0.4 h1:T1Rb9EPkAhgxKqbcMIPguPq8glqXTA1koF8n9BHElA8=
github.com/lestrrat-go/strftime v1.0.4/go.mod h1:E1nN3pCbtMSu1yjSVeyuRFVm/U0xoR76fd03sz+Qz4g=
github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4=
github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lithammer/shortuuid v3.0.0+incompatible h1:NcD0xWW/MZYXEHa6ITy6kaXN5nwm/V115vj2YXfhS0w=
github.com/lithammer/shortuuid v3.0.0+incompatible/go.mod h1:FR74pbAuElzOUuenUHTK2Tciko1/vKuIKS9dSkDrA4w=
@@ -430,6 +433,7 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA=
github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
@@ -450,8 +454,6 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@@ -521,10 +523,6 @@ github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
github.com/richardlehane/msoleps v1.0.1 h1:RfrALnSNXzmXLbGct/P2b4xkFz4e8Gmj/0Vj9M9xC1o=
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 h1:mZHayPoR0lNmnHyvtYjDeq0zlVHn9K/ZXoy17ylucdo=
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
@@ -594,12 +592,6 @@ github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyh
github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
github.com/xdg/scram v1.0.3/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
github.com/xdg/stringprep v1.0.3/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
github.com/xuri/efp v0.0.0-20220407160117-ad0f7a785be8 h1:3X7aE0iLKJ5j+tz58BpvIZkXNV7Yq4jC93Z/rbN2Fxk=
github.com/xuri/efp v0.0.0-20220407160117-ad0f7a785be8/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/excelize/v2 v2.6.0 h1:m/aXAzSAqxgt74Nfd+sNzpzVKhTGl7+S9nbG4A57mF4=
github.com/xuri/excelize/v2 v2.6.0/go.mod h1:Q1YetlHesXEKwGFfeJn7PfEZz2IvHb6wdOeYjBxVcVs=
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 h1:OAmKAfT06//esDdpi/DZ8Qsdt4+M5+ltca05dA5bG2M=
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -654,7 +646,6 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220408190544-5352b0902921/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -747,7 +738,6 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220622184535-263ec571b305 h1:dAgbJ2SP4jD6XYfMNLVj0BF21jo2PjChrtGaAvF5M3I=
golang.org/x/net v0.0.0-20220622184535-263ec571b305/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
@@ -766,8 +756,8 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 h1:B333XXssMuKQeBwiNODx4TupZy7bf4sxFZnN2ZOcvUE=
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg=
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -779,7 +769,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8=
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1076,7 +1065,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=

9
init_docker.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
cd script ;
chmod +x *.sh ;
./env_check.sh;
cd .. ;
docker-compose up -d;
cd script ;
./docker_check_service.sh

19
install_im_server.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
internet_ip=`curl ifconfig.me -s`
echo $internet_ip
source .env
echo $MINIO_ENDPOINT
if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then
sed -i "s/127.0.0.1/${internet_ip}/" .env
fi
cd script ;
chmod +x *.sh ;
./init_pwd.sh
./env_check.sh;
cd .. ;
docker-compose up -d;
cd script ;
./docker_check_service.sh

View File

@@ -107,7 +107,7 @@ func UserToken(c *gin.Context) {
params := api.UserTokenReq{}
if err := c.BindJSON(&params); err != nil {
errMsg := " BindJSON failed " + err.Error()
log.NewError("0", errMsg)
log.NewError(params.OperationID, errMsg)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg})
return
}
@@ -199,7 +199,6 @@ func ForceLogout(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg})
return
}
req := &rpc.ForceLogoutReq{}
utils.CopyStructFields(req, &params)

View File

@@ -9,7 +9,6 @@ import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/jinzhu/gorm"
)
func SetClientInitConfig(c *gin.Context) {
@@ -62,11 +61,10 @@ func GetClientInitConfig(c *gin.Context) {
}
config, err := imdb.GetClientInitConfig()
if err != nil {
if !gorm.IsRecordNotFoundError(err) {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
return
}
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
return
}
resp.Data.DiscoverPageURL = config.DiscoverPageURL
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp ", resp)

View File

@@ -42,10 +42,14 @@ func KickGroupMember(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
if len(params.KickedUserIDList) > constant.MaxNotificationNum {
errMsg := params.OperationID + " too many members " + utils.Int32ToString(int32(len(params.KickedUserIDList)))
log.Error(params.OperationID, errMsg)
c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": errMsg})
return
}
req := &rpc.KickGroupMemberReq{}
utils.CopyStructFields(req, &params)
var ok bool
var errInfo string
ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
@@ -318,6 +322,12 @@ func InviteUserToGroup(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
if len(params.InvitedUserIDList) > constant.MaxNotificationNum {
errMsg := params.OperationID + " too many members " + utils.Int32ToString(int32(len(params.InvitedUserIDList)))
log.Error(params.OperationID, errMsg)
c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": errMsg})
return
}
req := &rpc.InviteUserToGroupReq{}
utils.CopyStructFields(req, &params)
@@ -360,6 +370,47 @@ func InviteUserToGroup(c *gin.Context) {
log.NewInfo(req.OperationID, "InviteUserToGroup api return ", resp)
c.JSON(http.StatusOK, resp)
}
func InviteUserToGroups(c *gin.Context) {
params := api.InviteUserToGroupsReq{}
if err := c.BindJSON(&params); err != nil {
log.NewError("0", "BindJSON failed ", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
req := &rpc.InviteUserToGroupsReq{}
utils.CopyStructFields(req, &params)
var ok bool
var errInfo string
ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
log.NewInfo(req.OperationID, "InviteUserToGroup args ", req.String())
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
client := rpc.NewGroupClient(etcdConn)
RpcResp, err := client.InviteUserToGroups(context.Background(), req)
if err != nil {
log.NewError(req.OperationID, "InviteUserToGroup failed ", err.Error(), req.String())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
return
}
resp := api.InviteUserToGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}}
log.NewInfo(req.OperationID, "InviteUserToGroups api return ", resp)
c.JSON(http.StatusOK, resp)
}
// @Summary 创建群组
// @Description 创建群组

View File

@@ -38,6 +38,7 @@ func SetOptions(options map[string]bool, value bool) {
func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq {
var newContent string
options := make(map[string]bool, 5)
var err error
switch params.ContentType {
case constant.Text:
@@ -52,13 +53,20 @@ func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq {
fallthrough
case constant.File:
fallthrough
case constant.CustomNotTriggerConversation:
fallthrough
case constant.CustomOnlineOnly:
fallthrough
case constant.AtText:
fallthrough
case constant.AdvancedRevoke:
utils.SetSwitchFromOptions(options, constant.IsUnreadCount, false)
newContent = utils.StructToJsonString(params.Content)
case constant.Revoke:
utils.SetSwitchFromOptions(options, constant.IsUnreadCount, false)
newContent = params.Content["revokeMsgClientID"].(string)
default:
}
options := make(map[string]bool, 5)
if params.IsOnlineOnly {
SetOptions(options, false)
}
@@ -138,12 +146,6 @@ func ManagementSendMsg(c *gin.Context) {
data = VideoElem{}
case constant.File:
data = FileElem{}
//case constant.AtText:
// data = AtElem{}
//case constant.Merger:
// data =
//case constant.Card:
//case constant.Location:
case constant.Custom:
data = CustomElem{}
case constant.Revoke:
@@ -157,20 +159,22 @@ func ManagementSendMsg(c *gin.Context) {
data = CustomElem{}
case constant.CustomOnlineOnly:
data = CustomElem{}
case constant.AtText:
data = AtElem{}
//case constant.HasReadReceipt:
//case constant.Typing:
//case constant.Quote:
default:
c.JSON(http.StatusBadRequest, gin.H{"errCode": 404, "errMsg": "contentType err"})
c.JSON(http.StatusOK, gin.H{"errCode": 404, "errMsg": "contentType err"})
log.Error(c.PostForm("operationID"), "contentType err", c.PostForm("content"))
return
}
if err := mapstructure.WeakDecode(params.Content, &data); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": err.Error()})
c.JSON(http.StatusOK, gin.H{"errCode": 401, "errMsg": err.Error()})
log.Error(c.PostForm("operationID"), "content to Data struct err", err.Error())
return
} else if err := validate.Struct(data); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 403, "errMsg": err.Error()})
c.JSON(http.StatusOK, gin.H{"errCode": 403, "errMsg": err.Error()})
log.Error(c.PostForm("operationID"), "data args validate err", err.Error())
return
}
@@ -178,12 +182,13 @@ func ManagementSendMsg(c *gin.Context) {
token := c.Request.Header.Get("token")
claims, err := token_verify.ParseToken(token, params.OperationID)
if err != nil {
log.NewError(params.OperationID, "parse token failed", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "parse token failed", "sendTime": 0, "MsgID": ""})
log.NewError(params.OperationID, "parse token failed", err.Error(), token)
c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": "parse token failed", "sendTime": 0, "MsgID": ""})
return
}
if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "not authorized", "sendTime": 0, "MsgID": ""})
log.NewError(params.OperationID, "not authorized", token)
c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": "not authorized", "sendTime": 0, "MsgID": ""})
return
}
@@ -191,13 +196,13 @@ func ManagementSendMsg(c *gin.Context) {
case constant.SingleChatType:
if len(params.RecvID) == 0 {
log.NewError(params.OperationID, "recvID is a null string")
c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""})
c.JSON(http.StatusOK, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""})
return
}
case constant.GroupChatType, constant.SuperGroupChatType:
if len(params.GroupID) == 0 {
log.NewError(params.OperationID, "groupID is a null string")
c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""})
c.JSON(http.StatusOK, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""})
return
}
@@ -468,9 +473,13 @@ type FileElem struct {
FileSize int64 `mapstructure:"fileSize"`
}
type AtElem struct {
Text string `mapstructure:"text"`
AtUserList []string `mapstructure:"atUserList"`
IsAtSelf bool `mapstructure:"isAtSelf"`
Text string `mapstructure:"text"`
AtUserList []string `mapstructure:"atUserList"`
AtUsersInfo []struct {
AtUserID string `json:"atUserID,omitempty"`
GroupNickname string `json:"groupNickname,omitempty"`
} `json:"atUsersInfo,omitempty"`
IsAtSelf bool `mapstructure:"isAtSelf"`
}
type LocationElem struct {
Description string `mapstructure:"description"`
@@ -503,9 +512,10 @@ type OANotificationElem struct {
Ex string `mapstructure:"ex" json:"ex"`
}
type MessageRevoked struct {
RevokerID string `mapstructure:"notificationName" json:"revokerID" validate:"required"`
RevokerRole int32 `mapstructure:"notificationName" json:"revokerRole" validate:"required"`
ClientMsgID string `mapstructure:"notificationName" json:"clientMsgID" validate:"required"`
RevokerNickname string `mapstructure:"notificationName" json:"revokerNickname"`
SessionType int32 `mapstructure:"notificationName" json:"sessionType" validate:"required"`
RevokerID string `mapstructure:"revokerID" json:"revokerID" validate:"required"`
RevokerRole int32 `mapstructure:"revokerRole" json:"revokerRole" validate:"required"`
ClientMsgID string `mapstructure:"clientMsgID" json:"clientMsgID" validate:"required"`
RevokerNickname string `mapstructure:"revokerNickname" json:"revokerNickname"`
SessionType int32 `mapstructure:"sessionType" json:"sessionType" validate:"required"`
Seq uint32 `mapstructure:"seq" json:"seq" validate:"required"`
}

View File

@@ -80,7 +80,8 @@ func DelSuperGroupMsg(c *gin.Context) {
)
rpcReq := &rpc.DelSuperGroupMsgReq{}
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
log.NewError("", "args err:", err.Error())
c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
utils.CopyStructFields(rpcReq, &req)
@@ -91,7 +92,7 @@ func DelSuperGroupMsg(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + rpcReq.OpUserID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
c.JSON(http.StatusOK, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
options := make(map[string]bool, 5)

View File

@@ -0,0 +1,207 @@
package msg
import (
api "Open_IM/pkg/base_info"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
rpc "Open_IM/pkg/proto/msg"
"Open_IM/pkg/utils"
"context"
"github.com/gin-gonic/gin"
"net/http"
"strings"
)
func SetMessageReactionExtensions(c *gin.Context) {
var (
req api.SetMessageReactionExtensionsReq
resp api.SetMessageReactionExtensionsResp
reqPb rpc.SetMessageReactionExtensionsReq
)
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
if err := utils.CopyStructFields(&reqPb, &req); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields", err.Error())
}
var ok bool
var errInfo string
ok, reqPb.OpUserID, errInfo, reqPb.OpUserIDPlatformID = token_verify.GetUserIDAndPlatformIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
if grpcConn == nil {
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
msgClient := rpc.NewMsgClient(grpcConn)
respPb, err := msgClient.SetMessageReactionExtensions(context.Background(), &reqPb)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "DelMsgList failed", err.Error(), reqPb)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrServer.ErrCode, "errMsg": constant.ErrServer.ErrMsg + err.Error()})
return
}
resp.ErrCode = respPb.ErrCode
resp.ErrMsg = respPb.ErrMsg
resp.Data.ResultKeyValue = respPb.Result
resp.Data.MsgFirstModifyTime = reqPb.MsgFirstModifyTime
resp.Data.IsReact = reqPb.IsReact
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp)
c.JSON(http.StatusOK, resp)
}
func GetMessageListReactionExtensions(c *gin.Context) {
var (
req api.GetMessageListReactionExtensionsReq
resp api.GetMessageListReactionExtensionsResp
reqPb rpc.GetMessageListReactionExtensionsReq
)
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
if err := utils.CopyStructFields(&reqPb, &req); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields", err.Error())
}
var ok bool
var errInfo string
ok, reqPb.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusOK, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
if grpcConn == nil {
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
msgClient := rpc.NewMsgClient(grpcConn)
respPb, err := msgClient.GetMessageListReactionExtensions(context.Background(), &reqPb)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "DelMsgList failed", err.Error(), reqPb)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrServer.ErrCode, "errMsg": constant.ErrServer.ErrMsg + err.Error()})
return
}
resp.ErrCode = respPb.ErrCode
resp.ErrMsg = respPb.ErrMsg
resp.Data = respPb.SingleMessageResult
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp)
c.JSON(http.StatusOK, resp)
}
func AddMessageReactionExtensions(c *gin.Context) {
var (
req api.AddMessageReactionExtensionsReq
resp api.AddMessageReactionExtensionsResp
reqPb rpc.AddMessageReactionExtensionsReq
)
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
if err := utils.CopyStructFields(&reqPb, &req); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields", err.Error())
}
var ok bool
var errInfo string
ok, reqPb.OpUserID, errInfo, reqPb.OpUserIDPlatformID = token_verify.GetUserIDAndPlatformIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
if grpcConn == nil {
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
msgClient := rpc.NewMsgClient(grpcConn)
respPb, err := msgClient.AddMessageReactionExtensions(context.Background(), &reqPb)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "DelMsgList failed", err.Error(), reqPb)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrServer.ErrCode, "errMsg": constant.ErrServer.ErrMsg + err.Error()})
return
}
resp.ErrCode = respPb.ErrCode
resp.ErrMsg = respPb.ErrMsg
resp.Data.ResultKeyValue = respPb.Result
resp.Data.MsgFirstModifyTime = respPb.MsgFirstModifyTime
resp.Data.IsReact = respPb.IsReact
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp)
c.JSON(http.StatusOK, resp)
}
func DeleteMessageReactionExtensions(c *gin.Context) {
var (
req api.DeleteMessageReactionExtensionsReq
resp api.DeleteMessageReactionExtensionsResp
reqPb rpc.DeleteMessageListReactionExtensionsReq
)
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req)
if err := utils.CopyStructFields(&reqPb, &req); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields", err.Error())
}
var ok bool
var errInfo string
ok, reqPb.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
if grpcConn == nil {
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
msgClient := rpc.NewMsgClient(grpcConn)
respPb, err := msgClient.DeleteMessageReactionExtensions(context.Background(), &reqPb)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "DelMsgList failed", err.Error(), reqPb)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": constant.ErrServer.ErrCode, "errMsg": constant.ErrServer.ErrMsg + err.Error()})
return
}
resp.ErrCode = respPb.ErrCode
resp.ErrMsg = respPb.ErrMsg
resp.Data = respPb.Result
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp)
c.JSON(http.StatusOK, resp)
}

View File

@@ -80,7 +80,7 @@ func SendMsg(c *gin.Context) {
}
client := pbChat.NewMsgClient(etcdConn)
log.Info("", "", "api SendMsg call, api call rpc...")
log.Info(params.OperationID, "", "api SendMsg call, api call rpc...")
reply, err := client.SendMsg(context.Background(), pbData)
if err != nil {

Some files were not shown because too many files have changed in this diff Show More