mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 22:39:18 +08:00
Compare commits
176 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d187f53c79 | |||
| 5134fdf7e7 | |||
| 347f6f3382 | |||
| 103aa98e95 | |||
| 77733fdb2b | |||
| 3c796b7405 | |||
| fa263b9a87 | |||
| 108c4b1a50 | |||
| e4eb8ffd6e | |||
| ca72ce2d6f | |||
| 475ad26abd | |||
| cffefbd242 | |||
| cc5fa648de | |||
| 263ab752dd | |||
| cf0ef7652a | |||
| 709d772233 | |||
| c9df323da4 | |||
| 22df23cf8b | |||
| 0031aeca02 | |||
| 67e6e789ec | |||
| 9fdb85d354 | |||
| 8b2bfba89b | |||
| 2934535c18 | |||
| 9b9bfae857 | |||
| 32edd4b17c | |||
| d5651ae1d8 | |||
| 8aad2cf300 | |||
| 4bf4eb5464 | |||
| e66e490ae6 | |||
| 1d6d163da0 | |||
| 8e1bb9abb9 | |||
| d26e2594f2 | |||
| 5893181226 | |||
| e2b581f2cc | |||
| 2531091742 | |||
| 9d42a2abc2 | |||
| 0ff8402c83 | |||
| 76484e09ac | |||
| 8c2e7c1fdc | |||
| d62fedcabb | |||
| 4d89bba8c0 | |||
| 8da0c53523 | |||
| 96e09a1b37 | |||
| 786090f742 | |||
| 5b478e3d63 | |||
| 3ecce40b87 | |||
| cc29fc85d8 | |||
| 497302c400 | |||
| f4e4bfd639 | |||
| 781b13c604 | |||
| 31ae8271e7 | |||
| 303162f8a5 | |||
| 6ca1afe641 | |||
| a6731174f3 | |||
| 4c509ed67e | |||
| 19343fef62 | |||
| a22a0e5b52 | |||
| b2ea4ce2a3 | |||
| 73c4b68052 | |||
| 58f591e5f6 | |||
| ff9b258229 | |||
| 90659a30b6 | |||
| ef399caa4d | |||
| 7994b377f7 | |||
| 45a0266b20 | |||
| 8b365ae49f | |||
| 958afd6115 | |||
| 4f1dacabfa | |||
| 0c11880326 | |||
| b0d940945f | |||
| 6f9f7c767c | |||
| dd5f2d0476 | |||
| 84c60cd6b6 | |||
| 7000755e15 | |||
| b3899f559c | |||
| 03906a89cd | |||
| 51e747119c | |||
| 5353e5fa66 | |||
| 57ce0bd29d | |||
| c5d66914fa | |||
| 50a63adf5e | |||
| 71393da390 | |||
| 825622fd99 | |||
| 415d40f8c5 | |||
| bde3d98d0f | |||
| d37796a58f | |||
| 4fcea57df0 | |||
| 1d98a9959c | |||
| 3ecd33aded | |||
| 5615e47d99 | |||
| 04a97ac154 | |||
| 598938c13c | |||
| d97c44ef99 | |||
| e706620f12 | |||
| bd518365ea | |||
| 73effdf644 | |||
| c8971de833 | |||
| b26a979378 | |||
| 3836bf19d6 | |||
| f2f2448fe2 | |||
| 969a9d8782 | |||
| 6f64b0a236 | |||
| 4d04c76cd7 | |||
| 7a448b35d4 | |||
| 594b16374b | |||
| 39275c0110 | |||
| 4ad81c363c | |||
| 10b56142d5 | |||
| 5ee54c9c2a | |||
| 0b75c52a6e | |||
| 375105997f | |||
| 4e9179f309 | |||
| 863e925b30 | |||
| 8cb05d50c9 | |||
| 5d34e3f081 | |||
| d8fd4bfcf1 | |||
| ffa3b53065 | |||
| af00960ad1 | |||
| 863c52c7bb | |||
| ef32a6bce9 | |||
| a7b6923b74 | |||
| a8f5034012 | |||
| f21d64c000 | |||
| 7707375cf5 | |||
| 4950ccf4ec | |||
| f592a3abd7 | |||
| d9dbd739ab | |||
| 31cd19af09 | |||
| b514bd8934 | |||
| 444dc1ae6e | |||
| 0ca097db8f | |||
| a7acc8d9d2 | |||
| 37611ab0dd | |||
| f971a148c8 | |||
| 4e7f7e8605 | |||
| fb021baf52 | |||
| b131013b3f | |||
| 62141fa121 | |||
| 74313d54c2 | |||
| 1ca6c97364 | |||
| be10c57153 | |||
| 66b64d1b3f | |||
| 5143f7f304 | |||
| 9b7ff131c5 | |||
| 83eb0da902 | |||
| 7b0334ff6d | |||
| f13088262e | |||
| a74c851295 | |||
| cf2145cc32 | |||
| 7328667337 | |||
| 6414a0fafd | |||
| 6480f9f0b5 | |||
| 80d888f886 | |||
| 2166c71c1f | |||
| 1ec33afe3f | |||
| f894a4546e | |||
| a5eb4dd499 | |||
| 788b381508 | |||
| e24b0e2114 | |||
| 8979b9dce1 | |||
| e7040d3b26 | |||
| 114d77b9d8 | |||
| cf59084dde | |||
| 4d816978ec | |||
| 0b9ac4bd87 | |||
| df71049533 | |||
| 68e521d198 | |||
| a86d24cfd1 | |||
| 0bc8b9259e | |||
| 8a4be45804 | |||
| 8a77306de7 | |||
| 5b85fa763a | |||
| d7218dd5be | |||
| 28732a29cd | |||
| 3dc1958525 | |||
| 4bb2ffa399 |
+3
-2
@@ -1,7 +1,8 @@
|
||||
# Ignore files and directories starting with a dot
|
||||
<!-- # Ignore files and directories starting with a dot
|
||||
|
||||
# Ignore specific files
|
||||
.dockerignore
|
||||
.git
|
||||
|
||||
# Ignore build artifacts
|
||||
_output/
|
||||
@@ -28,4 +29,4 @@ assets/
|
||||
components/
|
||||
|
||||
# Ignore tools and scripts
|
||||
.github/
|
||||
.github/ -->
|
||||
|
||||
@@ -1,5 +1,265 @@
|
||||
# ======================================
|
||||
# ========= Basic Configuration ========
|
||||
# ======================================
|
||||
|
||||
# The user for authentication or system operations.
|
||||
# Default: USER=root
|
||||
USER=root
|
||||
|
||||
# Password associated with the specified user for authentication.
|
||||
# Default: PASSWORD=openIM123
|
||||
PASSWORD=openIM123
|
||||
MINIO_ENDPOINT=http://116.30.3.80:10005
|
||||
API_URL=http://116.30.3.80:10002/object/
|
||||
|
||||
# Endpoint for the MinIO object storage service.
|
||||
# Default: MINIO_ENDPOINT=http://172.28.0.1:10005
|
||||
MINIO_ENDPOINT=http://172.28.0.1:10005
|
||||
|
||||
# Base URL for the application programming interface (API).
|
||||
# Default: API_URL=http://172.28.0.1:10002
|
||||
API_URL=http://172.28.0.1:10002
|
||||
|
||||
# Directory path for storing data files or related information.
|
||||
# Default: DATA_DIR=./
|
||||
DATA_DIR=./
|
||||
|
||||
# ======================================
|
||||
# ========= Network Configuration ======
|
||||
# ======================================
|
||||
|
||||
# Subnet for the Docker network.
|
||||
# Default: DOCKER_BRIDGE_SUBNET=172.28.0.0/16
|
||||
DOCKER_BRIDGE_SUBNET=172.28.0.0/16
|
||||
|
||||
# Gateway for the Docker network.
|
||||
# Default: DOCKER_BRIDGE_GATEWAY=172.28.0.1
|
||||
DOCKER_BRIDGE_GATEWAY=172.28.0.1
|
||||
|
||||
# Address or hostname for the MySQL network.
|
||||
# Default: MYSQL_NETWORK_ADDRESS=172.28.0.2
|
||||
MYSQL_NETWORK_ADDRESS=172.28.0.2
|
||||
|
||||
# Address or hostname for the MongoDB network.
|
||||
# Default: MONGO_NETWORK_ADDRESS=172.28.0.3
|
||||
MONGO_NETWORK_ADDRESS=172.28.0.3
|
||||
|
||||
# Address or hostname for the Redis network.
|
||||
# Default: REDIS_NETWORK_ADDRESS=172.28.0.4
|
||||
REDIS_NETWORK_ADDRESS=172.28.0.4
|
||||
|
||||
# Address or hostname for the Kafka network.
|
||||
# Default: KAFKA_NETWORK_ADDRESS=172.28.0.5
|
||||
KAFKA_NETWORK_ADDRESS=172.28.0.5
|
||||
|
||||
# Address or hostname for the ZooKeeper network.
|
||||
# Default: ZOOKEEPER_NETWORK_ADDRESS=172.28.0.6
|
||||
ZOOKEEPER_NETWORK_ADDRESS=172.28.0.6
|
||||
|
||||
# Address or hostname for the MinIO network.
|
||||
# Default: MINIO_NETWORK_ADDRESS=172.28.0.7
|
||||
MINIO_NETWORK_ADDRESS=172.28.0.7
|
||||
|
||||
# Address or hostname for the OpenIM web network.
|
||||
# Default: OPENIM_WEB_NETWORK_ADDRESS=172.28.0.8
|
||||
OPENIM_WEB_NETWORK_ADDRESS=172.28.0.8
|
||||
|
||||
# Address or hostname for the OpenIM server network.
|
||||
# Default: OPENIM_SERVER_NETWORK_ADDRESS=172.28.0.9
|
||||
OPENIM_SERVER_NETWORK_ADDRESS=172.28.0.9
|
||||
|
||||
# Address or hostname for the OpenIM chat network.
|
||||
# Default: OPENIM_CHAT_NETWORK_ADDRESS=172.28.0.10
|
||||
OPENIM_CHAT_NETWORK_ADDRESS=172.28.0.10
|
||||
|
||||
# Address or hostname for the Prometheus network.
|
||||
# Default: PROMETHEUS_NETWORK_ADDRESS=172.28.0.11
|
||||
PROMETHEUS_NETWORK_ADDRESS=172.28.0.11
|
||||
|
||||
# Address or hostname for the Grafana network.
|
||||
# Default: GRAFANA_NETWORK_ADDRESS=172.28.0.12
|
||||
GRAFANA_NETWORK_ADDRESS=172.28.0.12
|
||||
|
||||
|
||||
# ===============================================
|
||||
# = Component Extension Configuration =
|
||||
# ===============================================
|
||||
|
||||
# ============ Component Extension Configuration ==========
|
||||
# ----- ZooKeeper Configuration -----
|
||||
# Address or hostname for the ZooKeeper service.
|
||||
# Default: ZOOKEEPER_ADDRESS=172.28.0.1
|
||||
ZOOKEEPER_ADDRESS=172.28.0.6
|
||||
|
||||
# Port for ZooKeeper service.
|
||||
# Default: ZOOKEEPER_PORT=12181
|
||||
ZOOKEEPER_PORT=12181
|
||||
|
||||
# ----- MySQL Configuration -----
|
||||
|
||||
# Address or hostname for the MySQL service.
|
||||
# Default: MYSQL_ADDRESS=172.28.0.1
|
||||
MYSQL_ADDRESS=172.28.0.2
|
||||
|
||||
# Port on which MySQL database service is running.
|
||||
# Default: MYSQL_PORT=13306
|
||||
MYSQL_PORT=13306
|
||||
|
||||
# Password to authenticate with the MySQL database service.
|
||||
# Default: MYSQL_PASSWORD=openIM123
|
||||
MYSQL_PASSWORD=openIM123
|
||||
|
||||
# ----- MongoDB Configuration -----
|
||||
# Address or hostname for the MongoDB service.
|
||||
# Default: MONGO_ADDRESS=172.28.0.1
|
||||
MONGO_ADDRESS=172.28.0.3
|
||||
|
||||
# Port on which MongoDB service is running.
|
||||
# Default: MONGO_PORT=37017
|
||||
MONGO_PORT=37017
|
||||
|
||||
# Username to authenticate with the MongoDB service.
|
||||
# Default: MONGO_USERNAME=root
|
||||
MONGO_USERNAME=root
|
||||
|
||||
# Password to authenticate with the MongoDB service.
|
||||
# Default: MONGO_PASSWORD=openIM123
|
||||
MONGO_PASSWORD=openIM123
|
||||
|
||||
# Name of the database in MongoDB to be used.
|
||||
# Default: MONGO_DATABASE=openIM_v3
|
||||
MONGO_DATABASE=openIM_v3
|
||||
|
||||
# ----- Redis Configuration -----
|
||||
# Address or hostname for the Redis service.
|
||||
# Default: REDIS_ADDRESS=172.28.0.1
|
||||
REDIS_ADDRESS=172.28.0.4
|
||||
|
||||
# Port on which Redis in-memory data structure store is running.
|
||||
# Default: REDIS_PORT=16379
|
||||
REDIS_PORT=16379
|
||||
|
||||
# Password to authenticate with the Redis service.
|
||||
# Default: REDIS_PASSWORD=openIM123
|
||||
REDIS_PASSWORD=openIM123
|
||||
|
||||
# ----- Kafka Configuration -----
|
||||
# Address or hostname for the Kafka service.
|
||||
# Default: KAFKA_ADDRESS=172.28.0.1
|
||||
KAFKA_ADDRESS=172.28.0.5
|
||||
|
||||
# Port on which Kafka distributed streaming platform is running.
|
||||
# Default: KAFKA_PORT=19092
|
||||
KAFKA_PORT=19094
|
||||
|
||||
# Topic in Kafka for storing the latest messages in Redis.
|
||||
# Default: KAFKA_LATESTMSG_REDIS_TOPIC=latestMsgToRedis
|
||||
KAFKA_LATESTMSG_REDIS_TOPIC=latestMsgToRedis
|
||||
|
||||
# Topic in Kafka for pushing messages (e.g. notifications or updates).
|
||||
# Default: KAFKA_MSG_PUSH_TOPIC=msgToPush
|
||||
KAFKA_MSG_PUSH_TOPIC=msgToPush
|
||||
|
||||
# Topic in Kafka for storing offline messages in MongoDB.
|
||||
# Default: KAFKA_OFFLINEMSG_MONGO_TOPIC=offlineMsgToMongoMysql
|
||||
KAFKA_OFFLINEMSG_MONGO_TOPIC=offlineMsgToMongoMysql
|
||||
|
||||
# ----- MinIO Configuration ----
|
||||
# Address or hostname for the MinIO object storage service.
|
||||
# Default: MINIO_ADDRESS=172.28.0.1
|
||||
MINIO_ADDRESS=172.28.0.7
|
||||
|
||||
# Port on which MinIO object storage service is running.
|
||||
# Default: MINIO_PORT=10005
|
||||
MINIO_PORT=10005
|
||||
|
||||
# Access key to authenticate with the MinIO service.
|
||||
# Default: MINIO_ACCESS_KEY=root
|
||||
MINIO_ACCESS_KEY=root
|
||||
|
||||
# Secret key corresponding to the access key for MinIO authentication.
|
||||
# Default: MINIO_SECRET_KEY=openIM123
|
||||
MINIO_SECRET_KEY=openIM123
|
||||
|
||||
# ----- Prometheus Configuration -----
|
||||
# Address or hostname for the Prometheus service.
|
||||
# Default: PROMETHEUS_ADDRESS=172.28.0.1
|
||||
PROMETHEUS_ADDRESS=172.28.0.11
|
||||
|
||||
# Port on which Prometheus service is running.
|
||||
# Default: PROMETHEUS_PORT=19090
|
||||
PROMETHEUS_PORT=19090
|
||||
|
||||
# ----- Grafana Configuration -----
|
||||
# Address or hostname for the Grafana service.
|
||||
# Default: GRAFANA_ADDRESS=172.28.0.1
|
||||
GRAFANA_ADDRESS=172.28.0.12
|
||||
|
||||
# Port on which Grafana service is running.
|
||||
# Default: GRAFANA_PORT=3000
|
||||
GRAFANA_PORT=3000
|
||||
|
||||
# ======================================
|
||||
# ============ OpenIM Web ===============
|
||||
# ======================================
|
||||
|
||||
# Path to the OpenIM web distribution.
|
||||
# Default: OPENIM_WEB_DIST_PATH=/app/dist
|
||||
OPENIM_WEB_DIST_PATH=/app/dist
|
||||
|
||||
# Port on which OpenIM web service is running.
|
||||
# Default: OPENIM_WEB_PORT=11001
|
||||
OPENIM_WEB_PORT=11001
|
||||
|
||||
# Address or hostname for the OpenIM web service.
|
||||
# Default: OPENIM_WEB_ADDRESS=172.28.0.1
|
||||
OPENIM_WEB_ADDRESS=172.28.0.8
|
||||
|
||||
|
||||
# ======================================
|
||||
# ========= OpenIM Server ==============
|
||||
# ======================================
|
||||
|
||||
# Address or hostname for the OpenIM server.
|
||||
# Default: OPENIM_SERVER_ADDRESS=172.28.0.1
|
||||
OPENIM_SERVER_ADDRESS=172.28.0.9
|
||||
|
||||
# Port for the OpenIM WebSockets.
|
||||
# Default: OPENIM_WS_PORT=10001
|
||||
OPENIM_WS_PORT=10001
|
||||
|
||||
# Port for the OpenIM API.
|
||||
# Default: API_OPENIM_PORT=10002
|
||||
API_OPENIM_PORT=10002
|
||||
|
||||
|
||||
# ======================================
|
||||
# ========== OpenIM Chat ===============
|
||||
# ======================================
|
||||
|
||||
# Branch name for OpenIM chat.
|
||||
# Default: CHAT_BRANCH=main
|
||||
CHAT_BRANCH=main
|
||||
|
||||
# Address or hostname for the OpenIM chat service.
|
||||
# Default: OPENIM_CHAT_ADDRESS=172.28.0.1
|
||||
OPENIM_CHAT_ADDRESS=172.28.0.10
|
||||
|
||||
# Port for the OpenIM chat API.
|
||||
# Default: OPENIM_CHAT_API_PORT=10008
|
||||
OPENIM_CHAT_API_PORT=10008
|
||||
|
||||
# Directory path for storing data files or related information for OpenIM chat.
|
||||
# Default: OPENIM_CHAT_DATA_DIR=./openim-chat/main
|
||||
OPENIM_CHAT_DATA_DIR=./openim-chat/main
|
||||
|
||||
|
||||
# ======================================
|
||||
# ========== OpenIM Admin ==============
|
||||
# ======================================
|
||||
|
||||
# Branch name for OpenIM server.
|
||||
# Default: SERVER_BRANCH=main
|
||||
SERVER_BRANCH=main
|
||||
|
||||
# Port for the OpenIM admin API.
|
||||
# Default: OPENIM_ADMIN_API_PORT=10009
|
||||
OPENIM_ADMIN_API_PORT=10009
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "gomod"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "08:00"
|
||||
labels:
|
||||
- "dependencies"
|
||||
commit-message:
|
||||
prefix: "feat"
|
||||
include: "scope"
|
||||
groups:
|
||||
gomod-deps:
|
||||
patterns:
|
||||
- "*"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "08:00"
|
||||
labels:
|
||||
- "dependencies"
|
||||
commit-message:
|
||||
prefix: "chore"
|
||||
include: "scope"
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "08:00"
|
||||
labels:
|
||||
- "dependencies"
|
||||
commit-message:
|
||||
prefix: "feat"
|
||||
include: "scope"
|
||||
@@ -0,0 +1,51 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name-template: 'v$RESOLVED_VERSION 🌈'
|
||||
tag-template: 'v$RESOLVED_VERSION'
|
||||
categories:
|
||||
- title: '🚀 Features'
|
||||
labels:
|
||||
- 'feature'
|
||||
- 'enhancement'
|
||||
- title: '🐛 Bug Fixes'
|
||||
labels:
|
||||
- 'kind/fix'
|
||||
- 'kind/feature'
|
||||
- 'enhancement'
|
||||
- 'kind/documentation'
|
||||
- 'good first issue'
|
||||
- title: '🧰 Maintenance'
|
||||
label: 'chore'
|
||||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
||||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
|
||||
version-resolver:
|
||||
major:
|
||||
labels:
|
||||
- 'major'
|
||||
minor:
|
||||
labels:
|
||||
- 'minor'
|
||||
patch:
|
||||
labels:
|
||||
- 'patch'
|
||||
default: patch
|
||||
template: |
|
||||
## Changes $PREVIOUS_TAG
|
||||
|
||||
$CHANGES
|
||||
|
||||
## Contributors to this $REPOSITORY release
|
||||
|
||||
$CONTRIBUTORS
|
||||
@@ -0,0 +1,30 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
OpenIMSDK/openim-docker:
|
||||
- source: ./config
|
||||
dest: ./openim-server/release/config
|
||||
replace: true
|
||||
- source: ./docs
|
||||
dest: ./openim-server/release/docs
|
||||
replace: true
|
||||
- source: ./scripts
|
||||
dest: ./openim-server/release/scripts
|
||||
replace: true
|
||||
- source: ./scripts
|
||||
dest: ./scripts
|
||||
replace: false
|
||||
- source: ./Makefile
|
||||
dest: ./Makefile
|
||||
replace: false
|
||||
+19
-2
@@ -75,6 +75,23 @@ OpenIMSDK/OpenKF:
|
||||
dest: .github/.codecov.yml
|
||||
replace: false
|
||||
|
||||
OpenIMSDK/openim-docker:
|
||||
- source: ./config
|
||||
dest: ./openim-server/main/config
|
||||
replace: true
|
||||
- source: ./docs
|
||||
dest: ./openim-server/main/docs
|
||||
replace: true
|
||||
- source: ./scripts
|
||||
dest: ./openim-server/main/scripts
|
||||
replace: true
|
||||
- source: ./scripts
|
||||
dest: ./scripts
|
||||
replace: true
|
||||
- source: ./Makefile
|
||||
dest: ./Makefile
|
||||
replace: true
|
||||
|
||||
group:
|
||||
# first group:common to all warehouses
|
||||
# TODO: add the required warehouse here
|
||||
@@ -86,7 +103,7 @@ group:
|
||||
OpenIMSDK/community
|
||||
OpenIMSDK/openim-charts
|
||||
OpenIMSDK/openim-sdk-cpp@main
|
||||
files:
|
||||
files:
|
||||
- source: LICENSE
|
||||
dest: LICENSE
|
||||
replace: false
|
||||
@@ -116,4 +133,4 @@ group:
|
||||
replace: false
|
||||
- source: ./scripts/githooks/
|
||||
dest: ./scripts/githooks/
|
||||
replace: true
|
||||
replace: true
|
||||
|
||||
@@ -18,30 +18,22 @@ on:
|
||||
pull_request:
|
||||
# types:
|
||||
# - closed
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
create-pr:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.base.ref == 'main'
|
||||
# && github.event.pull_request.merged == true
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup GitHub CLI
|
||||
run: |
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
|
||||
sudo apt-add-repository https://cli.github.com/packages
|
||||
sudo apt-get update
|
||||
sudo apt-get install gh
|
||||
continue-on-error: true
|
||||
|
||||
# - name: Configure GitHub CLI
|
||||
# run: |
|
||||
# git config --global user.email "3293172751ysy@gmail.com"
|
||||
# git config --global user.name "kubbot"
|
||||
# echo "${{ secrets.BOT_GITHUB_TOKEN }}" | gh auth login --with-token
|
||||
- name: Create PR to release branch
|
||||
run: |
|
||||
ISSUEID=$(gh pr view ${{ github.event.pull_request.number }} --repo $OWNER/$REPO | grep -oP 'Fixes #\K\d+')
|
||||
@@ -56,10 +48,9 @@ jobs:
|
||||
|
||||
gh pr edit ${{ github.event.pull_request.number }} --repo $OWNER/$REPO --add-label "$LABELS" --add-assignee "$ASSIGNEES" --milestone "$MILESTONE"
|
||||
|
||||
git checkout -b bot/merge-to-release-$ISSUEID
|
||||
git push origin bot/merge-to-release-$ISSUEID
|
||||
gh pr create --base release --head bot/merge-to-release-$ISSUEID --title "Merge main to release" --body ""
|
||||
|
||||
# git checkout -b bot/merge-to-release-$ISSUEID
|
||||
# git push origin bot/merge-to-release-$ISSUEID
|
||||
# gh pr create --base release --head bot/merge-to-release-$ISSUEID --title "Merge main to release" --body ""
|
||||
# gh pr create --base main --head feat/auto-release-pr-624 --title "The bug is fixed" --body "$x" --repo OpenIMSDK/Open-IM-Server --reviewer "cubxxw"
|
||||
continue-on-error: true
|
||||
env:
|
||||
@@ -67,4 +58,4 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
ISSUE: ${{ github.event.issue.html_url }}
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
|
||||
@@ -27,18 +27,18 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: Invite user to join our group
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
uses: peter-evans/create-or-update-comment@v3
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
We value close connections with our users, developers, and contributors here at Open-IM-Server. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
|
||||
|
||||
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.
|
||||
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.
|
||||
|
||||
In addition to Slack, we also offer the following ways to get in touch:
|
||||
|
||||
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg" target="_blank"><img src="https://img.shields.io/badge/Slack-OpenIM%2B-blueviolet?logo=slack&logoColor=white"></a> We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) team channel.
|
||||
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q" target="_blank"><img src="https://img.shields.io/badge/Slack-OpenIM%2B-blueviolet?logo=slack&logoColor=white"></a> We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) team channel.
|
||||
+ <a href="https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=winxu81@gmail.com" target="_blank"><img src="https://img.shields.io/badge/gmail-%40OOpenIMSDKCore?style=social&logo=gmail"></a> Get in touch with us on [Gmail](https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=winxu81@gmail.com). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email.
|
||||
+ <a href="https://doc.rentsoft.cn/" target="_blank"><img src="https://img.shields.io/badge/%E5%8D%9A%E5%AE%A2-%40OpenIMSDKCore-blue?style=social&logo=Octopus%20Deploy"></a> Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information.
|
||||
+ <a href="https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg" target="_blank"><img src="https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1-OpenIMSDKCore-brightgreen?logo=wechat&style=flat-square"></a> Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible.
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Create Tag
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
create_tag:
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.event.comment.body, '/create tag')
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Validate version number and get comment
|
||||
id: validate
|
||||
run: |
|
||||
COMMENT="${{ github.event.comment.body }}"
|
||||
VERSION=$(echo $COMMENT | cut -d ' ' -f 3)
|
||||
TAG_COMMENT=$(echo $COMMENT | cut -d '"' -f 2)
|
||||
if [[ $VERSION =~ ^v([0-9]+\.){2}[0-9]+$ ]]; then
|
||||
echo "version=$VERSION" >> $GITHUB_STATE
|
||||
echo "tag_comment=$TAG_COMMENT" >> $GITHUB_STATE
|
||||
else
|
||||
echo "Invalid version number."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Create a new tag
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
run: |
|
||||
source $GITHUB_STATE
|
||||
git tag -a $VERSION -m "$tag_comment"
|
||||
git push origin $VERSION
|
||||
echo "tag_created=$VERSION" >> $GITHUB_OUTPUT
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Comment cherry-pick command
|
||||
uses: actions/github-script@v5
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const pr = context.payload.pull_request;
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the latest code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
|
||||
|
||||
@@ -12,38 +12,126 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: OpenIM Build Docker Images
|
||||
name: Publish Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: "1.20"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
bin:
|
||||
- openim-server
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Docker Buildx
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to GitHub Container Registry
|
||||
|
||||
# docker.io/openim/openim-server:latest
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: openim/openim-server
|
||||
# generate Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=sha
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
# linux/ppc64le,linux/s390x
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
build-aliyun:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
# registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:latest
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta2
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server
|
||||
|
||||
- name: Log in to AliYun Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: registry.cn-hangzhou.aliyuncs.com
|
||||
username: ${{ secrets.ALIREGISTRY_USERNAME }}
|
||||
password: ${{ secrets.ALIREGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
# linux/ppc64le,linux/s390x
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta2.outputs.tags }}
|
||||
labels: ${{ steps.meta2.outputs.labels }}
|
||||
|
||||
build-ghcr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
# ghcr.io/openimsdk/openim-server:latest
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta3
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-server
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Docker metadata
|
||||
id: metadata
|
||||
uses: docker/metadata-action@v4
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository_owner }}/openim-${{ matrix.bin }}
|
||||
- name: Build and release Docker images
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/386,linux/amd64,linux/arm64/v8
|
||||
target: ${{ matrix.bin }}
|
||||
tags: ${{ steps.metadata.outputs.tags }}
|
||||
push: true
|
||||
context: .
|
||||
# linux/ppc64le,linux/s390x
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta3.outputs.tags }}
|
||||
labels: ${{ steps.meta3.outputs.labels }}
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v4
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
name: "Code Scanning - Action"
|
||||
name: "OpenIM Code Scanning - Action"
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -42,8 +42,8 @@ jobs:
|
||||
security-events: write
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
actions: write
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -53,8 +53,8 @@ jobs:
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
# languages: go, javascript, csharp, python, cpp, java, ruby
|
||||
with:
|
||||
languages: go
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below).
|
||||
@@ -68,9 +68,9 @@ jobs:
|
||||
# three lines and modify them (or add more) to build your code if your
|
||||
# project uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
# - run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
@@ -1,3 +1,17 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Create Branch on Tag
|
||||
|
||||
on:
|
||||
|
||||
@@ -12,48 +12,44 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: deploy for dev
|
||||
name: OpenIM Deploy for dev
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'devops' # Only for the dev branch
|
||||
paths:
|
||||
- '.github/workflows/*'
|
||||
# - '__test__/**' # dev No immediate testing is required
|
||||
- 'src/**'
|
||||
- 'Dockerfile'
|
||||
- 'docker-compose.yml'
|
||||
- 'bin/*'
|
||||
push:
|
||||
branches:
|
||||
- 'devops' # Only for the dev branch
|
||||
- 'main'
|
||||
paths:
|
||||
- '.github/workflows/*'
|
||||
# - '__test__/**' # dev No immediate testing is required
|
||||
- 'src/**'
|
||||
- 'Dockerfile'
|
||||
- 'docker-compose.yml'
|
||||
- 'bin/*'
|
||||
|
||||
jobs:
|
||||
deploy-dev:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: set ssh key # Temporarily set up ssh key
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
# secrets.WFP_ID_RSA set in GitHub
|
||||
echo "${{secrets.WFP_ID_RSA}}" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan "182.92.xxx.xxx" >> ~/.ssh/known_hosts
|
||||
- name: deploy # Deployment
|
||||
run: |
|
||||
ssh work@182.92.xxx.xxx "
|
||||
# 【Attention】Log in with the 'work' account, manually create /home/work/imooc-lego directory
|
||||
# Then git clone https://username:password@github.com/imooc-lego/biz-editor-server.git -b dev (private repository, use GitHub username and password)
|
||||
# Remember to delete origin to avoid exposing GitHub password
|
||||
|
||||
cd /home/work/imooc-lego/biz-editor-server;
|
||||
git remote add origin https://openimbot:${{secrets.WFP_PASSWORD}}@github.com/OpenIMSDK/open-im-server.git;
|
||||
git checkout dev;
|
||||
git pull origin dev; # Download the latest code again
|
||||
git remote remove origin; # Remove origin to avoid exposing GitHub password
|
||||
# Start docker
|
||||
docker-compose build editor-server; # Same as the service name in docker-compose.yml
|
||||
docker-compose up -d;
|
||||
"
|
||||
- name: delete ssh key # Delete ssh key
|
||||
run: rm -rf ~/.ssh/id_rsa
|
||||
deploy-dev:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: executing remote ssh commands using password
|
||||
uses: appleboy/ssh-action@v1.0.0
|
||||
env:
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
with:
|
||||
host: "${{ secrets.SG_M1_HOST }}, ${{ secrets.SG_N1_HOST }}, ${{ secrets.SG_N2_HOST}}"
|
||||
username: ${{ secrets.SG_USERNAME }}
|
||||
password: ${{ secrets.SG_PASSWORD }}
|
||||
port: ${{ secrets.SG_PORT }}
|
||||
envs: OWNER,REPO
|
||||
script_stop: true
|
||||
script: |
|
||||
mkdir -p /test/openim
|
||||
cd /test/openim
|
||||
pwd;ls -al
|
||||
echo "OWNER: $OWNER"
|
||||
echo "REPO: $REPO"
|
||||
git clone -b develop https://github.com/${OWNER}/${REPO}.git; cd ${REPO}
|
||||
docker compose up -d
|
||||
continue-on-error: true
|
||||
@@ -0,0 +1,385 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Docker Buildx Images CI
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
push:
|
||||
branches:
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-ghcr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
install: true
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
################################################
|
||||
# build/
|
||||
# └── docker
|
||||
# ├── openim-api
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-cmdutils
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-crontask
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-msggateway
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-msgtransfer
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-push
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-auth
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-conversation
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-friend
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-group
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-msg
|
||||
# │ └── Dockerfile
|
||||
# ├── openim-rpc-third
|
||||
# │ └── Dockerfile
|
||||
# └── openim-rpc-user
|
||||
# └── Dockerfile
|
||||
#############################################
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-api
|
||||
id: meta1
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-api
|
||||
|
||||
- name: Build and push Docker image for openim-api
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-api/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta1.outputs.tags }}
|
||||
labels: ${{ steps.meta1.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-cmdutils
|
||||
id: meta2
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-cmdutils
|
||||
|
||||
- name: Build and push Docker image for openim-cmdutils
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-cmdutils/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta2.outputs.tags }}
|
||||
labels: ${{ steps.meta2.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-crontask
|
||||
id: meta3
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-crontask
|
||||
|
||||
- name: Build and push Docker image for openim-crontask
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-crontask/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta3.outputs.tags }}
|
||||
labels: ${{ steps.meta3.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-msggateway
|
||||
id: meta4
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-msggateway
|
||||
|
||||
- name: Build and push Docker image for openim-msggateway
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-msggateway/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta4.outputs.tags }}
|
||||
labels: ${{ steps.meta4.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-msgtransfer
|
||||
id: meta5
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-msgtransfer
|
||||
|
||||
- name: Build and push Docker image for openim-msgtransfer
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-msgtransfer/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta5.outputs.tags }}
|
||||
labels: ${{ steps.meta5.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-push
|
||||
id: meta6
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-push
|
||||
|
||||
- name: Build and push Docker image for openim-push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-push/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta6.outputs.tags }}
|
||||
labels: ${{ steps.meta6.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-auth
|
||||
id: meta7
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-auth
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-auth
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-auth/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta7.outputs.tags }}
|
||||
labels: ${{ steps.meta7.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-conversation
|
||||
id: meta8
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-conversation
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-conversation
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-conversation/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta8.outputs.tags }}
|
||||
labels: ${{ steps.meta8.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-friend
|
||||
id: meta9
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-friend
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-friend
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-friend/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta9.outputs.tags }}
|
||||
labels: ${{ steps.meta9.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-group
|
||||
id: meta10
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-group
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-group
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-group/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta10.outputs.tags }}
|
||||
labels: ${{ steps.meta10.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-msg
|
||||
id: meta11
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-msg
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-msg
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-msg/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta11.outputs.tags }}
|
||||
labels: ${{ steps.meta11.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-third
|
||||
id: meta12
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-third
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-third
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-third/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta12.outputs.tags }}
|
||||
labels: ${{ steps.meta12.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-rpc-user
|
||||
id: meta13
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-rpc-user
|
||||
|
||||
- name: Build and push Docker image for openim-rpc-user
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-rpc-user/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta13.outputs.tags }}
|
||||
labels: ${{ steps.meta13.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
build-tools-ghcr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
install: true
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-web
|
||||
id: meta1
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/openim-web
|
||||
|
||||
- name: Build and push Docker image for openim-web
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-tools/openim-web/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta1.outputs.tags }}
|
||||
labels: ${{ steps.meta1.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker openim-web
|
||||
id: meta2
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: ghcr.io/openimsdk/component
|
||||
|
||||
- name: Build and push Docker image for component
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/images/openim-tools/component/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta2.outputs.tags }}
|
||||
labels: ${{ steps.meta2.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
@@ -12,5 +12,33 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# name: OpenIM e2e Test
|
||||
name: e2e
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
# run e2e test every 4 hours
|
||||
- cron: 0 */4 * * *
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GO111MODULE: on
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.21
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.21
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Create e2e test
|
||||
run: |
|
||||
echo "...test e2e"
|
||||
@@ -18,7 +18,6 @@ on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
@@ -27,25 +26,25 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.20'
|
||||
go-version: '1.21'
|
||||
cache: false
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
uses: golangci/golangci-lint-action@v3.7.0
|
||||
with:
|
||||
# Require: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
||||
version: v1.53
|
||||
version: v1.54
|
||||
|
||||
# Optional: working directory, useful for monorepos
|
||||
working-directory: server
|
||||
# working-directory: server
|
||||
|
||||
# Optional: golangci-lint command line arguments.
|
||||
#
|
||||
# Note: by default the `.golangci.yml` file should be at the root of the repository.
|
||||
# The location of the configuration file can be changed by using `--config=`
|
||||
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
|
||||
# args: --timeout=30m --config=/scripts/.golangci.yml --issues-exit-code=0
|
||||
|
||||
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
||||
# only-new-issues: true
|
||||
only-new-issues: true
|
||||
|
||||
# Optional:The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
|
||||
install-mode: "goinstall"
|
||||
# install-mode: "goinstall"
|
||||
@@ -0,0 +1,49 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: first-interaction
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
check_for_first_interaction:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/first-interaction@v1.1.1
|
||||
with:
|
||||
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
pr-message: |
|
||||
Hello! Thank you for your contribution.
|
||||
|
||||
If you are fixing a bug, please reference the issue number in the description.
|
||||
|
||||
If you are implementing a feature request, please check with the maintainers that the feature will be accepted first.
|
||||
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
|
||||
|
||||
Please leave your information in the [✨ discussions](https://github.com/orgs/OpenIMSDK/discussions/426), we expect anyone to join OpenIM developer community.
|
||||
|
||||
issue-message: |
|
||||
Hello! Thank you for filing an issue.
|
||||
|
||||
If this is a bug report, please include relevant logs to help us debug the problem.
|
||||
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
|
||||
continue-on-error: true
|
||||
@@ -31,5 +31,5 @@ jobs:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
body: |
|
||||
This issue is available for anyone to work on. **Make sure to reference this issue in your pull request.** :sparkles: Thank you for your contribution! :sparkles:
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) to connect and communicate with our developers.
|
||||
If you wish to accept this assignment, please leave a comment in the comments section: `/accept`.🎯
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
|
||||
If you wish to accept this assignment, please leave a comment in the comments section: `/accept`.🎯
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Build Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "**.go"
|
||||
- "!**_test.go"
|
||||
- "build/**"
|
||||
tags:
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
release:
|
||||
strategy:
|
||||
matrix:
|
||||
components: [core, swagger]
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 20
|
||||
- uses: dorny/paths-filter@v2
|
||||
if: ${{ !startsWith(github.ref_name, 'v') }}
|
||||
id: changes
|
||||
with:
|
||||
filters: |
|
||||
go:
|
||||
- '**.go'
|
||||
- 'build/core/Dockerfile'
|
||||
api:
|
||||
- 'openapi/**'
|
||||
- 'build/swagger/build.sh'
|
||||
- 'build/swagger/Dockerfile'
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
flavor: |
|
||||
latest=false
|
||||
images: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/openimsdk-${{ matrix.components }}
|
||||
registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALIREGISTRY_NAMESPACE }}/openimsdk-${{ matrix.components }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=sha,prefix={{branch}}-,enable=${{ github.ref_type == 'branch' }}
|
||||
type=ref,event=tag
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to Ali Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: registry.cn-hangzhou.aliyuncs.com
|
||||
username: ${{ secrets.ALIREGISTRY_USERNAME }}
|
||||
password: ${{ secrets.ALIREGISTRY_TOKEN }}
|
||||
|
||||
- name: Condition
|
||||
id: condition
|
||||
run: |
|
||||
echo "run=${{ startsWith(github.ref_name, 'v') || ((steps.changes.outputs.go == 'true' && (matrix.components == 'core' || matrix.components == 'job')) || (steps.changes.outputs.api == 'true' && matrix.components == 'swagger')) }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up QEMU
|
||||
if: ${{ steps.condition.outputs.run == 'true' }}
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
if: ${{ steps.condition.outputs.run == 'true' }}
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Build and push
|
||||
if: ${{ steps.condition.outputs.run == 'true' }}
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: ./build/${{ matrix.components }}/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
|
||||
- name: Link Checker
|
||||
id: lychee
|
||||
uses: lycheeverse/lychee-action@v1.7.0
|
||||
uses: lycheeverse/lychee-action@v1.8.0
|
||||
with:
|
||||
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
|
||||
# Actions Link address -> https://github.com/lycheeverse/lychee-action
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# shamelessly copied from https://github.com/sigstore/cosign/blob/main/.github/workflows/milestone.yaml
|
||||
|
||||
name: milestone
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed]
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
milestone:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
actions: none
|
||||
checks: none
|
||||
contents: read
|
||||
deployments: none
|
||||
issues: write
|
||||
packages: none
|
||||
pull-requests: write
|
||||
repository-projects: none
|
||||
security-events: none
|
||||
statuses: none
|
||||
|
||||
steps:
|
||||
- uses: actions/github-script@v6 # v6
|
||||
with:
|
||||
script: |
|
||||
if (!context.payload.pull_request.merged) {
|
||||
console.log('PR was not merged, skipping.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!!context.payload.pull_request.milestone) {
|
||||
console.log('PR has existing milestone, skipping.');
|
||||
return;
|
||||
}
|
||||
|
||||
milestones = await github.rest.issues.listMilestones({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'open',
|
||||
sort: 'due_on',
|
||||
direction: 'asc'
|
||||
})
|
||||
if (milestones.data.length === 0) {
|
||||
console.log('There are no milestones, skipping.');
|
||||
return;
|
||||
}
|
||||
|
||||
await github.rest.issues.update({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.payload.pull_request.number,
|
||||
milestone: milestones.data[0].number
|
||||
});
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
permissions: write-all
|
||||
steps:
|
||||
- name: Setup Node.js Environment
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
+99
-103
@@ -36,124 +36,99 @@ env:
|
||||
GO_VERSION: "1.19"
|
||||
GOLANGCI_VERSION: "v1.50.1"
|
||||
|
||||
|
||||
jobs:
|
||||
openim:
|
||||
name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
|
||||
contents: write
|
||||
environment:
|
||||
name: openim
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go_version: ["1.18","1.19","1.20"]
|
||||
go_version: ["1.18","1.19","1.20","1.21"]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go_version }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
id: go
|
||||
- name: Setup
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go_version }}
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 2.x
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 2.x
|
||||
- name: Module Operations
|
||||
run: |
|
||||
sudo make tidy
|
||||
sudo make tools.verify.go-gitlint
|
||||
|
||||
- name: Run go modules tidy
|
||||
run: |
|
||||
sudo make tidy
|
||||
sudo make tools.verify.go-gitlint
|
||||
echo "Run go modules tidy successfully"
|
||||
- name: Format Code
|
||||
run: sudo make format
|
||||
continue-on-error: true
|
||||
|
||||
- name: Run go format
|
||||
run: |
|
||||
sudo make format
|
||||
echo "Run go format successfully"
|
||||
continue-on-error: true
|
||||
- name: Generate Files
|
||||
run: make gen
|
||||
continue-on-error: true
|
||||
|
||||
- name: Generate all necessary files, such as error code files
|
||||
run: |
|
||||
make generate
|
||||
echo "Generate all necessary files successfully"
|
||||
continue-on-error: true
|
||||
- name: Build Source
|
||||
run: sudo make build
|
||||
|
||||
- name: Run unit test and get test coverage
|
||||
run: |
|
||||
make cover
|
||||
echo "Run unit test and get test coverage successfully"
|
||||
continue-on-error: true
|
||||
- name: Cleanup Build
|
||||
run: sudo make clean
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: go
|
||||
- name: Push Changes to Main
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "cicd: robot automated Change"
|
||||
branch: main
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build source code for host platform
|
||||
run: |
|
||||
sudo make build
|
||||
echo "Build source code for host platform successfully"
|
||||
- name: Set Current Directory
|
||||
id: set_directory
|
||||
run: echo "::set-output name=directory::$(pwd)"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
- name: OpenIM verify copyright
|
||||
run: |
|
||||
sudo make verify-copyright
|
||||
sudo make add-copyright
|
||||
echo "OpenIM verify successfully"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Clean all build
|
||||
run: |
|
||||
sudo make clean
|
||||
echo "Clean all build successfully"
|
||||
|
||||
- name: push OpenIM
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "cicd: robot automated Change"
|
||||
# commit_options: '--no-verify --signoff'
|
||||
branch: main
|
||||
# create_branch: true
|
||||
# # Optional commit user and author settings
|
||||
# commit_user_name: kubbot # defaults to "github-actions[bot]"
|
||||
# commit_user_email: 3293172751ysy@gmail.com # defaults to "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
# commit_author: Kubbot # defaults to author of the commit that triggered the run
|
||||
continue-on-error: true
|
||||
|
||||
- name: Set Current Directory
|
||||
id: set_directory
|
||||
run: |
|
||||
echo "::set-output name=directory::$(pwd)"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Collect Test Coverage File
|
||||
id: collect_coverage
|
||||
run: |
|
||||
cd ${{ steps.set_directory.outputs.directory }}
|
||||
make cover
|
||||
echo "::set-output name=coverage_file::./_output/tmp/coverage.out"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Display Test Coverage
|
||||
run: |
|
||||
echo "Test Coverage:"
|
||||
cat ${{ steps.collect_coverage.outputs.coverage_file }}
|
||||
continue-on-error: true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
continue-on-error: true
|
||||
- name: Collect and Display Test Coverage
|
||||
id: collect_coverage
|
||||
run: |
|
||||
cd ${{ steps.set_directory.outputs.directory }}
|
||||
make cover
|
||||
echo "::set-output name=coverage_file::./_output/tmp/coverage.out"
|
||||
echo "Test Coverage:"
|
||||
cat ${{ steps.collect_coverage.outputs.coverage_file }}
|
||||
continue-on-error: true
|
||||
|
||||
openim-start:
|
||||
name: Teat OpenIM make install start on ${{ matrix.os }}
|
||||
name: Test OpenIM install/start on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
environment:
|
||||
name: openim
|
||||
strategy:
|
||||
matrix:
|
||||
go_version: ["1.21"]
|
||||
os: ["ubuntu-latest"]
|
||||
steps:
|
||||
- name: Checkout and Install OpenIM
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 2.x
|
||||
- name: Run OpenIM make install start
|
||||
run: |
|
||||
sudo make install
|
||||
|
||||
execute-scripts:
|
||||
name: Execute OpenIM script on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
environment:
|
||||
name: openim
|
||||
@@ -162,15 +137,36 @@ jobs:
|
||||
go_version: ["1.20"]
|
||||
os: ["ubuntu-latest"]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go_version }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
id: go
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Go ${{ matrix.go_version }}
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
id: go
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 2.x
|
||||
- name: Docker Operations
|
||||
run: |
|
||||
curl -o docker-compose.yaml https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml
|
||||
sudo docker compose up -d
|
||||
sudo sleep 60
|
||||
|
||||
- name: Run OpenIM make install start
|
||||
run: |
|
||||
sudo make install
|
||||
- name: Module Operations
|
||||
run: |
|
||||
sudo make tidy
|
||||
sudo make tools.verify.go-gitlint
|
||||
|
||||
- name: Build, Start and Check Services
|
||||
run: |
|
||||
sudo make init
|
||||
sudo make build
|
||||
sudo make start
|
||||
sudo make check
|
||||
|
||||
- name: Print OpenIM Logs
|
||||
run: sudo cat ./_output/logs/* 2>/dev/null
|
||||
continue-on-error: true
|
||||
|
||||
@@ -31,6 +31,6 @@ jobs:
|
||||
steps:
|
||||
- uses: alex-page/github-project-automation-plus@v0.8.3
|
||||
with:
|
||||
project: OpenIM-V3.1
|
||||
project: openim-powerful
|
||||
column: In Progress
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
@@ -20,33 +20,103 @@ on:
|
||||
- 'README.md'
|
||||
- 'CONTRIBUTING.md'
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'CONTRIBUTING.md'
|
||||
- 'docs/**'
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get League branch Patch
|
||||
run: |
|
||||
git config user.name 'openimbot'
|
||||
git config user.email 'openimsdk@qq.com'
|
||||
git checkout -b cicd/patch-${{ github.event.number }}
|
||||
- uses: actions/setup-node@v3
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
- name: Run go modules tidy
|
||||
run: |
|
||||
sudo make tidy
|
||||
sudo make tools.verify.go-gitlint
|
||||
echo "Run go modules tidy successfully"
|
||||
|
||||
- name: Run go format
|
||||
run: |
|
||||
sudo make format
|
||||
echo "Run go format successfully"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Run go lint
|
||||
run: |
|
||||
sudo make lint
|
||||
echo "Run go lint successfully"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Generate all necessary files, such as error code files
|
||||
run: |
|
||||
make generate
|
||||
echo "Generate all necessary files successfully"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Run unit test and get test coverage
|
||||
run: |
|
||||
make cover
|
||||
echo "Run unit test and get test coverage successfully"
|
||||
continue-on-error: true
|
||||
|
||||
# - name: Initialize CodeQL
|
||||
# uses: github/codeql-action/init@v2
|
||||
# with:
|
||||
# languages: go
|
||||
|
||||
# - name: Perform CodeQL Analysis
|
||||
# uses: github/codeql-action/analyze@v2
|
||||
|
||||
- name: OpenIM verify copyright
|
||||
run: |
|
||||
sudo make verify-copyright
|
||||
sudo make add-copyright
|
||||
echo "OpenIM verify successfully"
|
||||
continue-on-error: true
|
||||
|
||||
# - name: Commit code
|
||||
# run: |
|
||||
# git add .
|
||||
# git commit -m "cicd: bump League Patch to cicd/patch-${{ github.event.number }}"
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
commit-message: 'build: update distribution'
|
||||
title: 'build: update distribution'
|
||||
commit-message: "cicd: bump League Patch to cicd/patch-${{ github.event.number }}"
|
||||
title: Bump League Patch to cicd/patch-${{ github.event.number }}
|
||||
author: kubbot <kubbot@3293172751ysy@gmail.com>
|
||||
signoff: false
|
||||
draft: false
|
||||
branch: "cicd/patch-${{ github.event.number }}"
|
||||
assignees: cubxxw
|
||||
reviewers: cubxxw
|
||||
delete-branch: true
|
||||
body: |
|
||||
- Updates the distribution for changes on `main`
|
||||
Review criteria:
|
||||
|
||||
Auto-generated by [create-pull-request][1]
|
||||
|
||||
[1]: https://github.com/OpenIMSDK/Open-IM-Sever
|
||||
branch: 'bot/update-distribution'
|
||||
- [ ] Disenchanter can connect and issue actions
|
||||
|
||||
This is an automated PR. @ ${{ github.actor }}
|
||||
<sub>[workflow](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/.github/workflows/pull-request.yml).</sub>
|
||||
base: main
|
||||
labels: |
|
||||
kind/documentation
|
||||
enhancement
|
||||
report
|
||||
@@ -0,0 +1,55 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Release Drafter
|
||||
|
||||
on:
|
||||
push:
|
||||
# branches to consider in the event; optional, defaults to all
|
||||
branches:
|
||||
- main
|
||||
# pull_request event is required only for autolabeler
|
||||
pull_request:
|
||||
# Only following types are handled by the action, but one can default to all as well
|
||||
# types: [opened, reopened, synchronize]
|
||||
# pull_request_target event is required for autolabeler to support PRs from forks
|
||||
# pull_request_target:
|
||||
# types: [opened, reopened, synchronize]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
permissions:
|
||||
# write permission is required to create a github release
|
||||
contents: write
|
||||
# write permission is required for autolabeler
|
||||
# otherwise, read permission is required at least
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# (Optional) GitHub Enterprise requires GHE_HOST variable set
|
||||
#- name: Set GHE_HOST
|
||||
# run: |
|
||||
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
|
||||
|
||||
# Drafts your next Release notes as Pull Requests are merged into "master"
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
|
||||
# with:
|
||||
# config-name: my-config.yml
|
||||
# disable-autolabeler: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
|
||||
@@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: OpenIM Server Release
|
||||
name: OpenIM Server Release Workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -43,9 +43,12 @@ jobs:
|
||||
# either 'goreleaser' (default) or 'goreleaser-pro':
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --clean
|
||||
workdir: .
|
||||
args: release -f ./build/goreleaser.yaml --rm-dist --clean --release-footer-tmpl=scripts/template/footer.md.tmpl --release-header-tmpl=scripts/template/head.md.tmpl
|
||||
env:
|
||||
USERNAME: ${{ github.repository_owner }}
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
|
||||
# distribution:
|
||||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
@@ -60,7 +63,7 @@ jobs:
|
||||
matrix:
|
||||
format: [ deb, rpm, apk ]
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
|
||||
- uses: actions/checkout@v3 # v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: OpenIM Start Execute Scripts
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- "README.md"
|
||||
- "README_zh-CN.md"
|
||||
- "CONTRIBUTING.md"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "README.md"
|
||||
- "README_zh-CN.md"
|
||||
- "CONTRIBUTING.md"
|
||||
- "docs/**"
|
||||
|
||||
jobs:
|
||||
execute-scripts:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Start Docker Compose
|
||||
run: |
|
||||
sudo docker compose stop
|
||||
sudo sleep 30
|
||||
sudo docker compose up -d
|
||||
sudo sleep 60
|
||||
continue-on-error: true
|
||||
|
||||
- name: Stop all services
|
||||
run: |
|
||||
sudo chmod +x ./scripts/stop_all.sh
|
||||
sudo ./scripts/stop_all.sh
|
||||
sudo cat logs/openIM.log 2>/dev/null
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build all services
|
||||
run: |
|
||||
sudo chmod +x ./scripts/build_all_service.sh
|
||||
sudo ./scripts/build_all_service.sh
|
||||
sudo cat logs/openIM.log 2>/dev/null
|
||||
shell: bash
|
||||
|
||||
- name: Start all services
|
||||
run: |
|
||||
sudo chmod +x ./scripts/start_all.sh
|
||||
sudo ./scripts/start_all.sh
|
||||
sudo cat logs/openIM.log 2>/dev/null
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
|
||||
- name: Check all services
|
||||
run: |
|
||||
sudo chmod +x ./scripts/check_all.sh
|
||||
sudo ./scripts/check_all.sh
|
||||
sudo cat logs/openIM.log 2>/dev/null
|
||||
shell: bash
|
||||
|
||||
- name: Print openIM.log
|
||||
run: |
|
||||
sudo cat logs/* 2>/dev/null
|
||||
sudo cat logs/* 2>/dev/null >> "$GITHUB_OUTPUT"
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
@@ -0,0 +1,76 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: OpenIM executes the script validation code
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- "README.md"
|
||||
- "README_zh-CN.md"
|
||||
- "CONTRIBUTING.md"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "README.md"
|
||||
- "README_zh-CN.md"
|
||||
- "CONTRIBUTING.md"
|
||||
- "docs/**"
|
||||
|
||||
env:
|
||||
GO_VERSION: "1.19"
|
||||
GOLANGCI_VERSION: "v1.50.1"
|
||||
|
||||
jobs:
|
||||
openim:
|
||||
name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: write
|
||||
environment:
|
||||
name: openim
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go_version: ["1.21"]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- name: Setup
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: In ${{ matrix.os }} Execute the script validation code
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
id: go
|
||||
|
||||
- name: scripts validation
|
||||
run: |
|
||||
sudo make verify
|
||||
continue-on-error: true
|
||||
|
||||
- name: verify format
|
||||
run: |
|
||||
sudo make format
|
||||
continue-on-error: true
|
||||
|
||||
- name: verify license
|
||||
run: |
|
||||
sudo make verify-copyright
|
||||
continue-on-error: true
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v5
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
days-before-stale: 60
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# Copyright © 2023 KubeCub open source community. All rights reserved.
|
||||
# Licensed under the MIT License (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
# https://github.com/BetaHuhn/repo-file-sync-action
|
||||
name: Synchronize kubecub public code to other repositories
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- scripts/*
|
||||
- docs/*
|
||||
- config/*
|
||||
branches:
|
||||
- release-v*.*
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Run GitHub File Sync
|
||||
uses: BetaHuhn/repo-file-sync-action@latest
|
||||
with:
|
||||
GH_INSTALLATION_TOKEN: "${{ secrets.BOT_GITHUB_TOKEN }}"
|
||||
CONFIG_PATH: .github/sync-release.yml
|
||||
ORIGINAL_MESSAGE: true
|
||||
SKIP_PR: true
|
||||
COMMIT_EACH_FILE: false
|
||||
COMMIT_BODY: "🤖 kubbot to synchronize the warehouse"
|
||||
GIT_EMAIL: "3293172751ysy@gmail.com"
|
||||
GIT_USERNAME: "kubbot"
|
||||
PR_BODY: 👌 kubecub provides automated community services
|
||||
REVIEWERS: |
|
||||
kubbot
|
||||
cubxxw
|
||||
PR_LABELS: |
|
||||
file-sync
|
||||
automerge
|
||||
ASSIGNEES: |
|
||||
kubbot
|
||||
+11
-2
@@ -30,6 +30,12 @@ bin/
|
||||
output/
|
||||
_output/
|
||||
|
||||
### OpenIM Config ###
|
||||
config/config.yaml
|
||||
./config/config.yaml
|
||||
.env
|
||||
./.env
|
||||
|
||||
### OpenIM deploy ###
|
||||
deploy/openim_demo
|
||||
deploy/openim-api
|
||||
@@ -153,10 +159,11 @@ flycheck_*.el
|
||||
*.out
|
||||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
vendor/
|
||||
|
||||
# Go workspace file
|
||||
go.work
|
||||
# go.work
|
||||
go.work.sum
|
||||
|
||||
### JetBrains ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
@@ -392,3 +399,5 @@ Sessionx.vim
|
||||
# End of https://www.toptal.com/developers/gitignore/api/go,git,vim,tags,test,emacs,backup,jetbrains
|
||||
.idea
|
||||
dist/
|
||||
.env
|
||||
config/config.yaml
|
||||
|
||||
+5
-24
@@ -58,7 +58,6 @@ run:
|
||||
skip-files:
|
||||
- ".*\\.my\\.go$"
|
||||
- _test.go
|
||||
- ".*\\.pb\\.go"
|
||||
|
||||
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
|
||||
# If invoked with -mod=readonly, the go command is disallowed from the implicit
|
||||
@@ -114,7 +113,7 @@ linters-settings:
|
||||
max-blank-identifiers: 2
|
||||
dupl:
|
||||
# tokens count to trigger issue, 150 by default
|
||||
threshold: 100
|
||||
threshold: 200
|
||||
errcheck:
|
||||
# report about not checking of errors in type assertions: `a := b.(MyStruct)`;
|
||||
# default is false: such cases aren't reported by default.
|
||||
@@ -177,7 +176,7 @@ linters-settings:
|
||||
# put imports beginning with prefix after 3rd-party packages;
|
||||
# only support one prefix
|
||||
# if not set, use goimports.local-prefixes
|
||||
prefix: github.com/OpenIMSDK/OpenKF
|
||||
prefix: github.com/OpenIMSDK/Open-IM-Server
|
||||
gocognit:
|
||||
# minimal code complexity to report, 30 by default (but we recommend 10-20)
|
||||
min-complexity: 30
|
||||
@@ -334,10 +333,8 @@ linters-settings:
|
||||
goimports:
|
||||
# put imports beginning with prefix after 3rd-party packages;
|
||||
# it's a comma-separated list of prefixes
|
||||
local-prefixes: github.com/OpenIMSDK/OpenKF
|
||||
golint:
|
||||
# minimal confidence for issues, default is 0.8
|
||||
min-confidence: 0.9
|
||||
local-prefixes: github.com/OpenIMSDK/Open-IM-Server
|
||||
|
||||
gomnd:
|
||||
settings:
|
||||
mnd:
|
||||
@@ -443,12 +440,7 @@ linters-settings:
|
||||
# packages-with-error-message:
|
||||
# # specify an error message to output when a blacklisted package is used
|
||||
# - github.com/Sirupsen/logrus: "logging is allowed only by logutils.Log"
|
||||
ifshort:
|
||||
# Maximum length of variable declaration measured in number of lines, after which linter won't suggest using short syntax.
|
||||
# Has higher priority than max-decl-chars.
|
||||
max-decl-lines: 1
|
||||
# Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax.
|
||||
max-decl-chars: 30
|
||||
|
||||
|
||||
importas:
|
||||
# if set to `true`, force to use alias.
|
||||
@@ -723,7 +715,6 @@ linters:
|
||||
- asciicheck
|
||||
- bodyclose
|
||||
- cyclop
|
||||
- deadcode
|
||||
# - depguard
|
||||
- dogsled
|
||||
- dupl
|
||||
@@ -751,7 +742,6 @@ linters:
|
||||
- gosec
|
||||
- gosimple
|
||||
- govet
|
||||
- ifshort
|
||||
- importas
|
||||
- ineffassign
|
||||
- lll
|
||||
@@ -771,19 +761,16 @@ linters:
|
||||
- rowserrcheck
|
||||
- sqlclosecheck
|
||||
- staticcheck
|
||||
- structcheck
|
||||
- stylecheck
|
||||
- thelper
|
||||
- tparallel
|
||||
- unconvert
|
||||
- unparam
|
||||
- unused
|
||||
- varcheck
|
||||
- wastedassign
|
||||
- whitespace
|
||||
- bidichk
|
||||
- wastedassign
|
||||
- golint
|
||||
- execinquery
|
||||
- nosprintfhostport
|
||||
- grouper
|
||||
@@ -814,10 +801,6 @@ issues:
|
||||
|
||||
# Excluding configuration per-path, per-linter, per-text and per-source
|
||||
exclude-rules:
|
||||
- linters:
|
||||
- golint
|
||||
path: (internal/api/.*)\.go # exclude golint for internal/api/... files
|
||||
|
||||
- linters:
|
||||
- revive
|
||||
path: (log/.*)\.go
|
||||
@@ -857,9 +840,7 @@ issues:
|
||||
|
||||
- path: (pkg/app/.*)\.go
|
||||
linters:
|
||||
- deadcode
|
||||
- unused
|
||||
- varcheck
|
||||
- forbidigo
|
||||
|
||||
# Exclude some staticcheck messages
|
||||
|
||||
+16
-50
@@ -1,53 +1,22 @@
|
||||
# Version logging for OpenIM:v2.0
|
||||
|
||||
> **Note**:
|
||||
> Deprecated version logging for OpenIM, please refer to [CHANGELOG.md](../CHANGELOG.md)
|
||||
# Version logging for OpenIM
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
- [Version logging for OpenIM:v2.0](#version-logging-for-openimv20)
|
||||
- [\[Unreleased\]](#unreleased)
|
||||
- [\[v2.0.10\] - 2022-05-13](#v2010---2022-05-13)
|
||||
- [\[v2.0.9\] - 2022-04-29](#v209---2022-04-29)
|
||||
- [Reverts](#reverts)
|
||||
- [Pull Requests](#pull-requests)
|
||||
- [\[v2.0.8\] - 2022-04-24](#v208---2022-04-24)
|
||||
- [Pull Requests](#pull-requests-1)
|
||||
- [\[v2.0.7\] - 2022-04-08](#v207---2022-04-08)
|
||||
- [Pull Requests](#pull-requests-2)
|
||||
- [\[v2.0.6\] - 2022-04-01](#v206---2022-04-01)
|
||||
- [Pull Requests](#pull-requests-3)
|
||||
- [\[v2.0.5\] - 2022-03-24](#v205---2022-03-24)
|
||||
- [\[v2.04\] - 2022-03-18](#v204---2022-03-18)
|
||||
- [\[v2.0.3\] - 2022-03-11](#v203---2022-03-11)
|
||||
- [\[v2.0.2\] - 2022-03-04](#v202---2022-03-04)
|
||||
- [Pull Requests](#pull-requests-4)
|
||||
- [\[v2.0.1\] - 2022-02-25](#v201---2022-02-25)
|
||||
- [v2.0.0 - 2022-02-23](#v200---2022-02-23)
|
||||
- [Reverts](#reverts-1)
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
|
||||
<a name="unreleased"></a>
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v2.0.10"></a>
|
||||
|
||||
## [v2.0.10] - 2022-05-13
|
||||
|
||||
<a name="v2.0.9"></a>
|
||||
|
||||
## [v2.0.9] - 2022-04-29
|
||||
|
||||
### Reverts
|
||||
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
@@ -57,53 +26,38 @@
|
||||
|
||||
|
||||
<a name="v2.0.8"></a>
|
||||
|
||||
## [v2.0.8] - 2022-04-24
|
||||
|
||||
### Pull Requests
|
||||
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.7"></a>
|
||||
|
||||
## [v2.0.7] - 2022-04-08
|
||||
|
||||
### Pull Requests
|
||||
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.6"></a>
|
||||
|
||||
## [v2.0.6] - 2022-04-01
|
||||
|
||||
### Pull Requests
|
||||
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
<a name="v2.0.5"></a>
|
||||
|
||||
## [v2.0.5] - 2022-03-24
|
||||
|
||||
<a name="v2.04"></a>
|
||||
|
||||
## [v2.04] - 2022-03-18
|
||||
|
||||
<a name="v2.0.3"></a>
|
||||
|
||||
## [v2.0.3] - 2022-03-11
|
||||
|
||||
<a name="v2.0.2"></a>
|
||||
|
||||
## [v2.0.2] - 2022-03-04
|
||||
|
||||
### Pull Requests
|
||||
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
- Merge branch 'tuoyun'
|
||||
@@ -111,11 +65,23 @@
|
||||
|
||||
|
||||
<a name="v2.0.1"></a>
|
||||
|
||||
## [v2.0.1] - 2022-02-25
|
||||
|
||||
<a name="v2.0.0"></a>
|
||||
|
||||
## v2.0.0 - 2022-02-23
|
||||
|
||||
### Reverts
|
||||
- friend modify
|
||||
- update
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.10...HEAD
|
||||
[v2.0.10]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.9...v2.0.10
|
||||
[v2.0.9]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.8...v2.0.9
|
||||
[v2.0.8]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.7...v2.0.8
|
||||
[v2.0.7]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.6...v2.0.7
|
||||
[v2.0.6]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.5...v2.0.6
|
||||
[v2.0.5]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.04...v2.0.5
|
||||
[v2.04]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.3...v2.04
|
||||
[v2.0.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.2...v2.0.3
|
||||
[v2.0.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.1...v2.0.2
|
||||
[v2.0.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.0...v2.0.1
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# Version logging for OpenIM
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
- [Version logging for OpenIM](#version-logging-for-openim)
|
||||
- [Unreleased](#unreleased)
|
||||
- [v3.1.2-beta.3 - 2023-08-09](#v312-beta3---2023-08-09)
|
||||
- [v3.1.2-beta.2 - 2023-08-09](#v312-beta2---2023-08-09)
|
||||
- [v3.1.2-beta.1 - 2023-08-09](#v312-beta1---2023-08-09)
|
||||
- [v3.1.2-beta.0 - 2023-08-08](#v312-beta0---2023-08-08)
|
||||
- [v3.1.2.beta.0 - 2023-08-08](#v312beta0---2023-08-08)
|
||||
- [v3.1.1-beta.4 - 2023-08-07](#v311-beta4---2023-08-07)
|
||||
- [v3.1.1-beta.3 - 2023-08-05](#v311-beta3---2023-08-05)
|
||||
- [v3.1.1-beta.2 - 2023-08-04](#v311-beta2---2023-08-04)
|
||||
- [v3.1.1-beta.1 - 2023-08-04](#v311-beta1---2023-08-04)
|
||||
- [v3.1.1-alpha.3 - 2023-08-03](#v311-alpha3---2023-08-03)
|
||||
- [v3.1.1-alpha.2 - 2023-08-03](#v311-alpha2---2023-08-03)
|
||||
- [v3.1.1-alpha.1 - 2023-08-02](#v311-alpha1---2023-08-02)
|
||||
- [v3.1.0 - 2023-07-28](#v310---2023-07-28)
|
||||
- [Reverts](#reverts)
|
||||
- [Pull Requests](#pull-requests)
|
||||
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v3.1.2-beta.3"></a>
|
||||
## [v3.1.2-beta.3] - 2023-08-09
|
||||
|
||||
<a name="v3.1.2-beta.2"></a>
|
||||
## [v3.1.2-beta.2] - 2023-08-09
|
||||
|
||||
<a name="v3.1.2-beta.1"></a>
|
||||
## [v3.1.2-beta.1] - 2023-08-09
|
||||
|
||||
<a name="v3.1.2-beta.0"></a>
|
||||
## [v3.1.2-beta.0] - 2023-08-08
|
||||
|
||||
<a name="v3.1.2.beta.0"></a>
|
||||
## [v3.1.2.beta.0] - 2023-08-08
|
||||
|
||||
<a name="v3.1.1-beta.4"></a>
|
||||
## [v3.1.1-beta.4] - 2023-08-07
|
||||
|
||||
<a name="v3.1.1-beta.3"></a>
|
||||
## [v3.1.1-beta.3] - 2023-08-05
|
||||
|
||||
<a name="v3.1.1-beta.2"></a>
|
||||
## [v3.1.1-beta.2] - 2023-08-04
|
||||
|
||||
<a name="v3.1.1-beta.1"></a>
|
||||
## [v3.1.1-beta.1] - 2023-08-04
|
||||
|
||||
<a name="v3.1.1-alpha.3"></a>
|
||||
## [v3.1.1-alpha.3] - 2023-08-03
|
||||
|
||||
<a name="v3.1.1-alpha.2"></a>
|
||||
## [v3.1.1-alpha.2] - 2023-08-03
|
||||
|
||||
<a name="v3.1.1-alpha.1"></a>
|
||||
## [v3.1.1-alpha.1] - 2023-08-02
|
||||
|
||||
<a name="v3.1.0"></a>
|
||||
## v3.1.0 - 2023-07-28
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.2-beta.3...HEAD
|
||||
[v3.1.2-beta.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.2-beta.2...v3.1.2-beta.3
|
||||
[v3.1.2-beta.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.2-beta.1...v3.1.2-beta.2
|
||||
[v3.1.2-beta.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.2-beta.0...v3.1.2-beta.1
|
||||
[v3.1.2-beta.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.2.beta.0...v3.1.2-beta.0
|
||||
[v3.1.2.beta.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-beta.4...v3.1.2.beta.0
|
||||
[v3.1.1-beta.4]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-beta.3...v3.1.1-beta.4
|
||||
[v3.1.1-beta.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-beta.2...v3.1.1-beta.3
|
||||
[v3.1.1-beta.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-beta.1...v3.1.1-beta.2
|
||||
[v3.1.1-beta.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-alpha.3...v3.1.1-beta.1
|
||||
[v3.1.1-alpha.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-alpha.2...v3.1.1-alpha.3
|
||||
[v3.1.1-alpha.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.1-alpha.1...v3.1.1-alpha.2
|
||||
[v3.1.1-alpha.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.1.0...v3.1.1-alpha.1
|
||||
@@ -0,0 +1,44 @@
|
||||
# Version logging for OpenIM
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v3.2.2-beta.3"></a>
|
||||
## [v3.2.2-beta.3] - 2023-08-22
|
||||
|
||||
<a name="v3.2.2-beta.2"></a>
|
||||
## [v3.2.2-beta.2] - 2023-08-21
|
||||
|
||||
<a name="v3.2.2-beta.1"></a>
|
||||
## [v3.2.2-beta.1] - 2023-08-19
|
||||
|
||||
<a name="v3.2.0"></a>
|
||||
## [v3.2.0] - 2023-08-18
|
||||
|
||||
<a name="v3.2.0-rc.0"></a>
|
||||
## [v3.2.0-rc.0] - 2023-08-17
|
||||
|
||||
<a name="v3.2.2-beta.0"></a>
|
||||
## [v3.2.2-beta.0] - 2023-08-17
|
||||
|
||||
<a name="v3.2.0-alpha.0"></a>
|
||||
## v3.2.0-alpha.0 - 2023-08-16
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.2-beta.3...HEAD
|
||||
[v3.2.2-beta.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.2-beta.2...v3.2.2-beta.3
|
||||
[v3.2.2-beta.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.2-beta.1...v3.2.2-beta.2
|
||||
[v3.2.2-beta.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.0...v3.2.2-beta.1
|
||||
[v3.2.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.0-rc.0...v3.2.0
|
||||
[v3.2.0-rc.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.2-beta.0...v3.2.0-rc.0
|
||||
[v3.2.2-beta.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v3.2.0-alpha.0...v3.2.2-beta.0
|
||||
@@ -3,6 +3,8 @@
|
||||
- [Changelog](#changelog)
|
||||
- [OpenIM versioning policy](#openim-versioning-policy)
|
||||
- [command](#command)
|
||||
- [install](#install)
|
||||
- [User](#user)
|
||||
- [create next tag](#create-next-tag)
|
||||
- [Release version logs](#release-version-logs)
|
||||
- [Introduction](#introduction)
|
||||
@@ -22,10 +24,68 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
## command
|
||||
|
||||
To use git-chglog you need to configure:
|
||||
|
||||
1. CHANGELOG templates
|
||||
2. git-chglog configuration
|
||||
|
||||
### install
|
||||
|
||||
```bash
|
||||
$ go get github.com/git-chglog/git-chglog/cmd/git-chglog
|
||||
```
|
||||
|
||||
|
||||
## User
|
||||
|
||||
```bash
|
||||
$ git-chglog --init
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
- What is the URL of your repository?: https://github.com/OpenIMSDK/Open-IM-Server
|
||||
- What is your favorite style?: github
|
||||
- Choose the format of your favorite commit message: <type>(<scope>): <subject> -- feat(core): Add new feature
|
||||
- What is your favorite template style?: standard
|
||||
- Do you include Merge Commit in CHANGELOG?: n
|
||||
- Do you include Revert Commit in CHANGELOG?: y
|
||||
- In which directory do you output configuration files and templates?: .chglog
|
||||
|
||||
```bash
|
||||
git-chglog --tag-filter-pattern 'v2.0.*' -o CHANGELOG-2.0.md
|
||||
```
|
||||
|
||||
**Other uses:**
|
||||
|
||||
```bash
|
||||
$ git-chglog
|
||||
|
||||
If <tag query> is not specified, it corresponds to all tags.
|
||||
This is the simplest example.
|
||||
|
||||
$ git-chglog 1.0.0..2.0.0
|
||||
|
||||
The above is a command to generate CHANGELOG including commit of 1.0.0 to 2.0.0.
|
||||
|
||||
$ git-chglog 1.0.0
|
||||
|
||||
The above is a command to generate CHANGELOG including commit of only 1.0.0.
|
||||
|
||||
$ git-chglog $(git describe --tags $(git rev-list --tags --max-count=1))
|
||||
|
||||
The above is a command to generate CHANGELOG with the commit included in the latest tag.
|
||||
|
||||
$ git-chglog --output CHANGELOG.md
|
||||
|
||||
The above is a command to output to CHANGELOG.md instead of standard output.
|
||||
|
||||
$ git-chglog --config custom/dir/config.yml
|
||||
|
||||
The above is a command that uses a configuration file placed other than ".chglog/config.yml".
|
||||
```
|
||||
|
||||
|
||||
## create next tag
|
||||
|
||||
```bash
|
||||
@@ -51,6 +111,7 @@ git tag 2.0.0
|
||||
+ [OpenIM CHANGELOG-V2.3](CHANGELOG-2.3.md)
|
||||
+ [OpenIM CHANGELOG-V2.9](CHANGELOG-2.9.md)
|
||||
+ [OpenIM CHANGELOG-V3.0](CHANGELOG-3.0.md)
|
||||
+ [OpenIM CHANGELOG-V3.1](CHANGELOG-3.1.md)
|
||||
|
||||
## Introduction
|
||||
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
3293172751nss@gmail.com.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
||||
+8
-4
@@ -4,6 +4,10 @@ So, you want to hack on Open-IM-Server? Yay!
|
||||
|
||||
First of all, thank you for considering contributing to our project! We appreciate your time and effort, and we value any contribution, whether it's reporting a bug, suggesting a new feature, or submitting a pull request.
|
||||
|
||||

|
||||
|
||||
> Use `make demo` start contributing fast.
|
||||
|
||||
This document provides guidelines and best practices to help you contribute effectively.
|
||||
|
||||
## 📇Topics
|
||||
@@ -68,7 +72,7 @@ For any substantial design, there should be a well-crafted design document. This
|
||||
|
||||
Anybody can access the shared Drive for reading. To get access to comment. Once you've done that, head to the [shared Drive](https://drive.google.com/) and behold all the docs.
|
||||
|
||||
In addition to that, we'd love to invite you to [join our Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) where you can play with your imagination, tell us what you're working on, and get a quick response.
|
||||
In addition to that, we'd love to invite you to [join our Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) where you can play with your imagination, tell us what you're working on, and get a quick response.
|
||||
|
||||
When documenting a new design, we recommend a 2-step approach:
|
||||
|
||||
@@ -77,7 +81,7 @@ When documenting a new design, we recommend a 2-step approach:
|
||||
|
||||
In order to contribute a feature to Open-IM-Server you'll need to go through the following steps:
|
||||
|
||||
+ Discuss your idea with the appropriate [working groups](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) on the working group's Slack channel.
|
||||
+ Discuss your idea with the appropriate [working groups](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) on the working group's Slack channel.
|
||||
+ Once there is general agreement that the feature is useful, create a GitHub issue to track the discussion. The issue should include information about the requirements and use cases that it is trying to address.
|
||||
+ Include a discussion of the proposed design and technical details of the implementation in the issue.
|
||||
|
||||
@@ -360,11 +364,11 @@ Such a commit can get produced as follows:
|
||||
|
||||
We value close connections with our users, developers, and contributors here at Open-IM-Server. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
|
||||
|
||||
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.
|
||||
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.
|
||||
|
||||
In addition to Slack, we also offer the following ways to get in touch:
|
||||
|
||||
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg" target="_blank"><img src="https://img.shields.io/badge/slack-%40OpenIMSDKCore-informational?logo=slack&style=flat-square"></a>: We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) team channel.
|
||||
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q" target="_blank"><img src="https://img.shields.io/badge/slack-%40OpenIMSDKCore-informational?logo=slack&style=flat-square"></a>: We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) team channel.
|
||||
+ <a href="https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=4closetool3@gmail.com" target="_blank"><img src="https://img.shields.io/badge/gmail-%40OOpenIMSDKCore?style=social&logo=gmail"></a>: Get in touch with us on [Gmail](winxu81@gmail.com). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email.
|
||||
+ <a href="https://doc.rentsoft.cn/" target="_blank"><img src="https://img.shields.io/badge/%E5%8D%9A%E5%AE%A2-%40OpenIMSDKCore-blue?style=social&logo=Octopus%20Deploy"></a>: Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information.
|
||||
+ <a href="https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg" target="_blank"><img src="https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1-OpenIMSDKCore-brightgreen?logo=wechat&style=flat-square"></a>: Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible.
|
||||
|
||||
+12
-17
@@ -1,10 +1,6 @@
|
||||
# Build Stage
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
LABEL org.opencontainers.image.source=https://github.com/OpenIMSDK/Open-IM-Server
|
||||
LABEL org.opencontainers.image.description="OpenIM Server image"
|
||||
LABEL org.opencontainers.image.licenses="Apache 2.0"
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
@@ -12,25 +8,24 @@ ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
# Set up the working directory
|
||||
WORKDIR /Open-IM-Server
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
# Copy all files to the container
|
||||
ADD . .
|
||||
|
||||
RUN /bin/sh -c "make build"
|
||||
RUN make clean
|
||||
RUN make build
|
||||
|
||||
# Production Stage
|
||||
FROM alpine
|
||||
FROM ghcr.io/openim-sigs/openim-ubuntu-image:latest
|
||||
|
||||
RUN apk --no-cache add tzdata
|
||||
|
||||
# Set directory to map logs, config files, scripts, and SDK
|
||||
VOLUME ["/Open-IM-Server/logs", "/Open-IM-Server/config", "/Open-IM-Server/scripts", "/Open-IM-Server/db/sdk"]
|
||||
WORKDIR ${SERVER_WORKDIR}
|
||||
|
||||
# Copy scripts and binary files to the production image
|
||||
COPY --from=builder /Open-IM-Server/scripts /Open-IM-Server/scripts
|
||||
COPY --from=builder /Open-IM-Server/_output/bin/platforms/linux/amd64 /Open-IM-Server/_output/bin/platforms/linux/amd64
|
||||
COPY --from=builder ${OPENIM_SERVER_BINDIR} /openim/openim-server/_output/bin
|
||||
COPY --from=builder ${OPENIM_SERVER_CMDDIR} /openim/openim-server/scripts
|
||||
COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
|
||||
|
||||
WORKDIR /Open-IM-Server/scripts
|
||||
|
||||
CMD ["docker_start_all.sh"]
|
||||
CMD ["/openim/openim-server/scripts/docker-start-all.sh"]
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
## all: Run tidy, gen, add-copyright, format, lint, cover, build ✨
|
||||
.PHONY: all
|
||||
all: tidy gen add-copyright format lint cover build
|
||||
all: tidy gen add-copyright verify lint cover restart
|
||||
|
||||
# ==============================================================================
|
||||
# Build set
|
||||
|
||||
ROOT_PACKAGE=github.com/OpenIMSDK/Open-IM-Server
|
||||
# TODO: This is version control for the future
|
||||
# TODO: This is version control for the future https://github.com/OpenIMSDK/Open-IM-Server/issues/574
|
||||
VERSION_PACKAGE=github.com/OpenIMSDK/Open-IM-Server/pkg/version
|
||||
|
||||
# ==============================================================================
|
||||
@@ -53,21 +53,70 @@ export USAGE_OPTIONS
|
||||
# ==============================================================================
|
||||
# Targets
|
||||
|
||||
## init: Initialize openim server project ✨
|
||||
.PHONY: init
|
||||
init:
|
||||
@$(MAKE) gen.init
|
||||
|
||||
## init-githooks: Initialize git hooks ✨
|
||||
.PHONY: init-githooks
|
||||
init-githooks:
|
||||
@$(MAKE) gen.init-githooks
|
||||
|
||||
## gen: Generate all necessary files. ✨
|
||||
.PHONY: gen
|
||||
gen:
|
||||
@$(MAKE) gen.run
|
||||
|
||||
## demo: Run demo get started with Makefiles quickly ✨
|
||||
.PHONY: demo
|
||||
demo:
|
||||
@$(MAKE) go.demo
|
||||
|
||||
## build: Build binaries by default ✨
|
||||
.PHONY: build
|
||||
build:
|
||||
@$(MAKE) go.build
|
||||
|
||||
## start: Start openim ✨
|
||||
.PHONY: start
|
||||
start:
|
||||
@$(MAKE) go.start
|
||||
|
||||
## stop: Stop openim ✨
|
||||
.PHONY: stop
|
||||
stop:
|
||||
@$(MAKE) go.stop
|
||||
|
||||
## restart: Restart openim ✨
|
||||
.PHONY: restart
|
||||
restart: clean stop build init start
|
||||
|
||||
## multiarch: Build binaries for multiple platforms. See option PLATFORMS. ✨
|
||||
.PHONY: multiarch
|
||||
multiarch:
|
||||
@$(MAKE) go.build.multiarch
|
||||
|
||||
## verify: execute all verity scripts. ✨
|
||||
.PHONY: verify
|
||||
verify:
|
||||
@$(MAKE) go.verify
|
||||
|
||||
## install: Install deployment openim ✨
|
||||
.PHONY: install
|
||||
install:
|
||||
@$(MAKE) go.install
|
||||
|
||||
## check: Check OpenIM deployment ✨
|
||||
.PHONY: check
|
||||
check:
|
||||
@$(MAKE) go.check
|
||||
|
||||
## check-component
|
||||
.PHONY: check-component
|
||||
check-component:
|
||||
@$(MAKE) go.check-component
|
||||
|
||||
## tidy: tidy go.mod ✨
|
||||
.PHONY: tidy
|
||||
tidy:
|
||||
@@ -151,11 +200,6 @@ push.multiarch:
|
||||
tools:
|
||||
@$(MAKE) tools.install
|
||||
|
||||
## gen: Generate all necessary files. ✨
|
||||
.PHONY: gen
|
||||
gen:
|
||||
@$(MAKE) gen.run
|
||||
|
||||
## swagger: Generate swagger document. ✨
|
||||
.PHONY: swagger
|
||||
swagger:
|
||||
@@ -176,6 +220,11 @@ verify-copyright:
|
||||
add-copyright:
|
||||
@$(MAKE) copyright.add
|
||||
|
||||
## advertise: Project introduction, become a contributor ✨
|
||||
.PHONY: advertise
|
||||
advertise:
|
||||
@$(MAKE) copyright.advertise
|
||||
|
||||
## release: release the project ✨
|
||||
.PHONY: release
|
||||
release: release.verify release.ensure-tag
|
||||
|
||||
+220
-128
@@ -1,16 +1,19 @@
|
||||
<h1 align="center" style="border-bottom: none">
|
||||
<b>
|
||||
<a href="https://doc.rentsoft.cn/">Open IM Server</a><br>
|
||||
</b>
|
||||
⭐️ Open source Instant Messaging Server ⭐️ <br>
|
||||
</h1>
|
||||
<p align="center">
|
||||
<a href="https://www.openim.online">
|
||||
<img src="./assets/logo-gif/openim-logo.gif" width="60%" height="30%"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<h3 align="center" style="border-bottom: none">
|
||||
⭐️ Open source Instant Messaging Server ⭐️ <br>
|
||||
<h3>
|
||||
|
||||
|
||||
<p align=center>
|
||||
<a href="https://goreportcard.com/report/github.com/OpenIMSDK/Open-IM-Server"><img src="https://goreportcard.com/badge/github.com/OpenIMSDK/Open-IM-Server" alt="A+"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22"><img src="https://img.shields.io/github/issues/OpenIMSDK/Open-IM-Server/good%20first%20issue?logo=%22github%22" alt="good first"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server"><img src="https://img.shields.io/github/stars/OpenIMSDK/Open-IM-Server.svg?style=flat&logo=github&colorB=deeppink&label=stars"></a>
|
||||
<a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg"><img src="https://img.shields.io/badge/Slack-100%2B-blueviolet?logo=slack&logoColor=white"></a>
|
||||
<a href="https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q"><img src="https://img.shields.io/badge/Slack-300%2B-blueviolet?logo=slack&logoColor=white"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-green"></a>
|
||||
<a href="https://golang.org/"><img src="https://img.shields.io/badge/Language-Go-blue.svg"></a>
|
||||
</p>
|
||||
@@ -18,164 +21,220 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="./README.md"><b>English</b></a> •
|
||||
<a href="./README_zh-CN.md"><b>中文</b></a>
|
||||
<a href="./README.md"><b> English </b></a> •
|
||||
<a href="./README-zh_CN.md"><b> 简体中文 </b></a> •
|
||||
<a href="https://www.openim.online/en"><b> Docs </b></a>
|
||||
</p>
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
## Open-IM-Server 是什么
|
||||
## ✨ 关于 OpenIM
|
||||
|
||||
Open-IM-Server 是一款即时通讯服务器,使用纯 Golang 开发,采用 JSON over WebSocket 传输协议。在 Open-IM-Server 中,所有东西都是消息,因此您可以轻松扩展自定义消息,而无需修改服务器代码。使用微服务架构,Open-IM-Server 可以使用集群进行部署。通过在服务器上部署 Open-IM-Server,开发人员可以快速地将即时通讯和实时网络功能集成到自己的应用程序中,并确保业务数据的安全性和隐私性。
|
||||
Open-IM-Server 是使用纯 Golang 精心制作的强大的即时消息服务器。其通过 JSON over WebSocket 进行通信的独特方法将每次交互都视为消息。这简化了定制并消除了修改服务器代码的需求。通过利用微服务架构,服务器可以通过集群部署,保证出色的性能和可伸缩性。
|
||||
|
||||
Open-IM-Server并不是一个独立的产品,本身不包含账号的注册和登录服务。
|
||||
为方便大家测试,我们开源了包括登录注册功能的 [chat 仓库](https://github.com/OpenIMSDK/chat),chat 业务服务端和 Open-IM-Server 一起部署,即可搭建一个聊天产品。
|
||||
Open-IM-Server 不仅仅是一个即时消息服务器;它是将实时网络集成到您的应用程序中的强大工具,定位为您集成的首选选择!🚀
|
||||
|
||||
## 特点
|
||||
请注意,Open-IM-Server 不作为独立产品运行,也不提供内置的帐户注册或登录服务。为了简化您的实施过程,我们已开源了 [chat repository](https://github.com/OpenIMSDK/chat),其中包括这些功能。与 Open-IM-Server 一起部署此聊天业务服务器可加快全面的聊天产品的设置。👥
|
||||
|
||||
+ 开源
|
||||
+ 易于集成
|
||||
+ 良好的可扩展性
|
||||
+ 高性能
|
||||
+ 轻量级
|
||||
+ 支持多种协议
|
||||
为了进一步增强您的体验,我们还提供了 SDK 客户端,在其中实现了大多数复杂逻辑。可以在 [此链接](https://github.com/OpenIMSDK/openim-sdk-core) 找到 [SDK repository](https://github.com/OpenIMSDK/openim-sdk-core)。[chat repository](https://github.com/OpenIMSDK/chat) 是我们的业务服务器,而 'core' 代表 SDK 的高级封装,它们协同工作以提供卓越的结果。✨
|
||||
|
||||
## 社区
|
||||
## :star2: 为什么选择 OpenIM
|
||||
|
||||
+ 访问中文官方网站:[OpenIM中文开发文档](https://doc.rentsoft.cn/)
|
||||
**🔍 功能截图显示**
|
||||
|
||||
## 快速开始
|
||||
<div align="center">
|
||||
|
||||
### 使用 docker-compose 部署
|
||||
| 💻🔄📱 多终端同步 🔄🖥️ | 📅⚡ 高效会议 🚀💼 |
|
||||
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
||||
|  |  |
|
||||
| 📲🔄 **一对一和群聊** 👥🗣️ | 🎁💻 **特殊功能 - 自定义消息** ✉️🎨 |
|
||||
|  |  |
|
||||
|
||||
</div>
|
||||
|
||||
1. **全面的消息类型支持 :speech_balloon:**
|
||||
|
||||
✅ 支持几乎所有类型的消息,包括文本、图片、表情符号、语音、视频、地理位置、文件、报价、名片、系统通知、自定义消息等
|
||||
|
||||
✅ 支持一对一和多人音视频通话
|
||||
|
||||
✅ 为 iOS、Android、Flutter、uni-app、ReactNative、Electron、Web、H5 等多个平台提供终端支持
|
||||
|
||||
2. **随时随地的高效会议 :earth_americas:**
|
||||
|
||||
✅ 基于具有 100% 可靠强制信令功能的 IM (Instant Messaging),为与聊天应用程序深度集成的 IM 系统铺平了道路
|
||||
|
||||
✅ 支持单次会议中的数百人,订阅人数达到数千,以及服务器端音视频录制
|
||||
|
||||
3. **适用于各种社交场景的一对一和群聊 :busts_in_silhouette:**
|
||||
|
||||
✅ OpenIM 有四种角色:应用程序管理员、群主、群管理员和普通成员
|
||||
|
||||
✅ 强大的群特性,如静音、群公告、群验证、无限群成员和根据需要加载群消息
|
||||
|
||||
4. **独特的功能 :star2:**
|
||||
|
||||
✅ 支持读取并烧毁私人聊天,可自定义时长
|
||||
|
||||
✅ 消息编辑功能扩大了社交场景,使即时通讯变得更加多样化和有趣
|
||||
|
||||
5. **开源 :open_hands:**
|
||||
|
||||
✅ OpenIM 的代码是开源的,数据自控,旨在构建一个全球领先的 IM 开源社区,包括客户端 SDK 和服务器
|
||||
|
||||
✅ 基于开源服务器,已经开发了许多出色的开源项目,例如 [OpenKF](https://github.com/OpenIMSDK/OpenKF) (开源 AI 客户服务系统)
|
||||
|
||||
6. **易于扩展 :wrench:**
|
||||
|
||||
✅ OpenIM 服务器是用 Golang 实现的,引入了创新的 "一切都是消息" 通信模型,简化了自定义消息和扩展功能的实现
|
||||
|
||||
7. **高性能 :racing_car:**
|
||||
|
||||
✅ OpenIM 支持集群中的分层治理架构,经过大量用户的测试,并抽象了在线消息、离线消息和历史消息的存储模型
|
||||
|
||||
8. **全平台支持 :tv:**
|
||||
|
||||
✅ 支持原生 iOS、Android;跨平台 Flutter、uni-app、ReactNative;主要的 Web 前端框架如 React、Vue;小程序和 Electron 支持的 PC 平台
|
||||
|
||||
9. **终极部署体验 🤖**
|
||||
|
||||
✅ 支持 [集群部署](https://github.com/OpenIMSDK/Open-IM-Server/edit/main/deployments/README.md)
|
||||
|
||||
✅ 支持多架构镜像,我们的 Docker 镜像不仅托管在 GitHub 上,而且还在阿里云和 Docker Hub 上支持多个架构。请访问 [我们的 GitHub packages](https://github.com/orgs/OpenIMSDK/packages?repo_name=Open-IM-Server) 并阅读我们的 [版本管理文档](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md) 以获取更多信息。
|
||||
|
||||
10. **开源社区的大生态系统 🤲**
|
||||
|
||||
✅ 我们有数万用户和许多解决方案来解决问题。
|
||||
|
||||
✅ 我们有一个大型的开源社区叫 [OpenIMSDK](https://github.com/OpenIMSDK),它运行核心模块,我们还有一个开源社区叫 [openim-sigs](https://github.com/openim-sigs) 以探索更多基于 IM 的基础设施产品。
|
||||
|
||||
## :rocket: 快速开始
|
||||
|
||||
<details> <summary>使用 Docker Compose 部署</summary>
|
||||
|
||||
1. 克隆项目
|
||||
|
||||
```
|
||||
git clone https://github.com/OpenIMSDK/Open-IM-Server
|
||||
cd Open-IM-Server
|
||||
git checkout release-v3.0 #or other release branch
|
||||
bashCopy code# 选择您需要的
|
||||
BRANCH=release-v3.1
|
||||
git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build
|
||||
```
|
||||
|
||||
2. 修改 .env
|
||||
> **注意** 阅读我们的发布策略:https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
||||
|
||||
1. 修改 `.env`
|
||||
|
||||
```
|
||||
此处主要修改相关组件密码
|
||||
USER=root #不用修改
|
||||
PASSWORD=openIM123 #8位以上的数字和字母组合密码,密码对redis mysql mongo生效,以及config/config.yaml中的accessSecret
|
||||
ENDPOINT=http://127.0.0.1:10005 #minio对外服务的ip和端口,或用域名storage.xx.xx,app要能访问到此ip和端口或域名,
|
||||
API_URL=http://127.0.0.1:10002/object/ #app要能访问到此ip和端口或域名,
|
||||
bashCopy codeUSER=root #无需修改
|
||||
PASSWORD=openIM123 #8位或更多数字和字母的组合,此密码适用于redis、mysql、mongo,以及config/config.yaml中的accessSecret
|
||||
ENDPOINT=http://127.0.0.1:10005 #minio的外部服务IP和端口,或使用域名storage.xx.xx,应用程序必须能够访问此IP和端口或域名,
|
||||
API_URL=http://127.0.0.1:10002/object/ #应用程序必须能够访问此IP和端口或域名,
|
||||
DATA_DIR=./ #指定大磁盘目录
|
||||
```
|
||||
|
||||
3. 部署和启动
|
||||
1. 部署并启动
|
||||
|
||||
注意:此命令只能执行一次,它会根据.env 中的 PASSWORD 变量修改 docker-compose 中组件密码,并修改 config/config.yaml 中的组件密码
|
||||
如果.env 中的密码变了,需要先 docker-compose down ; rm components -rf 后再执行此命令。
|
||||
> **注意** 此命令只能执行一次。它会基于 `.env` 中的 `PASSWORD` 变量修改 docker-compose 中的组件密码,并修改 `config/config.yaml` 中的组件密码。如果 `.env` 中的密码发生变化,您需要首先执行 `docker-compose down`;`rm components -rf` 然后执行此命令。
|
||||
|
||||
```
|
||||
chmod +x install_im_server.sh;
|
||||
./install_im_server.sh;
|
||||
bashCopy code
|
||||
make install
|
||||
```
|
||||
|
||||
4. 检查服务
|
||||
1. 检查服务
|
||||
|
||||
```
|
||||
cd scripts;
|
||||
./docker_check_service.sh
|
||||
bashCopy code
|
||||
make check
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 使用源码编译
|
||||
</details> <details> <summary>从源码编译</summary>
|
||||
|
||||
1. Go 1.18或更高版本。
|
||||
您需要 `Go 1.18` 或更高版本,以及 `make`。
|
||||
|
||||
2. 克隆
|
||||
版本详情:https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
||||
|
||||
```
|
||||
git clone https://github.com/OpenIMSDK/Open-IM-Server
|
||||
cd Open-IM-Server
|
||||
git checkout release-v3.0 #or other release branch
|
||||
```
|
||||
```
|
||||
bashCopy code# 选择您需要的
|
||||
BRANCH=release-v3.1
|
||||
git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build
|
||||
```
|
||||
|
||||
3. 编译
|
||||
阅读关于 [OpenIM 版本策略](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)
|
||||
|
||||
```
|
||||
cd Open-IM-server/scripts
|
||||
chmod +x *.sh
|
||||
./build_all_service.sh
|
||||
```
|
||||
使用 `make help` 来查看 OpenIM 支持的指令。
|
||||
|
||||
所有服务已成功构建如图所示
|
||||
如图所示,所有服务已成功构建
|
||||
|
||||

|
||||

|
||||
|
||||
### 组件配置说明
|
||||
</details> <details> <summary>组件配置说明</summary>
|
||||
|
||||
config/config.yaml中针对存储组件有详细的配置说明
|
||||
config/config.yaml 文件为存储组件提供了详细的配置说明。
|
||||
|
||||
- Zookeeper
|
||||
|
||||
- 用于 RPC 服务发现和注册,支持集群。
|
||||
|
||||
+ Zookeeper
|
||||
+ 用于RPC 服务发现和注册,支持集群。
|
||||
|
||||
````
|
||||
```
|
||||
zookeeper:
|
||||
bashCopy codezookeeper:
|
||||
schema: openim #不建议修改
|
||||
address: [ 127.0.0.1:2181 ] #地址
|
||||
username: #用户名
|
||||
password: #密码
|
||||
```
|
||||
````
|
||||
|
||||
|
||||
|
||||
+ MySQL
|
||||
|
||||
+ 用于存储用户、关系链、群组,支持数据库主备。
|
||||
|
||||
|
||||
- MySQL
|
||||
|
||||
- 用于存储用户、关系和群组,支持主从数据库。
|
||||
|
||||
```
|
||||
mysql:
|
||||
bashCopy codemysql:
|
||||
address: [ 127.0.0.1:13306 ] #地址
|
||||
username: root #用户名
|
||||
password: openIM123 #密码
|
||||
database: openIM_v2 #不建议修改
|
||||
maxOpenConn: 1000 #最大连接数
|
||||
maxIdleConn: 100 #最大空闲连接数
|
||||
maxLifeTime: 60 #连接可以重复使用的最长时间(秒)
|
||||
logLevel: 4 #日志级别 1=slient 2=error 3=warn 4=info
|
||||
slowThreshold: 500 #慢语句阈值 (毫秒)
|
||||
maxOpenConn: 1000 #最大连接
|
||||
maxIdleConn: 100 #最大空闲连接
|
||||
maxLifeTime: 60 #连接可重用的最大时间(秒)
|
||||
logLevel: 4 #日志级别 1=静音 2=错误 3=警告 4=信息
|
||||
slowThreshold: 500 #慢语句阈值(毫秒)
|
||||
```
|
||||
|
||||
|
||||
|
||||
+ Mongo
|
||||
+ 用于存储离线消息,支持mongo分片集群。
|
||||
|
||||
|
||||
- Mongo
|
||||
|
||||
- 用于存储离线消息,支持 mongo 分片集群。
|
||||
|
||||
```
|
||||
mongo:
|
||||
uri: #不为空则直接使用该值
|
||||
bashCopy codemongo:
|
||||
uri: #如果不为空,则直接使用此值
|
||||
address: [ 127.0.0.1:37017 ] #地址
|
||||
database: openIM #mongo db 默认即可
|
||||
database: openIM #默认 mongo 数据库
|
||||
username: root #用户名
|
||||
password: openIM123 #密码
|
||||
maxPoolSize: 100 #最大连接数
|
||||
```
|
||||
|
||||
+ Redis
|
||||
+ 用于存储消息序列号、最新消息、用户token及mysql缓存,支持集群部署。
|
||||
|
||||
|
||||
- Redis
|
||||
|
||||
- 用于存储消息序列号、最新消息、用户令牌和 mysql 缓存,支持集群部署。
|
||||
|
||||
```
|
||||
redis:
|
||||
bashCopy coderedis:
|
||||
address: [ 127.0.0.1:16379 ] #地址
|
||||
username: #用户名
|
||||
password: openIM123 #密码
|
||||
```
|
||||
|
||||
+ Kafka
|
||||
+ 用于消息队列,用于消息解耦,支持集群部署。
|
||||
|
||||
|
||||
- Kafka
|
||||
|
||||
- 用于消息队列,用于消息解耦,支持集群部署。
|
||||
|
||||
```
|
||||
kafka:
|
||||
bashCopy codekafka:
|
||||
username: #用户名
|
||||
password: #密码
|
||||
addr: [ 127.0.0.1:9092 ] #地址
|
||||
@@ -195,71 +254,104 @@ config/config.yaml中针对存储组件有详细的配置说明
|
||||
msgToModify: modify
|
||||
```
|
||||
|
||||
### 启停服务
|
||||
</details> <details> <summary>启动和停止服务</summary>
|
||||
|
||||
启动服务
|
||||
|
||||
```
|
||||
./start_all.sh;
|
||||
bashCopy code
|
||||
./scripts/start-all.sh;
|
||||
```
|
||||
|
||||
检查服务
|
||||
|
||||
```
|
||||
./check_all.sh
|
||||
bashCopy code
|
||||
./scripts/check-all.sh
|
||||
```
|
||||
|
||||
停止服务
|
||||
|
||||
```
|
||||
./stop_all.sh
|
||||
bashCopy code
|
||||
./scripts/stop-all.sh
|
||||
```
|
||||
|
||||
### 开放 IM 端口
|
||||
</details>
|
||||
|
||||
| TCP 端口 | 说明 | 操作 |
|
||||
| --------- | ----------------------------------------------------- | --------------------------------------- |
|
||||
| TCP:10001 | ws 协议,消息端口,如消息发送、推送等,用于客户端 SDK | 端口放行或 nginx 反向代理,并关闭防火墙 |
|
||||
| TCP:10002 | api 端口,如用户、好友、群组、消息等接口。 | 端口放行或 nginx 反向代理,并关闭防火墙 |
|
||||
| TCP:10005 | 选择 minio 存储时需要(openIM 默认使用 minio 存储) | 端口放行或 nginx 反向代理,并关闭防火墙 |
|
||||
<details> <summary>开放 IM 端口</summary>
|
||||
|
||||
### 开放 Chat 端口
|
||||
| TCP 端口 | 描述 | 操作 |
|
||||
| --------- | --------------------------------------------------- | --------------------------------------- |
|
||||
| TCP:10001 | ws 协议,消息端口如消息发送、推送等,用于客户端 SDK | 端口释放或 nginx 反向代理,并关闭防火墙 |
|
||||
| TCP:10002 | api 端口,如用户、朋友、组、消息接口。 | 端口释放或 nginx 反向代理,并关闭防火墙 |
|
||||
| TCP:10005 | 选择 minio 存储时所需 (openIM 默认使用 minio 存储) | 端口释放或 nginx 反向代理,并关闭防火墙 |
|
||||
|
||||
| TCP 端口 | 说明 | 操作 |
|
||||
</details> <details> <summary>开放聊天端口</summary>
|
||||
|
||||
- 聊天仓库: https://github.com/OpenIMSDK/chat
|
||||
|
||||
| TCP 端口 | 描述 | 操作 |
|
||||
| --------- | ------------------------ | --------------------------------------- |
|
||||
| TCP:10008 | 业务系统,如注册、登录等 | 端口放行或 nginx 反向代理,并关闭防火墙 |
|
||||
| TCP:10009 | 管理后台,如统计、封号等 | 端口放行或 nginx 反向代理,并关闭防火墙 |
|
||||
| TCP:10008 | 业务系统,如注册、登录等 | 端口释放或 nginx 反向代理,并关闭防火墙 |
|
||||
| TCP:10009 | 管理后台,如统计、封禁等 | 端口释放或 nginx 反向代理,并关闭防火墙 |
|
||||
|
||||
## APP和OpenIM关系
|
||||
</details>
|
||||
|
||||
OpenIM 是开源的即时通讯组件,它并不是一个独立的产品,此图展示了AppServer、AppClient、Open-IM-Server以及Open-IM-SDK之间的关系
|
||||
## :link: APP 和 OpenIM 之间的关系
|
||||
|
||||

|
||||
OpenIM 不仅仅是一个开源的即时消息组件,它是您的应用程序生态系统的一个不可分割的部分。查看此图表以了解 AppServer、AppClient、Open-IM-Server 和 Open-IM-SDK 如何互动。
|
||||
|
||||
## 整体架构
|
||||

|
||||
|
||||

|
||||
## :building_construction: 总体架构
|
||||
|
||||
## 开始开发 OpenIM
|
||||
深入了解 Open-IM-Server 的功能与我们的架构图。
|
||||
|
||||
[社区存储库](https://github.com/OpenIMSDK/community)包含有关从源代码构建 Kubernetes、如何贡献代码和文档。
|
||||

|
||||
|
||||
## 贡献
|
||||
## :hammer_and_wrench: 开始开发 OpenIM
|
||||
|
||||
欢迎对该项目进行贡献!请参见 [CONTRIBUTING.md](http://CONTRIBUTING.md) 了解详细信息。
|
||||
OpenIM 我们的目标是建立一个顶级的开源社区。我们有一套标准,在 [Community repository](https://github.com/OpenIMSDK/community) 中。
|
||||
|
||||
## 社区会议
|
||||
如果您想为这个 Open-IM-Server 仓库做贡献,请阅读我们的 [贡献者文档](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md)。
|
||||
|
||||
我们希望任何人都能参与我们的社区,我们提供礼品和奖励,并欢迎您每周四晚上加入我们。
|
||||
在您开始之前,请确保您的更改是需要的。最好的方法是创建一个 [新的讨论](https://github.com/OpenIMSDK/Open-IM-Server/discussions/new/choose) 或 [Slack 通讯](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q),或者如果您发现一个问题,首先 [报告它](https://github.com/OpenIMSDK/Open-IM-Server/issues/new/choose)。
|
||||
|
||||
我们在 [GitHub 讨论](https://github.com/OpenIMSDK/Open-IM-Server/discussions/categories/meeting) 中记录每个 [两周会议](https://github.com/OpenIMSDK/Open-IM-Server/issues/381),我们的记录写在 [Google 文档](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing) 中。
|
||||
- [代码标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/go_code.md)
|
||||
- [Docker 图像标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md)
|
||||
- [目录标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/directory.md)
|
||||
- [提交标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/commit.md)
|
||||
- [版本控制标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)
|
||||
- [接口标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/api.md)
|
||||
- [日志标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/log.md)
|
||||
- [错误代码标准](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/error_code.md)
|
||||
|
||||
## 谁在使用 Open-IM-Server
|
||||
## :busts_in_silhouette: 社区
|
||||
|
||||
[用户案例研究](https://github.com/OpenIMSDK/community/blob/main/ADOPTERS.md) 页面包括该项目的用户列表。您可以留下 [📝评论](https://github.com/OpenIMSDK/Open-IM-Server/issues/379) 让我们知道您的用例。
|
||||
- 📚 [OpenIM 社区](https://github.com/OpenIMSDK/community)
|
||||
- 💕 [OpenIM 兴趣小组](https://github.com/Openim-sigs)
|
||||
- 🚀 [加入我们的 Slack 社区](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q)
|
||||
- :eyes: [加入我们的微信群 (微信群)](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
|
||||
|
||||

|
||||
## :calendar: 社区会议
|
||||
|
||||
## 许可证
|
||||
我们希望任何人都可以参与我们的社区并贡献代码,我们提供礼物和奖励,欢迎您每周四晚上加入我们。
|
||||
|
||||
Open-IM-Server 使用 Apache 2.0 许可证。有关详情,请参阅 LICENSE 文件。
|
||||
我们的会议在 [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) 🎯,然后您可以搜索 Open-IM-Server 管道加入。
|
||||
|
||||
我们在 [GitHub 讨论](https://github.com/OpenIMSDK/Open-IM-Server/discussions/categories/meeting) 中记下每次 [双周会议](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting) 的笔记,我们的历史会议记录以及会议回放都可在 [Google Docs :bookmark_tabs:](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing) 中找到。
|
||||
|
||||
## :eyes: 谁在使用 OpenIM
|
||||
|
||||
查看我们的 [用户案例研究](https://github.com/OpenIMSDK/community/blob/main/ADOPTERS.md) 页面以获取项目用户列表。不要犹豫,留下一个 [📝评论](https://github.com/OpenIMSDK/Open-IM-Server/issues/379) 并分享您的使用案例。
|
||||
|
||||
## :page_facing_up: 许可证
|
||||
|
||||
OpenIM 根据 Apache 2.0 许可证授权。请查看 [LICENSE](https://github.com/OpenIMSDK/Open-IM-Server/tree/main/LICENSE) 以获取完整的许可证文本。
|
||||
|
||||
OpenIM logo,包括其变体和动画版本,在此存储库 [OpenIM](https://github.com/OpenIMSDK/Open-IM-Server) 下的 [assets/logo](./assets/logo) 和 [assets/logo-gif](./assets/logo-gif) 目录中显示,受版权法保护。
|
||||
|
||||
## 🔮 感谢我们的贡献者!
|
||||
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/graphs/contributors"> <img src="https://contrib.rocks/image?repo=OpenIMSDK/Open-IM-Server" /> </a>
|
||||
@@ -13,7 +13,7 @@
|
||||
<a href="https://goreportcard.com/report/github.com/OpenIMSDK/Open-IM-Server"><img src="https://goreportcard.com/badge/github.com/OpenIMSDK/Open-IM-Server" alt="A+"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22"><img src="https://img.shields.io/github/issues/OpenIMSDK/Open-IM-Server/good%20first%20issue?logo=%22github%22" alt="good first"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server"><img src="https://img.shields.io/github/stars/OpenIMSDK/Open-IM-Server.svg?style=flat&logo=github&colorB=deeppink&label=stars"></a>
|
||||
<a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg"><img src="https://img.shields.io/badge/Slack-100%2B-blueviolet?logo=slack&logoColor=white"></a>
|
||||
<a href="https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q"><img src="https://img.shields.io/badge/Slack-300%2B-blueviolet?logo=slack&logoColor=white"></a>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-green"></a>
|
||||
<a href="https://golang.org/"><img src="https://img.shields.io/badge/Language-Go-blue.svg"></a>
|
||||
</p>
|
||||
@@ -22,104 +22,200 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="./README.md"><b> English </b></a> •
|
||||
<a href="./README-zh_CN.md"><b> 中文 </b></a>
|
||||
<a href="./README-zh_CN.md"><b> 简体中文 </b></a> •
|
||||
<a href="https://www.openim.online/en"><b> Docs </b></a>
|
||||
</p>
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
## What is Open-IM-Server
|
||||
## ✨ About OpenIM
|
||||
|
||||
Open-IM-Server is an instant messaging server developed using pure Golang, adopting JSON over WebSocket as the communication protocol. In Open-IM-Server, everything is a message, so you can easily extend custom messages without modifying the server code. With a microservice architecture, Open-IM-Server can be deployed using clusters. By deploying Open-IM-Server on a server, developers can quickly integrate instant messaging and real-time networking features into their applications, ensuring the security and privacy of business data.
|
||||
Open-IM-Server, meticulously developed in pure Golang, is a powerful instant messaging server. Its distinct communication method, employing pb+websocket, views every interaction as a message, streamlining customization without altering server code. Built on a microservice architecture, it offers deployment through clusters for outstanding performance and scalability.
|
||||
|
||||
Open-IM-Server is not a standalone product and does not include account registration and login services. For your convenience, we have open-sourced the [chat repository](https://github.com/OpenIMSDK/chat) which includes login and registration functionality. By deploying the chat business server alongside Open-IM-Server, a chat product can be set up.
|
||||
Open-IM-Server is more than an instant messaging server; it's a powerful tool for incorporating real-time networking into your applications, positioning itself as your premier choice for integration! 🚀
|
||||
|
||||
## Features
|
||||
Please be aware that Open-IM-Server does not function as a standalone product and does not offer built-in account registration or login services. To ease your implementation process, we've open-sourced the [chat repository](https://github.com/OpenIMSDK/chat), which comprises these features. Deploying this chat business server in conjunction with Open-IM-Server expedites the setup of a comprehensive chat product. 👥
|
||||
|
||||
- Open source
|
||||
- Easy to integrate
|
||||
- Excellent scalability
|
||||
- High performance
|
||||
- Lightweight
|
||||
- Supports multiple protocols
|
||||
Further enhancing your experience, we also provide an SDK client, wherein most complex logics are implemented. The [SDK repository](https://github.com/OpenIMSDK/openim-sdk-core) can be found at [this link](https://github.com/OpenIMSDK/openim-sdk-core). The [chat repository](https://github.com/OpenIMSDK/chat) is our business server while the 'core' represents the high-level encapsulation of the SDK, synergistically working together to deliver superior results. ✨
|
||||
|
||||
## Community
|
||||
- Visit the official website: [OpenIM Developer Documentation](https://www.openim.online/)
|
||||
## :star2: Why OpenIM
|
||||
|
||||
## Quick Start
|
||||
**🔍 Function screenshot display**
|
||||
|
||||
### Deploying with docker-compose
|
||||
<div align="center">
|
||||
|
||||
1. Clone the project
|
||||
| 💻🔄📱 Multi Terminal Synchronization 🔄🖥️ | 📅⚡ Efficient Meetings 🚀💼 |
|
||||
| :----------------------------------------------------------: | :---------------------------------------------------------: |
|
||||
|  |  |
|
||||
| 📲🔄 **One-to-one and Group Chats** 👥🗣️ | 🎁💻 **Special Features - Custom Messages** ✉️🎨|
|
||||
|  |  |
|
||||
|
||||
```
|
||||
clone https://github.com/OpenIMSDK/Open-IM-Server
|
||||
cd Open-IM-Server
|
||||
git checkout release-v3.0 #or other release branch
|
||||
</div>
|
||||
|
||||
1. **Comprehensive Message Type Support :speech_balloon:**
|
||||
|
||||
✅ Supports almost all types of messages, including text, images, emojis, voice, video, geographical location, files, quotes, business cards, system notifications, custom messages and more
|
||||
|
||||
✅ Supports one-on-one and multi-person audio and video calls
|
||||
|
||||
✅ Provides terminal support for multiple platforms such as iOS, Android, Flutter, uni-app, ReactNative, Electron, Web, H5
|
||||
|
||||
2. **Efficient Meetings Anytime, Anywhere :earth_americas:**
|
||||
|
||||
✅ Based on IM (Instant Messaging) with 100% reliable forced signaling capabilities, it paves the way for IM systems, deeply integrated with chat applications
|
||||
|
||||
✅ Supports hundreds of people in a single meeting, with subscription numbers reaching thousands, and server-side audio and video recording
|
||||
|
||||
3. **One-on-one and Group Chats for Various Social Scenarios :busts_in_silhouette:**
|
||||
|
||||
✅ OpenIM has four roles: application administrator, group owner, group administrator, and regular member
|
||||
|
||||
✅ Powerful group features such as muting, group announcements, group validation, unlimited group members, and loading group messages as needed
|
||||
|
||||
4. **Unique Features :star2:**
|
||||
|
||||
✅ Supports read-and-burn private chats, customizable duration
|
||||
|
||||
✅ Message editing function broadens social scenarios, making instant communication more diverse and interesting
|
||||
|
||||
5. **Open Source :open_hands:**
|
||||
|
||||
✅ The code of OpenIM is open source, self-controlled data, aimed at building a globally leading IM open source community, including client SDK and server
|
||||
|
||||
✅ Based on open source Server, many excellent open source projects have been developed, such as [OpenKF](https://github.com/OpenIMSDK/OpenKF) (Open source AI customer service system)
|
||||
|
||||
6. **Easy to Expand :wrench:**
|
||||
|
||||
✅ The OpenIM server is implemented in Golang, introducing an innovative "everything is a message" communication model, simplifying the implementation of custom messages and extended features
|
||||
|
||||
7. **High Performance :racing_car:**
|
||||
|
||||
✅ OpenIM supports a hierarchical governance architecture in the cluster, tested by a large number of users, and abstracts the storage model of online messages, offline messages, and historical messages
|
||||
|
||||
8. **Full Platform Support :tv:**
|
||||
|
||||
✅ Supports native iOS, Android; cross-platform Flutter, uni-app, ReactNative; major web front-end frameworks such as React, Vue; applets; and PC platforms supported by Electron
|
||||
|
||||
9. **The ultimate deployment experience 🤖**
|
||||
|
||||
✅ Supports [cluster deployment](https://github.com/OpenIMSDK/Open-IM-Server/edit/main/deployments/README.md)
|
||||
|
||||
✅ Supports multi-architecture mirroring, our Docker images are hosted not only on GitHub but also on Alibaba Cloud and Docker Hub supporting multiple architectures. Visit [our GitHub packages](https://github.com/orgs/OpenIMSDK/packages?repo_name=Open-IM-Server) and read our [version management document](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md) for more information.
|
||||
|
||||
11. **A large ecosystem of open source communities 🤲**
|
||||
|
||||
✅ We have tens of thousands of users and many solutions to problems.
|
||||
|
||||
✅ We have a large open source community called [OpenIMSDK](https://github.com/OpenIMSDK) that runs the core modules, we have an open source community called [openim-sigs](https://github.com/openim-sigs) to explore more IM-based infrastructure products.
|
||||
|
||||
## :rocket: Quick Start
|
||||
|
||||
You can quickly learn OpenIM engineering solutions, all it takes is one simple command:
|
||||
|
||||
```bash
|
||||
$ make demo
|
||||
```
|
||||
|
||||
1. Modify .env
|
||||
🤲 In order to facilitate the user experience, we have provided a variety of deployment solutions, you can choose your own deployment method according to the list below:
|
||||
|
||||
```
|
||||
USER=root #no need to modify
|
||||
PASSWORD=openIM123 #A combination of 8 or more numbers and letters, this password applies to redis, mysql, mongo, as well as accessSecret in config/config.yaml
|
||||
ENDPOINT=http://127.0.0.1:10005 #minio's external service IP and port, or use the domain name storage.xx.xx, the app must be able to access this IP and port or domain,
|
||||
API_URL=http://127.0.0.1:10002/object/ #the app must be able to access this IP and port or domain,
|
||||
DATA_DIR=./ #designate large disk directory
|
||||
<details> <summary>Deploying with Docker Compose</summary>
|
||||
|
||||
|
||||
> docker compose will not be maintained in future versions, but it is still the easiest and most convenient way to organize docker compose deployments into a separate project https://github.com/openim-sigs/openim-docker to maintain.
|
||||
|
||||
**1. Clone the project**
|
||||
|
||||
|
||||
```bash
|
||||
git clone -b feat/test https://github.com/openim-sigs/openim-docker openim/openim-docker && export openim=$(pwd)/openim && cd $openim/openim-docker && ./scripts/init-config.sh && docker-compose up -d
|
||||
```
|
||||
|
||||
1. Deploy and start
|
||||
> **Note**
|
||||
> If you don't know OpenIM's versioning policy, 📚Read our release policy: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
||||
|
||||
Note: This command can only be executed once. It will modify the component passwords in docker-compose based on the PASSWORD variable in .env, and modify the component passwords in config/config.yaml. If the password in .env changes, you need to first execute docker-compose down; rm components -rf and then execute this command.
|
||||
|
||||
```
|
||||
chmod +x install_im_server.sh;
|
||||
./install_im_server.sh;
|
||||
|
||||
**2. Configure the config file**
|
||||
|
||||
If you tried to get started quickly with `make demo`, then you know that our config file is generated by automation.
|
||||
|
||||
You can use `make init` to quickly initialize a configuration file
|
||||
|
||||
Modify the automation script:
|
||||
|
||||
```bash
|
||||
cat scripts/install/environment.sh
|
||||
```
|
||||
|
||||
1. Check the service
|
||||
1. Recommended using environment variables:
|
||||
|
||||
```
|
||||
cd scripts;
|
||||
./docker_check_service.sh
|
||||
```bash
|
||||
export PASSWORD="openIM123" # Set password
|
||||
export USER="root" # Set username
|
||||
# Choose chat version and server version https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md, eg: main, release-v*.*
|
||||
export CHAT_BRANCH="main"
|
||||
export SERVER_BRANCH="main"
|
||||
#... Other environment variables
|
||||
# MONGO_USERNAME: This sets the MongoDB username
|
||||
# MONGO_PASSWORD: Set the MongoDB password
|
||||
# MONGO_DATABASE: Sets the MongoDB database name
|
||||
# MINIO_ENDPOINT: set the MinIO service address
|
||||
# API_URL: under network environment, set OpenIM Server API address
|
||||
export API_URL="http://127.0.0.1:10002"
|
||||
```
|
||||
|
||||

|
||||
Next, update the configuration using make init:
|
||||
|
||||
```bash
|
||||
$ make init
|
||||
$ git diff
|
||||
```
|
||||
|
||||
|
||||
</details>
|
||||
|
||||
### Compile from source
|
||||
<details> <summary>Compile from Source</summary>
|
||||
|
||||
1. Go 1.18 or higher version.
|
||||
|
||||
2. Clone
|
||||
Ur need `Go 1.18` or higher version, and `make`.
|
||||
|
||||
```
|
||||
git clone https://github.com/OpenIMSDK/Open-IM-Server
|
||||
cd Open-IM-Server
|
||||
git checkout release-v3.0 #or other release branch
|
||||
```
|
||||
|
||||
3. Compile
|
||||
```bash
|
||||
go version && make --version || echo "Error: One of the commands failed."
|
||||
```
|
||||
|
||||
```
|
||||
cd Open-IM-server/scripts
|
||||
chmod +x *.sh
|
||||
./build_all_service.sh
|
||||
```
|
||||
Version Details: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
||||
|
||||
All services have been successfully built as shown in the figure
|
||||
```bash
|
||||
# choose what you need
|
||||
$ BRANCH=release-v3.1
|
||||
$ git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make start
|
||||
```
|
||||
|
||||

|
||||
> `make help` to help you see the instructions supported by OpenIM.
|
||||
|
||||
### Component Configuration Instructions
|
||||
Use `make check` to check all component starts
|
||||
|
||||
The config/config.yaml file has detailed configuration instructions for the storage components.
|
||||
```bash
|
||||
$ make check
|
||||
```
|
||||
|
||||
You can use the `make help-all` see OpenIM in action.
|
||||
|
||||
</details>
|
||||
|
||||
<details> <summary>Component Configuration Instructions</summary>
|
||||
The `config/config.yaml` file has detailed configuration instructions for the storage components.
|
||||
|
||||
|
||||
The config file is available via [environment.sh](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/scripts/install/environment.sh) configuration [openim.yaml](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployments/templates/openim.yaml) template, and then through the `make init` to automatically generate a new configuration.
|
||||
|
||||
- Zookeeper
|
||||
|
||||
- Used for RPC service discovery and registration, cluster support.
|
||||
|
||||
```
|
||||
```bash
|
||||
zookeeper:
|
||||
schema: openim #Not recommended to modify
|
||||
address: [ 127.0.0.1:2181 ] #address
|
||||
@@ -131,7 +227,7 @@ The config/config.yaml file has detailed configuration instructions for the stor
|
||||
|
||||
- Used for storing users, relationships, and groups, supports master-slave database.
|
||||
|
||||
```
|
||||
```bash
|
||||
mysql:
|
||||
address: [ 127.0.0.1:13306 ] #address
|
||||
username: root #username
|
||||
@@ -148,7 +244,7 @@ The config/config.yaml file has detailed configuration instructions for the stor
|
||||
|
||||
- Used for storing offline messages, supports mongo sharded clusters.
|
||||
|
||||
```
|
||||
```bash
|
||||
mongo:
|
||||
uri: #Use this value directly if not empty
|
||||
address: [ 127.0.0.1:37017 ] #address
|
||||
@@ -162,7 +258,7 @@ The config/config.yaml file has detailed configuration instructions for the stor
|
||||
|
||||
- Used for storing message sequence numbers, latest messages, user tokens, and mysql cache, supports cluster deployment.
|
||||
|
||||
```
|
||||
```bash
|
||||
redis:
|
||||
address: [ 127.0.0.1:16379 ] #address
|
||||
username: #username
|
||||
@@ -173,7 +269,7 @@ The config/config.yaml file has detailed configuration instructions for the stor
|
||||
|
||||
- Used for message queues, for message decoupling, supports cluster deployment.
|
||||
|
||||
```
|
||||
```bash
|
||||
kafka:
|
||||
username: #username
|
||||
password: #password
|
||||
@@ -194,27 +290,17 @@ The config/config.yaml file has detailed configuration instructions for the stor
|
||||
msgToModify: modify
|
||||
```
|
||||
|
||||
### Start and Stop Services
|
||||
</details>
|
||||
|
||||
Start services
|
||||
<details> <summary>Deployed with kubernetes</summary>
|
||||
|
||||
```
|
||||
./start_all.sh;
|
||||
```
|
||||
|
||||
Check services
|
||||
read: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployments/README.md
|
||||
|
||||
```
|
||||
./check_all.sh
|
||||
```
|
||||
</details>
|
||||
|
||||
Stop services
|
||||
<details> <summary>Open IM Ports</summary>
|
||||
|
||||
```
|
||||
./stop_all.sh
|
||||
```
|
||||
|
||||
### Open IM Ports
|
||||
|
||||
| TCP Port | Description | Operation |
|
||||
| --------- | ------------------------------------------------------------ | ----------------------------------------------------- |
|
||||
@@ -222,42 +308,77 @@ Stop services
|
||||
| TCP:10002 | api port, such as user, friend, group, message interfaces. | Port release or nginx reverse proxy, and firewall off |
|
||||
| TCP:10005 | Required when choosing minio storage (openIM uses minio storage by default) | Port release or nginx reverse proxy, and firewall off |
|
||||
|
||||
### Open Chat Ports
|
||||
</details>
|
||||
|
||||
<details> <summary>Open Chat Ports</summary>
|
||||
|
||||
|
||||
+ chat warehouse: https://github.com/OpenIMSDK/chat
|
||||
|
||||
| TCP Port | Description | Operation |
|
||||
| --------- | --------------------------------------------------- | ----------------------------------------------------- |
|
||||
| TCP:10008 | Business system, such as registration, login etc | Port release or nginx reverse proxy, and firewall off |
|
||||
| TCP:10009 | Management backend, such as statistics, banning etc | Port release or nginx reverse proxy, and firewall off |
|
||||
|
||||
## Relationship Between APP and OpenIM
|
||||
|
||||
OpenIM is an open source instant messaging component, it is not an independent product. This image shows the relationship between AppServer, AppClient, Open-IM-Server and Open-IM-SDK.
|
||||
|
||||

|
||||
|
||||
## Overall Architecture
|
||||
|
||||

|
||||
|
||||
## To start developing OpenIM
|
||||
The [community repository](https://github.com/OpenIMSDK/community) hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.
|
||||
</details>
|
||||
|
||||
|
||||
## Contributing
|
||||
## :link: Relationship Between APP and OpenIM
|
||||
|
||||
Contributions to this project are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
|
||||
OpenIM isn't just an open-source instant messaging component, it's an integral part of your application ecosystem. Check out this diagram to understand how AppServer, AppClient, Open-IM-Server, and Open-IM-SDK interact.
|
||||
|
||||
## Community Meetings
|
||||
We want anyone to get involved in our community, we offer gifts and rewards, and we welcome you to join us every Thursday night.
|
||||

|
||||
|
||||
We take notes of each [biweekly meeting](https://github.com/OpenIMSDK/Open-IM-Server/issues/381) in [GitHub discussions](https://github.com/OpenIMSDK/Open-IM-Server/discussions/categories/meeting), and our minutes are written in [Google Docs](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing).
|
||||
## :building_construction: Overall Architecture
|
||||
|
||||
Delve into the heart of Open-IM-Server's functionality with our architecture diagram.
|
||||
|
||||
## Who are using Open-IM-Server
|
||||
The [user case studies](https://github.com/OpenIMSDK/community/blob/main/ADOPTERS.md) page includes the user list of the project. You can leave a [📝comment](https://github.com/OpenIMSDK/Open-IM-Server/issues/379) to let us know your use case.
|
||||

|
||||
|
||||

|
||||
## :hammer_and_wrench: To start developing OpenIM
|
||||
|
||||
## License
|
||||
OpenIM Our goal is to build a top-level open source community. We have a set of standards, in the [Community repository](https://github.com/OpenIMSDK/community).
|
||||
|
||||
Open-IM-Server is under the Apache 2.0 license. See the [LICENSE](./LICENSE) file for details
|
||||
If you'd like to contribute to this Open-IM-Server repository, please read our [contributor documentation](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md).
|
||||
|
||||
Before you start, please make sure your changes are in demand. The best for that is to create a [new discussion](https://github.com/OpenIMSDK/Open-IM-Server/discussions/new/choose) OR [Slack Communication](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q), or if you find an issue, [report it](https://github.com/OpenIMSDK/Open-IM-Server/issues/new/choose) first.
|
||||
|
||||
- [Code Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/go_code.md)
|
||||
- [Docker Images Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md)
|
||||
- [Directory Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/directory.md)
|
||||
- [Commit Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/commit.md)
|
||||
- [Versioning Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)
|
||||
- [Interface Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/api.md)
|
||||
- [Log Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/log.md)
|
||||
- [Error Code Standards](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/error_code.md)
|
||||
|
||||
## :busts_in_silhouette: Community
|
||||
|
||||
+ 📚 [OpenIM Community](https://github.com/OpenIMSDK/community)
|
||||
+ 💕 [OpenIM Interest Group](https://github.com/Openim-sigs)
|
||||
+ 🚀 [Join our Slack community](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q)
|
||||
+ :eyes: [Join our wechat (微信群)](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
|
||||
|
||||
## :calendar: Community Meetings
|
||||
|
||||
We want anyone to get involved in our community and contributing code, we offer gifts and rewards, and we welcome you to join us every Thursday night.
|
||||
|
||||
Our conference is in the [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) 🎯, then you can search the Open-IM-Server pipeline to join
|
||||
|
||||
We take notes of each [biweekly meeting](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting) in [GitHub discussions](https://github.com/OpenIMSDK/Open-IM-Server/discussions/categories/meeting), Our historical meeting notes, as well as replays of the meetings are available at [Google Docs :bookmark_tabs:](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing).
|
||||
|
||||
## :eyes: Who are using OpenIM
|
||||
|
||||
Check out our [user case studies](https://github.com/OpenIMSDK/community/blob/main/ADOPTERS.md) page for a list of the project users. Don't hesitate to leave a [📝comment](https://github.com/OpenIMSDK/Open-IM-Server/issues/379) and share your use case.
|
||||
|
||||
## :page_facing_up: License
|
||||
|
||||
OpenIM is licensed under the Apache 2.0 license. See [LICENSE](https://github.com/OpenIMSDK/Open-IM-Server/tree/main/LICENSE) for the full license text.
|
||||
|
||||
The OpenIM logo, including its variations and animated versions, displayed in this repository [OpenIM](https://github.com/OpenIMSDK/Open-IM-Server) under the [assets/logo](./assets/logo) and [assets/logo-gif](assets/logo-gif) directories, are protected by copyright laws.
|
||||
|
||||
## 🔮 Thanks to our contributors!
|
||||
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=OpenIMSDK/Open-IM-Server" />
|
||||
</a>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
## :star2: Why OpenIM
|
||||
|
||||
**🔍 Function screenshot display**
|
||||
|
||||
<div align="center">
|
||||
|
||||
|
||||
| multiple message | Efficient meetings |
|
||||
| :---------------------------------------: | :---------------------------------------------: |
|
||||
|  |  |
|
||||
| **One-to-one and group chats** | **Special features - Custom messages** |
|
||||
|  |  |
|
||||
|
||||
</div>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 418 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 931 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 318 KiB |
@@ -0,0 +1,65 @@
|
||||
# Building OpenIM
|
||||
|
||||
Building OpenIM is easy if you take advantage of the containerized build environment. This document will help guide you through understanding this build process.
|
||||
|
||||
## Requirements
|
||||
|
||||
1. Docker, using one of the following configurations:
|
||||
* **macOS** Install Docker for Mac. See installation instructions [here](https://docs.docker.com/docker-for-mac/).
|
||||
**Note**: You will want to set the Docker VM to have at least 4GB of initial memory or building will likely fail.
|
||||
* **Linux with local Docker** Install Docker according to the [instructions](https://docs.docker.com/installation/#installation) for your OS.
|
||||
* **Windows with Docker Desktop WSL2 backend** Install Docker according to the [instructions](https://docs.docker.com/docker-for-windows/wsl-tech-preview/). Be sure to store your sources in the local Linux file system, not the Windows remote mount at `/mnt/c`.
|
||||
|
||||
**Note**: You will need to check if Docker CLI plugin buildx is properly installed (`docker-buildx` file should be present in `~/.docker/cli-plugins`). You can install buildx according to the [instructions](https://github.com/docker/buildx/blob/master/README.md#installing).
|
||||
|
||||
2. **Optional** [Google Cloud SDK](https://developers.google.com/cloud/sdk/)
|
||||
|
||||
You must install and configure Google Cloud SDK if you want to upload your release to Google Cloud Storage and may safely omit this otherwise.
|
||||
|
||||
## Actions
|
||||
|
||||
About [Images packages](https://github.com/orgs/OpenIMSDK/packages?repo_name=Open-IM-Server)
|
||||
|
||||
All files in the `build/images` directory are not templated and are instead rendered by Github Actions, which is an automated process.
|
||||
|
||||
Trigger condition:
|
||||
1. create a new tag with the format `vX.Y.Z` (e.g. `v1.0.0`)
|
||||
2. push the tag to the remote repository
|
||||
3. wait for the build to finish
|
||||
4. download the artifacts from the release page
|
||||
|
||||
## Make images
|
||||
|
||||
**help info:**
|
||||
|
||||
```bash
|
||||
$ make image.help
|
||||
```
|
||||
|
||||
**build images:**
|
||||
|
||||
```bash
|
||||
$ make image
|
||||
```
|
||||
|
||||
## Overview
|
||||
|
||||
While it is possible to build OpenIM using a local golang installation, we have a build process that runs in a Docker container. This simplifies initial set up and provides for a very consistent build and test environment.
|
||||
|
||||
|
||||
## Basic Flow
|
||||
|
||||
The scripts directly under [`build/`](.) are used to build and test. They will ensure that the `kube-build` Docker image is built (based on [`build/build-image/Dockerfile`](build-image/Dockerfile) and after base image's `KUBE_BUILD_IMAGE_CROSS_TAG` from Dockerfile is replaced with one of those actual tags of the base image, like `v1.13.9-2`) and then execute the appropriate command in that container. These scripts will both ensure that the right data is cached from run to run for incremental builds and will copy the results back out of the container. You can specify a different registry/name and version for `kube-cross` by setting `KUBE_CROSS_IMAGE` and `KUBE_CROSS_VERSION`, see [`common.sh`](common.sh) for more details.
|
||||
|
||||
The `kube-build` container image is built by first creating a "context" directory in `_output/images/build-image`. It is done there instead of at the root of the OpenIM repo to minimize the amount of data we need to package up when building the image.
|
||||
|
||||
There are 3 different containers instances that are run from this image. The first is a "data" container to store all data that needs to persist across to support incremental builds. Next there is an "rsync" container that is used to transfer data in and out to the data container. Lastly there is a "build" container that is used for actually doing build actions. The data container persists across runs while the rsync and build containers are deleted after each use.
|
||||
|
||||
`rsync` is used transparently behind the scenes to efficiently move data in and out of the container. This will use an ephemeral port picked by Docker. You can modify this by setting the `KUBE_RSYNC_PORT` env variable.
|
||||
|
||||
All Docker names are suffixed with a hash derived from the file path (to allow concurrent usage on things like CI machines) and a version number. When the version number changes all state is cleared and clean build is started. This allows the build infrastructure to be changed and signal to CI systems that old artifacts need to be deleted.
|
||||
|
||||
## Build artifacts
|
||||
The build system output all its products to a top level directory in the source repository named `_output`.
|
||||
These include the binary compiled packages (e.g. kubectl, kube-scheduler etc.) and archived Docker images.
|
||||
If you intend to run a component with a docker image you will need to import it from this directory with
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM golang:1.20.0 as build
|
||||
|
||||
WORKDIR /openim
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
||||
echo "Asia/Shanghai" > /etc/timezone && \
|
||||
mkdir -p /var/log/miniblog
|
||||
|
||||
COPY miniblog /openim
|
||||
|
||||
EXPOSE 10002
|
||||
CMD ["./bin/openim-api","--port", "10002"]
|
||||
@@ -255,6 +255,134 @@ builds:
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
- binary: infra
|
||||
id: infra
|
||||
main: ./tools/infra/infra.go
|
||||
goos:
|
||||
- darwin
|
||||
- windows
|
||||
- linux
|
||||
goarch:
|
||||
- s390x
|
||||
- mips64
|
||||
- mips64le
|
||||
- amd64
|
||||
- ppc64le
|
||||
- arm64
|
||||
goarm:
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
- binary: ncpu
|
||||
id: ncpu
|
||||
main: ./tools/ncpu/ncpu.go
|
||||
goos:
|
||||
- darwin
|
||||
- windows
|
||||
- linux
|
||||
goarch:
|
||||
- s390x
|
||||
- mips64
|
||||
- mips64le
|
||||
- amd64
|
||||
- ppc64le
|
||||
- arm64
|
||||
goarm:
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
- binary: openim-web
|
||||
id: openim-web
|
||||
main: ./tools/openim-web/openim-web.go
|
||||
goos:
|
||||
- darwin
|
||||
- windows
|
||||
- linux
|
||||
goarch:
|
||||
- s390x
|
||||
- mips64
|
||||
- mips64le
|
||||
- amd64
|
||||
- ppc64le
|
||||
- arm64
|
||||
goarm:
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
- binary: component
|
||||
id: component
|
||||
main: ./tools/component/component.go
|
||||
goos:
|
||||
- darwin
|
||||
- windows
|
||||
- linux
|
||||
goarch:
|
||||
- s390x
|
||||
- mips64
|
||||
- mips64le
|
||||
- amd64
|
||||
- ppc64le
|
||||
- arm64
|
||||
goarm:
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
- binary: versionchecker
|
||||
id: versionchecker
|
||||
main: ./tools/versionchecker/versionchecker.go
|
||||
goos:
|
||||
- darwin
|
||||
- windows
|
||||
- linux
|
||||
goarch:
|
||||
- s390x
|
||||
- mips64
|
||||
- mips64le
|
||||
- amd64
|
||||
- ppc64le
|
||||
- arm64
|
||||
goarm:
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
- binary: changelog
|
||||
id: changelog
|
||||
main: ./tools/changelog/changelog.go
|
||||
goos:
|
||||
- darwin
|
||||
- windows
|
||||
- linux
|
||||
goarch:
|
||||
- s390x
|
||||
- mips64
|
||||
- mips64le
|
||||
- amd64
|
||||
- ppc64le
|
||||
- arm64
|
||||
goarm:
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
- binary: yamlfmt
|
||||
id: yamlfmt
|
||||
main: ./tools/yamlfmt/yamlfmt.go
|
||||
goos:
|
||||
- darwin
|
||||
- windows
|
||||
- linux
|
||||
goarch:
|
||||
- s390x
|
||||
- mips64
|
||||
- mips64le
|
||||
- amd64
|
||||
- ppc64le
|
||||
- arm64
|
||||
goarm:
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
# TODO:Need a script, such as the init - release to help binary to find the right directory
|
||||
# ,which can be compiled binary
|
||||
archives:
|
||||
- format: tar.gz
|
||||
# this name template makes the OS and Arch compatible with the results of uname.
|
||||
@@ -265,12 +393,23 @@ archives:
|
||||
{{- else if eq .Arch "386" }}i386
|
||||
{{- else }}{{ .Arch }}{{ end }}
|
||||
{{- if .Arm }}v{{ .Arm }}{{ end }}
|
||||
|
||||
# Set this to true if you want all files in the archive to be in a single directory.
|
||||
# If set to true and you extract the archive 'goreleaser_Linux_arm64.tar.gz',
|
||||
# you'll get a folder 'goreleaser_Linux_arm64'.
|
||||
# If set to false, all files are extracted separately.
|
||||
# You can also set it to a custom folder name (templating is supported).
|
||||
wrap_in_directory: true
|
||||
|
||||
# use zip for windows archives
|
||||
files:
|
||||
- LICENSE
|
||||
- README.md
|
||||
- CHANGELOG/*
|
||||
- CONTRIBUTING.md
|
||||
- deployment/*
|
||||
- config/*
|
||||
- build/*
|
||||
- scripts/*
|
||||
- Makefile
|
||||
- install.sh
|
||||
- docs/*
|
||||
- src: "*.md"
|
||||
dst: docs
|
||||
@@ -339,15 +478,17 @@ changelog:
|
||||
# - image_templates:
|
||||
# - "openimsdk/open-im-server:{{ .Tag }}-amd64"
|
||||
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64"
|
||||
# dockerfile: Dockerfile
|
||||
# dockerfile: build/images/openim-api/Dockerfile.release
|
||||
# ids:
|
||||
# - openim-api
|
||||
# use: buildx
|
||||
# build_flag_templates:
|
||||
# - "--pull"
|
||||
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/goreleaser/goreleaser/main/README.md"
|
||||
# - "--label=io.artifacthub.package.logo-url=https://goreleaser.com/static/avatar.png"
|
||||
# - '--label=io.artifacthub.package.maintainers=[{"name":"Carlos Alexandro Becker","email":"carlos@carlosbecker.dev"}]'
|
||||
# - "--label=io.artifacthub.package.license=MIT"
|
||||
# - "--label=org.opencontainers.image.description=Deliver Go binaries as fast and easily as possible"
|
||||
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/Open-IM-Server/main/README.md"
|
||||
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo-green.png"
|
||||
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"3293172751nss@gmail.com"}]'
|
||||
# - "--label=io.artifacthub.package.license=Apace-2.0"
|
||||
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
|
||||
# - "--label=org.opencontainers.image.created={{.Date}}"
|
||||
# - "--label=org.opencontainers.image.name={{.ProjectName}}"
|
||||
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
@@ -359,15 +500,15 @@ changelog:
|
||||
# - image_templates:
|
||||
# - "goreleaser/goreleaser:{{ .Tag }}-arm64"
|
||||
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64"
|
||||
# dockerfile: Dockerfile
|
||||
# dockerfile: build/images/openim-api/Dockerfile.release
|
||||
# use: buildx
|
||||
# build_flag_templates:
|
||||
# - "--pull"
|
||||
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/goreleaser/goreleaser/main/README.md"
|
||||
# - "--label=io.artifacthub.package.logo-url=https://goreleaser.com/static/avatar.png"
|
||||
# - '--label=io.artifacthub.package.maintainers=[{"name":"Carlos Alexandro Becker","email":"carlos@carlosbecker.dev"}]'
|
||||
# - "--label=io.artifacthub.package.license=MIT"
|
||||
# - "--label=org.opencontainers.image.description=Deliver Go binaries as fast and easily as possible"
|
||||
# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/Open-IM-Server/main/README.md"
|
||||
# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo-green.png"
|
||||
# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"3293172751nss@gmail.com"}]'
|
||||
# - "--label=io.artifacthub.package.license=Apace-2.0"
|
||||
# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system"
|
||||
# - "--label=org.opencontainers.image.created={{.Date}}"
|
||||
# - "--label=org.opencontainers.image.name={{.ProjectName}}"
|
||||
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
@@ -447,8 +588,8 @@ milestones:
|
||||
# Repository for the milestone
|
||||
# Default is extracted from the origin remote URL
|
||||
repo:
|
||||
owner: user
|
||||
name: repo
|
||||
owner: OpenIMSDK
|
||||
name: Open-IM-Server
|
||||
|
||||
# Whether to close the milestone
|
||||
close: true
|
||||
@@ -479,42 +620,4 @@ checksum:
|
||||
algorithm: sha256
|
||||
|
||||
release:
|
||||
footer: |
|
||||
**Full Changelog**: https://github.com/OpenIMSDK/Open-IM-Server/compare/{{ .PreviousTag }}...{{ .Tag }}
|
||||
|
||||
## Helping out
|
||||
|
||||
This release is only possible thanks to **all** the support of some **awesome people**!
|
||||
|
||||
Want to be one of them?
|
||||
Contributions to this project are welcome! Please see [CONTRIBUTING.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md) for details.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/kubbot" style="float: left; margin-right: 10px;">
|
||||
<img src="https://github.com/openimbot/openimbot/blob/main/assets/icon/blue%E9%80%8F%E6%98%8E.png" width="50" height="50" />
|
||||
</a>
|
||||
<a href="https://www.openim.online">
|
||||
<img src="https://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo.png" />
|
||||
</a>
|
||||
<a href="https://github.com/openimbot" style="float: right; margin-left: 10px;">
|
||||
<img src="https://github.com/openimbot/openimbot/blob/main/assets/icon/red%E9%80%8F%E6%98%8E.png" width="50" height="50" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
## Contact Us
|
||||
|
||||
We value close connections with our users, developers, and contributors here at OpenIMSDK. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
|
||||
|
||||
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of OpenIMSDK. You can ask technical questions, seek help, or share your experiences with other users of OpenIMSDK.
|
||||
|
||||
In [OpenIM community is recruiting new members! discussion](https://github.com/orgs/OpenIMSDK/discussions/426) please leave your information, convenient we will better developers around the small gift to send to your hands.
|
||||
|
||||
In addition to Slack, we also offer the following ways to get in touch:
|
||||
|
||||
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg" target="_blank"><img src="https://img.shields.io/badge/slack-%40OpenIMSDKCore-informational?logo=slack&style=flat-square"></a>: We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) team channel.
|
||||
+ <a href="https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=4closetool3@gmail.com" target="_blank"><img src="https://img.shields.io/badge/gmail-%40OOpenIMSDKCore?style=social&logo=gmail"></a>: Get in touch with us on [Gmail](winxu81@gmail.com). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email.
|
||||
+ <a href="https://doc.rentsoft.cn/" target="_blank"><img src="https://img.shields.io/badge/%E5%8D%9A%E5%AE%A2-%40OpenIMSDKCore-blue?style=social&logo=Octopus%20Deploy"></a>: Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information.
|
||||
+ <a href="https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg" target="_blank"><img src="https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1-OpenIMSDKCore-brightgreen?logo=wechat&style=flat-square"></a>: Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible.
|
||||
|
||||
Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
|
||||
prerelease: auto
|
||||
@@ -0,0 +1,50 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-api
|
||||
|
||||
# FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV PORT 10002
|
||||
EXPOSE 10002
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-api /usr/bin/openim-api
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "openim-api -c $OPENIM_SERVER_CONFIG_NAME --port $PORT"]
|
||||
@@ -0,0 +1,8 @@
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
COPY openim-api /usr/bin/
|
||||
|
||||
# nosemgrep: dockerfile.security.missing-user.missing-user
|
||||
ENTRYPOINT ["/usr/bin/openim-api"]
|
||||
# nosemgrep: dockerfile.security.missing-user.missing-user
|
||||
CMD ["--help"]
|
||||
@@ -0,0 +1,49 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go mod download
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-cmdutils
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder $OPENIM_SERVER_BINDIR/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-cmdutils /usr/bin/openim-cmdutils
|
||||
|
||||
ENTRYPOINT ["openim-cmdutils"]
|
||||
|
||||
CMD ["--help"]
|
||||
@@ -0,0 +1,48 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-crontask
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV OPENIM_SERVER_CONFIG_NAME=/openim/openim-server/config
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-crontask /usr/bin/openim-crontask
|
||||
|
||||
CMD ["bash", "-c", "openim-crontask -c $OPENIM_SERVER_CONFIG_NAME"]
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-msggateway
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV PORT 10140 \
|
||||
WS_PORT 10001
|
||||
|
||||
EXPOSE 10140
|
||||
EXPOSE 10001
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-msggateway /usr/bin/openim-msggateway
|
||||
|
||||
CMD ["bash", "-c", "openim-msggateway -c $OPENIM_SERVER_CONFIG_NAME --port $PORT --ws_port $WS_PORT"]
|
||||
@@ -0,0 +1,46 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-msgtransfer
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-msgtransfer /usr/bin/openim-msgtransfer
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then openim-msgtransfer -c $OPENIM_SERVER_CONFIG_NAME --prometheus_port $PROMETHEUS_PORT; else openim-msgtransfer -c $OPENIM_SERVER_CONFIG_NAME; fi"]
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
# docker run -e "PORT=10003" -e "PROMETHEUSORT=4321" --network host -it 67ef891ad1ff
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-push
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV PORT 10170 \
|
||||
PROMETHEUS_PORT 20170
|
||||
|
||||
EXPOSE 10170
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-push /usr/bin/openim-push
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then openim-push -c $OPENIM_SERVER_CONFIG_NAME --port $PORT --prometheus_port $PROMETHEUS_PORT; else openim-push -c $OPENIM_SERVER_CONFIG_NAME --port $PORT; fi"]
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-auth
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV PORT 10160 \
|
||||
PROMETHEUS_PORT 20160
|
||||
|
||||
EXPOSE 10160
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-auth /usr/bin/openim-rpc-auth
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-auth --port $PORT -c $OPENIM_SERVER_CONFIG_NAME" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-auth --port $PORT -c $OPENIM_SERVER_CONFIG_NAME"; fi"]
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-conversation
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV PORT 10230 \
|
||||
PROMETHEUS_PORT 20230
|
||||
|
||||
EXPOSE 10230
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-conversation /usr/bin/openim-rpc-conversation
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-conversation --port $PORT -c $OPENIM_SERVER_CONFIG_NAME" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-conversation --port $PORT -c $OPENIM_SERVER_CONFIG_NAME"; fi"]
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-friend
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV PORT 10120 \
|
||||
PROMETHEUS_PORT 20120
|
||||
|
||||
EXPOSE 10120
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-friend /usr/bin/openim-rpc-friend
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-friend --port $PORT -c $OPENIM_SERVER_CONFIG_NAME" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-friend --port $PORT -c $OPENIM_SERVER_CONFIG_NAME"; fi"]
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-group
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV PORT 10150 \
|
||||
PROMETHEUS_PORT 20150
|
||||
|
||||
EXPOSE 10150
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-group /usr/bin/openim-rpc-group
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-group --port $PORT -c $OPENIM_SERVER_CONFIG_NAME" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-group --port $PORT -c $OPENIM_SERVER_CONFIG_NAME"; fi"]
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-msg
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV PORT 10130 \
|
||||
PROMETHEUS_PORT 20130
|
||||
|
||||
EXPOSE 10130
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-msg /usr/bin/openim-rpc-msg
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-msg --port $PORT -c $OPENIM_SERVER_CONFIG_NAME" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-msg --port $PORT -c $OPENIM_SERVER_CONFIG_NAME"; fi"]
|
||||
@@ -0,0 +1,53 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-third
|
||||
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV PORT 10190 \
|
||||
PROMETHEUS_PORT 21301
|
||||
|
||||
EXPOSE 10190
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-third /usr/bin/openim-rpc-third
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-third --port $PORT -c $OPENIM_SERVER_CONFIG_NAME" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-third --port $PORT -c $OPENIM_SERVER_CONFIG_NAME"; fi"]
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-user
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV PORT 10110 \
|
||||
PROMETHEUS_PORT 20110
|
||||
|
||||
EXPOSE 10110
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-user /usr/bin/openim-rpc-user
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-user --port $PORT -c $OPENIM_SERVER_CONFIG_NAME" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-user --port $PORT -c $OPENIM_SERVER_CONFIG_NAME"; fi"]
|
||||
@@ -0,0 +1,49 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=component
|
||||
|
||||
# FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/tools /openim/openim-server/_output/bin/tools/
|
||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||
|
||||
ENV OPENIM_SERVER_CONFIG_NAME=/openim/openim-server/config
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/component /usr/bin/component
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "component -c $OPENIM_SERVER_CONFIG_NAME"]
|
||||
@@ -0,0 +1,57 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
RUN apt-get update && apt-get install -y curl unzip
|
||||
|
||||
RUN curl -LO https://app-1302656840.cos.ap-nanjing.myqcloud.com/dist.zip \
|
||||
&& unzip dist.zip -d ./ \
|
||||
&& rm dist.zip
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make clean
|
||||
RUN make build BINS=openim-web
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-ubuntu-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY --from=builder /openim/openim-server/_output/bin/tools /openim/openim-server/_output/bin/tools/
|
||||
COPY --from=builder /openim/openim-server/dist /openim/openim-server/dist
|
||||
|
||||
ENV PORT 11001
|
||||
ENV DISTPATH /openim/openim-server/dist
|
||||
|
||||
EXPOSE 11001
|
||||
|
||||
RUN mv ${OPENIM_SERVER_BINDIR}/tools/$(get_os)/$(get_arch)/openim-web /usr/bin/openim-web
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "openim-web -port $PORT -distPath $DISTPATH"]
|
||||
@@ -1,34 +0,0 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
NAME=openim-api
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
@@ -1,32 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM ubuntu
|
||||
|
||||
WORKDIR /Open-IM-Server/bin
|
||||
|
||||
RUN apt-get update && apt-get install apt-transport-https && apt-get install procps\
|
||||
&&apt-get install net-tools
|
||||
#Non-interactive operation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get install -y vim curl tzdata gawk
|
||||
#Time zone adjusted to East eighth District
|
||||
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
|
||||
COPY ./openim-api ./
|
||||
|
||||
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config"]
|
||||
|
||||
CMD ["./openim-api","--port", "10002"]
|
||||
@@ -26,14 +26,15 @@ import (
|
||||
|
||||
_ "net/http/pprof"
|
||||
|
||||
"github.com/OpenIMSDK/protocol/constant"
|
||||
"github.com/OpenIMSDK/tools/discoveryregistry"
|
||||
openkeeper "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper"
|
||||
"github.com/OpenIMSDK/tools/log"
|
||||
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/api"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
|
||||
"github.com/OpenIMSDK/tools/config"
|
||||
"github.com/OpenIMSDK/tools/constant"
|
||||
"github.com/OpenIMSDK/tools/discoveryregistry"
|
||||
openKeeper "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper"
|
||||
"github.com/OpenIMSDK/tools/log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -65,11 +66,11 @@ func run(port int) error {
|
||||
}
|
||||
fmt.Println("api start init discov client")
|
||||
var client discoveryregistry.SvcDiscoveryRegistry
|
||||
client, err = openKeeper.NewClient(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema,
|
||||
openKeeper.WithFreq(time.Hour), openKeeper.WithUserNameAndPassword(
|
||||
client, err = openkeeper.NewClient(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema,
|
||||
openkeeper.WithFreq(time.Hour), openkeeper.WithUserNameAndPassword(
|
||||
config.Config.Zookeeper.Username,
|
||||
config.Config.Zookeeper.Password,
|
||||
), openKeeper.WithRoundRobin(), openKeeper.WithTimeout(10), openKeeper.WithLogger(log.NewZkLogger()))
|
||||
), openkeeper.WithRoundRobin(), openkeeper.WithTimeout(10), openkeeper.WithLogger(log.NewZkLogger()))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
NAME=openim-cmdutils
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
@@ -1,34 +0,0 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
NAME=openim-crontask
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
@@ -1,32 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM ubuntu
|
||||
|
||||
WORKDIR /Open-IM-Server/bin
|
||||
|
||||
RUN apt-get update && apt-get install apt-transport-https && apt-get install procps\
|
||||
&&apt-get install net-tools
|
||||
#Non-interactive operation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get install -y vim curl tzdata gawk
|
||||
#Time zone adjusted to East eighth District
|
||||
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
|
||||
COPY ./openim-crontask ./
|
||||
|
||||
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config"]
|
||||
|
||||
CMD ["./openim-crontask"]
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
func main() {
|
||||
cronTaskCmd := cmd.NewCronTaskCmd()
|
||||
if err := cronTaskCmd.Exec(tools.StartCronTask); err != nil {
|
||||
if err := cronTaskCmd.Exec(tools.StartTask); err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
NAME=openim-rpc-msg_gateway
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
@@ -1,32 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM ubuntu
|
||||
|
||||
WORKDIR /Open-IM-Server/bin
|
||||
|
||||
RUN apt-get update && apt-get install apt-transport-https && apt-get install procps\
|
||||
&&apt-get install net-tools
|
||||
#Non-interactive operation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get install -y vim curl tzdata gawk
|
||||
#Time zone adjusted to East eighth District
|
||||
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
|
||||
COPY ./openim-rpc-msg_gateway ./
|
||||
|
||||
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config"]
|
||||
|
||||
CMD ["./openim-rpc-msg_gateway","--port", "10140" "--ws_port", "10001", "--prometheus_port", "20240"]
|
||||
@@ -1,34 +0,0 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
NAME=openim-msgtransfer
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
@@ -1,32 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM ubuntu
|
||||
|
||||
WORKDIR /Open-IM-Server/bin
|
||||
|
||||
RUN apt-get update && apt-get install apt-transport-https && apt-get install procps\
|
||||
&&apt-get install net-tools
|
||||
#Non-interactive operation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get install -y vim curl tzdata gawk
|
||||
#Time zone adjusted to East eighth District
|
||||
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
|
||||
COPY ./openim-msgtransfer ./
|
||||
|
||||
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config"]
|
||||
|
||||
CMD ["./openim-msgtransfer","--prometheus_port", "21400"]
|
||||
@@ -1,34 +0,0 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
NAME=openim-push
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
@@ -1,32 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM ubuntu
|
||||
|
||||
WORKDIR /Open-IM-Server/bin
|
||||
|
||||
RUN apt-get update && apt-get install apt-transport-https && apt-get install procps\
|
||||
&&apt-get install net-tools
|
||||
#Non-interactive operation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get install -y vim curl tzdata gawk
|
||||
#Time zone adjusted to East eighth District
|
||||
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
|
||||
COPY ./openim-push ./
|
||||
|
||||
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config"]
|
||||
|
||||
CMD ["./openim-push", "--port", "10170", "--prometheus_port", "20170"]
|
||||
@@ -17,7 +17,7 @@ package main
|
||||
import (
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/push"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/tools/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
NAME=openim-rpc-auth
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
@@ -1,32 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM ubuntu
|
||||
|
||||
WORKDIR /Open-IM-Server/bin
|
||||
|
||||
RUN apt-get update && apt-get install apt-transport-https && apt-get install procps\
|
||||
&&apt-get install net-tools
|
||||
#Non-interactive operation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get install -y vim curl tzdata gawk
|
||||
#Time zone adjusted to East eighth District
|
||||
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
|
||||
COPY ./openim-rpc-auth ./
|
||||
|
||||
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config"]
|
||||
|
||||
CMD ["./openim-rpc-auth", "--port", "10160"]
|
||||
@@ -17,7 +17,7 @@ package main
|
||||
import (
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/rpc/auth"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/tools/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
NAME=openim-rpc-conversation
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
@@ -1,32 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM ubuntu
|
||||
|
||||
WORKDIR /Open-IM-Server/bin
|
||||
|
||||
RUN apt-get update && apt-get install apt-transport-https && apt-get install procps\
|
||||
&&apt-get install net-tools
|
||||
#Non-interactive operation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get install -y vim curl tzdata gawk
|
||||
#Time zone adjusted to East eighth District
|
||||
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
|
||||
COPY ./openim-rpc-conversation ./
|
||||
|
||||
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config"]
|
||||
|
||||
CMD ["./openim-rpc-conversation", "--port", "10230", "--prometheus_port","20230"]
|
||||
@@ -17,7 +17,7 @@ package main
|
||||
import (
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/rpc/conversation"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/tools/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
NAME=openim-rpc-friend
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
@@ -1,32 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM ubuntu
|
||||
|
||||
WORKDIR /Open-IM-Server/bin
|
||||
|
||||
RUN apt-get update && apt-get install apt-transport-https && apt-get install procps\
|
||||
&&apt-get install net-tools
|
||||
#Non-interactive operation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get install -y vim curl tzdata gawk
|
||||
#Time zone adjusted to East eighth District
|
||||
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
|
||||
COPY ./openim-rpc-friend ./
|
||||
|
||||
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config"]
|
||||
|
||||
CMD ["./openim-rpc-friend", "--port", "10120", "--prometheus_port","20120"]
|
||||
@@ -17,7 +17,7 @@ package main
|
||||
import (
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/rpc/friend"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/tools/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
NAME=openim-rpc-group
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
OS:= $(or $(os),linux)
|
||||
ARCH:=$(or $(arch),amd64)
|
||||
all: gotool build
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
|
||||
BINARY_NAME=${NAME}.exe
|
||||
|
||||
else
|
||||
|
||||
BINARY_NAME=${NAME}
|
||||
|
||||
endif
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH}; go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user