mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 22:39:18 +08:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d70a98ee9a | |||
| 0675110e40 | |||
| f7ba123a6c | |||
| d411117b87 | |||
| c734270126 | |||
| 25c3518931 | |||
| 562e4f8322 | |||
| d857f6e7d1 | |||
| 049bc49c7f | |||
| a4dccb8504 | |||
| caae41500c | |||
| a1871558dd | |||
| 72c7d58777 |
@@ -2,7 +2,6 @@
|
||||
|
||||
# Ignore specific files
|
||||
.dockerignore
|
||||
.git
|
||||
|
||||
# Ignore build artifacts
|
||||
_output/
|
||||
|
||||
@@ -12,268 +12,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# ======================================
|
||||
# ========= 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
|
||||
|
||||
# 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
|
||||
MINIO_ENDPOINT=http://127.0.0.1:10005
|
||||
API_URL=http://14.153.17.42:10002
|
||||
DATA_DIR=/root/workspaces/openim/openim-server
|
||||
|
||||
@@ -1,17 +1,3 @@
|
||||
# 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
|
||||
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
# 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"
|
||||
# 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:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
|
||||
@@ -34,11 +34,11 @@ jobs:
|
||||
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-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.
|
||||
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.
|
||||
|
||||
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-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://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://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.
|
||||
|
||||
@@ -1,166 +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 OpenIM Web Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: "1.20"
|
||||
|
||||
jobs:
|
||||
build-openim-web-dockerhub:
|
||||
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
|
||||
|
||||
# docker.io/openim/openim-web:latest
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4.6.0
|
||||
with:
|
||||
images: openim/openim-web
|
||||
# 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: .
|
||||
file: ./build/images/openim-tools/openim-web/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
build-openim-web-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: .
|
||||
file: ./build/images/openim-tools/openim-web/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta2.outputs.tags }}
|
||||
labels: ${{ steps.meta2.outputs.labels }}
|
||||
|
||||
build-openim-web-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
|
||||
@@ -317,5 +317,4 @@ jobs:
|
||||
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
|
||||
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
@@ -36,14 +36,12 @@ jobs:
|
||||
|
||||
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.
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) to connect and communicate with our developers.
|
||||
|
||||
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.
|
||||
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) 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-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
|
||||
[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`.🎯
|
||||
|
||||
@@ -151,7 +151,7 @@ jobs:
|
||||
version: 2.x
|
||||
- name: Docker Operations
|
||||
run: |
|
||||
curl -o docker-compose.yml https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml
|
||||
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
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
- [ ] 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>
|
||||
<sub>[workflow](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/.github/workflows/pull-request.yml).</sub>
|
||||
base: main
|
||||
labels: |
|
||||
kind/documentation
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
workdir: .
|
||||
args: release -f ./build/goreleaser.yaml --clean --release-footer-tmpl=scripts/template/footer.md.tmpl --release-header-tmpl=scripts/template/head.md.tmpl
|
||||
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 }}
|
||||
|
||||
@@ -68,9 +68,7 @@ jobs:
|
||||
- name: verify format
|
||||
run: |
|
||||
sudo make format
|
||||
continue-on-error: true
|
||||
|
||||
- name: verify license
|
||||
run: |
|
||||
sudo make verify-copyright
|
||||
continue-on-error: true
|
||||
sudo make verify-copyright
|
||||
@@ -160,7 +160,6 @@ flycheck_*.el
|
||||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
vendor/
|
||||
tools/imctl
|
||||
|
||||
# Go workspace file
|
||||
# go.work
|
||||
|
||||
+2
-2
@@ -176,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/open-im-server
|
||||
prefix: github.com/OpenIMSDK/Open-IM-Server
|
||||
gocognit:
|
||||
# minimal code complexity to report, 30 by default (but we recommend 10-20)
|
||||
min-complexity: 30
|
||||
@@ -333,7 +333,7 @@ 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/open-im-server
|
||||
local-prefixes: github.com/OpenIMSDK/Open-IM-Server
|
||||
|
||||
gomnd:
|
||||
settings:
|
||||
|
||||
@@ -3,7 +3,7 @@ style: github
|
||||
template: CHANGELOG.tpl.md
|
||||
info:
|
||||
title: CHANGELOG
|
||||
repository_url: https://github.com/openimsdk/open-im-server
|
||||
repository_url: https://github.com/OpenIMSDK/Open-IM-Server
|
||||
options:
|
||||
tag_filter_pattern: '^v'
|
||||
sort: "date"
|
||||
|
||||
@@ -47,10 +47,10 @@
|
||||
- update
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/openimsdk/open-im-server/compare/v1.0.7...HEAD
|
||||
[v1.0.7]: https://github.com/openimsdk/open-im-server/compare/v1.0.6...v1.0.7
|
||||
[v1.0.6]: https://github.com/openimsdk/open-im-server/compare/v1.0.5...v1.0.6
|
||||
[v1.0.5]: https://github.com/openimsdk/open-im-server/compare/v1.0.4...v1.0.5
|
||||
[v1.0.4]: https://github.com/openimsdk/open-im-server/compare/v1.0.3...v1.0.4
|
||||
[v1.0.3]: https://github.com/openimsdk/open-im-server/compare/v1.0.1...v1.0.3
|
||||
[v1.0.1]: https://github.com/openimsdk/open-im-server/compare/v1.0.0...v1.0.1
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.7...HEAD
|
||||
[v1.0.7]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.6...v1.0.7
|
||||
[v1.0.6]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.5...v1.0.6
|
||||
[v1.0.5]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.4...v1.0.5
|
||||
[v1.0.4]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.3...v1.0.4
|
||||
[v1.0.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.1...v1.0.3
|
||||
[v1.0.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.0...v1.0.1
|
||||
|
||||
+12
-12
@@ -14,7 +14,7 @@
|
||||
<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))
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
@@ -74,14 +74,14 @@
|
||||
- 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
|
||||
[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
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<a name="v2.1.0"></a>
|
||||
## v2.1.0 - 2022-06-17
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/openimsdk/open-im-server/issues/206))
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
- friend modify
|
||||
- update
|
||||
|
||||
@@ -47,4 +47,4 @@
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/openimsdk/open-im-server/compare/v2.1.0...HEAD
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.1.0...HEAD
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<a name="v2.2.0"></a>
|
||||
## v2.2.0 - 2022-07-01
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/openimsdk/open-im-server/issues/206))
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
- friend modify
|
||||
- update
|
||||
|
||||
@@ -47,4 +47,4 @@
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/openimsdk/open-im-server/compare/v2.2.0...HEAD
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.2.0...HEAD
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<a name="v2.3.0-rc0"></a>
|
||||
## v2.3.0-rc0 - 2022-07-15
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/openimsdk/open-im-server/issues/206))
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
- friend modify
|
||||
- update
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
- Merge branch 'tuoyun'
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/openimsdk/open-im-server/compare/v2.3.3...HEAD
|
||||
[v2.3.3]: https://github.com/openimsdk/open-im-server/compare/v2.3.2...v2.3.3
|
||||
[v2.3.2]: https://github.com/openimsdk/open-im-server/compare/v2.3.0-rc2...v2.3.2
|
||||
[v2.3.0-rc2]: https://github.com/openimsdk/open-im-server/compare/v2.3.0-rc1...v2.3.0-rc2
|
||||
[v2.3.0-rc1]: https://github.com/openimsdk/open-im-server/compare/v2.3.0-rc0...v2.3.0-rc1
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.3...HEAD
|
||||
[v2.3.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.2...v2.3.3
|
||||
[v2.3.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc2...v2.3.2
|
||||
[v2.3.0-rc2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc1...v2.3.0-rc2
|
||||
[v2.3.0-rc1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc0...v2.3.0-rc1
|
||||
|
||||
@@ -38,15 +38,15 @@
|
||||
<a name="v2.9.0"></a>
|
||||
## v2.9.0 - 2023-07-04
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/openimsdk/open-im-server/issues/206))
|
||||
- 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/v2.9.0+1.839643f...HEAD
|
||||
[v2.9.0+1.839643f]: https://github.com/openimsdk/open-im-server/compare/v2.9.0+2.35f07fe...v2.9.0+1.839643f
|
||||
[v2.9.0+2.35f07fe]: https://github.com/openimsdk/open-im-server/compare/v2.9.0+1.b5072b1...v2.9.0+2.35f07fe
|
||||
[v2.9.0+1.b5072b1]: https://github.com/openimsdk/open-im-server/compare/v2.9.0+3.2667a3a...v2.9.0+1.b5072b1
|
||||
[v2.9.0+3.2667a3a]: https://github.com/openimsdk/open-im-server/compare/v2.9.0+7.04818ca...v2.9.0+3.2667a3a
|
||||
[v2.9.0+7.04818ca]: https://github.com/openimsdk/open-im-server/compare/v2.9.0...v2.9.0+7.04818ca
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0+1.839643f...HEAD
|
||||
[v2.9.0+1.839643f]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0+2.35f07fe...v2.9.0+1.839643f
|
||||
[v2.9.0+2.35f07fe]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0+1.b5072b1...v2.9.0+2.35f07fe
|
||||
[v2.9.0+1.b5072b1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0+3.2667a3a...v2.9.0+1.b5072b1
|
||||
[v2.9.0+3.2667a3a]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0+7.04818ca...v2.9.0+3.2667a3a
|
||||
[v2.9.0+7.04818ca]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0...v2.9.0+7.04818ca
|
||||
|
||||
+27
-27
@@ -47,7 +47,7 @@
|
||||
<a name="v2.9.0"></a>
|
||||
## [v2.9.0] - 2023-07-04
|
||||
### Reverts
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/openimsdk/open-im-server/issues/206))
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
@@ -85,7 +85,7 @@
|
||||
<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))
|
||||
- update etcd to v3.5.2 ([#206](https://github.com/OpenIMSDK/Open-IM-Server/issues/206))
|
||||
|
||||
### Pull Requests
|
||||
- Merge branch 'tuoyun'
|
||||
@@ -161,28 +161,28 @@
|
||||
- update
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/openimsdk/open-im-server/compare/v2.9.0...HEAD
|
||||
[v2.9.0]: https://github.com/openimsdk/open-im-server/compare/v2.3.3...v2.9.0
|
||||
[v2.3.3]: https://github.com/openimsdk/open-im-server/compare/v2.3.2...v2.3.3
|
||||
[v2.3.2]: https://github.com/openimsdk/open-im-server/compare/v2.3.0-rc2...v2.3.2
|
||||
[v2.3.0-rc2]: https://github.com/openimsdk/open-im-server/compare/v2.3.0-rc1...v2.3.0-rc2
|
||||
[v2.3.0-rc1]: https://github.com/openimsdk/open-im-server/compare/v2.3.0-rc0...v2.3.0-rc1
|
||||
[v2.3.0-rc0]: https://github.com/openimsdk/open-im-server/compare/v2.2.0...v2.3.0-rc0
|
||||
[v2.2.0]: https://github.com/openimsdk/open-im-server/compare/v2.1.0...v2.2.0
|
||||
[v2.1.0]: https://github.com/openimsdk/open-im-server/compare/v2.0.10...v2.1.0
|
||||
[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.7...v2.0.9
|
||||
[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
|
||||
[v2.0.0]: https://github.com/openimsdk/open-im-server/compare/v1.0.7...v2.0.0
|
||||
[v1.0.7]: https://github.com/openimsdk/open-im-server/compare/v1.0.6...v1.0.7
|
||||
[v1.0.6]: https://github.com/openimsdk/open-im-server/compare/v1.0.5...v1.0.6
|
||||
[v1.0.5]: https://github.com/openimsdk/open-im-server/compare/v1.0.4...v1.0.5
|
||||
[v1.0.4]: https://github.com/openimsdk/open-im-server/compare/v1.0.3...v1.0.4
|
||||
[v1.0.3]: https://github.com/openimsdk/open-im-server/compare/v1.0.1...v1.0.3
|
||||
[v1.0.1]: https://github.com/openimsdk/open-im-server/compare/v1.0.0...v1.0.1
|
||||
[Unreleased]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.9.0...HEAD
|
||||
[v2.9.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.3...v2.9.0
|
||||
[v2.3.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.2...v2.3.3
|
||||
[v2.3.2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc2...v2.3.2
|
||||
[v2.3.0-rc2]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc1...v2.3.0-rc2
|
||||
[v2.3.0-rc1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.3.0-rc0...v2.3.0-rc1
|
||||
[v2.3.0-rc0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.2.0...v2.3.0-rc0
|
||||
[v2.2.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.1.0...v2.2.0
|
||||
[v2.1.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v2.0.10...v2.1.0
|
||||
[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.7...v2.0.9
|
||||
[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
|
||||
[v2.0.0]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.7...v2.0.0
|
||||
[v1.0.7]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.6...v1.0.7
|
||||
[v1.0.6]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.5...v1.0.6
|
||||
[v1.0.5]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.4...v1.0.5
|
||||
[v1.0.4]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.3...v1.0.4
|
||||
[v1.0.3]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.1...v1.0.3
|
||||
[v1.0.1]: https://github.com/OpenIMSDK/Open-IM-Server/compare/v1.0.0...v1.0.1
|
||||
|
||||
+57
-14
@@ -2,18 +2,31 @@
|
||||
|
||||
<!-- 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.3-beta.1"></a>
|
||||
## [v3.1.3-beta.1] - 2023-08-14
|
||||
|
||||
<a name="v3.1.3"></a>
|
||||
## [v3.1.3] - 2023-08-14
|
||||
|
||||
<a name="v3.1.2-beta.3"></a>
|
||||
## [v3.1.2-beta.3] - 2023-08-09
|
||||
|
||||
@@ -26,19 +39,49 @@
|
||||
<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))
|
||||
- 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.3-beta.1...HEAD
|
||||
[v3.1.3-beta.1]: https://github.com/openimsdk/open-im-server/compare/v3.1.3...v3.1.3-beta.1
|
||||
[v3.1.3]: https://github.com/openimsdk/open-im-server/compare/v3.1.2-beta.3...v3.1.3
|
||||
[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.0...v3.1.2-beta.0
|
||||
[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
|
||||
|
||||
@@ -8,21 +8,6 @@
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
<a name="v3.2.2"></a>
|
||||
## [v3.2.2] - 2023-09-03
|
||||
|
||||
<a name="v3.2.3"></a>
|
||||
## [v3.2.3] - 2023-09-03
|
||||
|
||||
<a name="v3.2.1"></a>
|
||||
## [v3.2.1] - 2023-09-03
|
||||
|
||||
<a name="v3.2.2-beta.4"></a>
|
||||
## [v3.2.2-beta.4] - 2023-08-28
|
||||
|
||||
<a name="v3.2.2-alpha.0"></a>
|
||||
## [v3.2.2-alpha.0] - 2023-08-25
|
||||
|
||||
<a name="v3.2.2-beta.3"></a>
|
||||
## [v3.2.2-beta.3] - 2023-08-22
|
||||
|
||||
@@ -44,21 +29,16 @@
|
||||
<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))
|
||||
- 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...HEAD
|
||||
[v3.2.2]: https://github.com/openimsdk/open-im-server/compare/v3.2.3...v3.2.2
|
||||
[v3.2.3]: https://github.com/openimsdk/open-im-server/compare/v3.2.1...v3.2.3
|
||||
[v3.2.1]: https://github.com/openimsdk/open-im-server/compare/v3.2.2-beta.4...v3.2.1
|
||||
[v3.2.2-beta.4]: https://github.com/openimsdk/open-im-server/compare/v3.2.2-alpha.0...v3.2.2-beta.4
|
||||
[v3.2.2-alpha.0]: https://github.com/openimsdk/open-im-server/compare/v3.2.2-beta.3...v3.2.2-alpha.0
|
||||
[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
|
||||
[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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
+ [https://github.com/openimsdk/open-im-server/releases](https://github.com/openimsdk/open-im-server/releases)
|
||||
+ [https://github.com/OpenIMSDK/Open-IM-Server/releases](https://github.com/OpenIMSDK/Open-IM-Server/releases)
|
||||
|
||||
## OpenIM versioning policy
|
||||
|
||||
@@ -44,7 +44,7 @@ $ git-chglog --init
|
||||
|
||||
**Options**
|
||||
|
||||
- What is the URL of your repository?: https://github.com/openimsdk/open-im-server
|
||||
- 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
|
||||
@@ -89,9 +89,9 @@ $ git-chglog --config custom/dir/config.yml
|
||||
## create next tag
|
||||
|
||||
```bash
|
||||
$ git-chglog --next-tag 2.0.0 -o CHANGELOG.md
|
||||
$ git commit -am "release 2.0.0"
|
||||
$ git tag 2.0.0
|
||||
git-chglog --next-tag 2.0.0 -o CHANGELOG.md
|
||||
git commit -am "release 2.0.0"
|
||||
git tag 2.0.0
|
||||
```
|
||||
|
||||
| Query | Description | Example |
|
||||
@@ -112,9 +112,6 @@ $ git tag 2.0.0
|
||||
+ [OpenIM CHANGELOG-V2.9](CHANGELOG-2.9.md)
|
||||
+ [OpenIM CHANGELOG-V3.0](CHANGELOG-3.0.md)
|
||||
+ [OpenIM CHANGELOG-V3.1](CHANGELOG-3.1.md)
|
||||
+ [OpenIM CHANGELOG-V3.2](CHANGELOG-3.2.md)
|
||||
+ [OpenIM CHANGELOG-V3.3](CHANGELOG-3.3.md)
|
||||
|
||||
|
||||
## Introduction
|
||||
|
||||
@@ -124,7 +121,7 @@ In both the open-source and closed-source software development communities, it i
|
||||
|
||||
The most common format for version numbers is as follows:
|
||||
|
||||
```bash
|
||||
```
|
||||
major.minor[.patch[.build]]
|
||||
```
|
||||
|
||||
|
||||
+20
-20
@@ -46,7 +46,7 @@ The [Makefile](./Makefile) is for every developer, even if you don't know how to
|
||||
|
||||
#### Code and doc contribution
|
||||
|
||||
Every action to make project Open-IM-Server better is encouraged. On GitHub, every improvement for Open-IM-Server could be via a [PR](https://github.com/openimsdk/open-im-server/pulls) (short for pull request).
|
||||
Every action to make project Open-IM-Server better is encouraged. On GitHub, every improvement for Open-IM-Server could be via a [PR](https://github.com/OpenIMSDK/Open-IM-Server/pulls) (short for pull request).
|
||||
|
||||
+ If you find a typo, try to fix it!
|
||||
+ If you find a bug, try to fix it!
|
||||
@@ -61,18 +61,18 @@ Every action to make project Open-IM-Server better is encouraged. On GitHub, eve
|
||||
|
||||
#### Where should I start?
|
||||
|
||||
+ If you are new to the project, don't know how to contribute Open-IM-Server, please check out the [good first issue](https://github.com/openimsdk/open-im-server/issues?q=is%3Aopen+label%3A"good+first+issue"+sort%3Aupdated-desc) label.
|
||||
+ You should be good at filtering the Open-IM-Server issue tags and finding the ones you like, such as [RFC](https://github.com/openimsdk/open-im-server/issues?q=is%3Aissue+is%3Aopen+RFC+label%3ARFC) for big initiatives, features for [feature](https://github.com/openimsdk/open-im-server/issues?q=is%3Aissue+label%3Afeature) proposals, and [bug](https://github.com/openimsdk/open-im-server/issues?q=is%3Aissue+label%3Abug+) fixes.
|
||||
+ If you are looking for something to work on, check out our [open issues](https://github.com/openimsdk/open-im-server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc).
|
||||
+ If you have an idea for a new feature, please [open an issue](https://github.com/openimsdk/open-im-server/issues/new/choose), and we can discuss it.
|
||||
+ If you are new to the project, don't know how to contribute Open-IM-Server, please check out the [good first issue](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aopen+label%3A"good+first+issue"+sort%3Aupdated-desc) label.
|
||||
+ You should be good at filtering the Open-IM-Server issue tags and finding the ones you like, such as [RFC](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+RFC+label%3ARFC) for big initiatives, features for [feature](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+label%3Afeature) proposals, and [bug](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+label%3Abug+) fixes.
|
||||
+ If you are looking for something to work on, check out our [open issues](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc).
|
||||
+ If you have an idea for a new feature, please [open an issue](https://github.com/OpenIMSDK/Open-IM-Server/issues/new/choose), and we can discuss it.
|
||||
|
||||
#### Design documents
|
||||
|
||||
For any substantial design, there should be a well-crafted design document. This document is not just a simple record, but also a detailed description and manifestation, which can help team members better understand the design thinking and grasp the design direction. In the process of writing the design document, we can choose to use tools such as `Google Docs` or `Notion`, and even mark RFC in [issues](https://github.com/openimsdk/open-im-server/issues?q=is%3Aissue+is%3Aopen+RFC+label%3ARFC) or [discussions](https://github.com/openimsdk/open-im-server/discussions) for better collaboration. Of course, after completing the design document, we should also add it to our [Shared Drive](https://drive.google.com/drive/) and notify the appropriate working group to let everyone know of its existence. Only by doing so can we maximize the effectiveness of the design document and provide strong support for the smooth progress of the project.
|
||||
For any substantial design, there should be a well-crafted design document. This document is not just a simple record, but also a detailed description and manifestation, which can help team members better understand the design thinking and grasp the design direction. In the process of writing the design document, we can choose to use tools such as `Google Docs` or `Notion`, and even mark RFC in [issues](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+RFC+label%3ARFC) or [discussions](https://github.com/OpenIMSDK/Open-IM-Server/discussions) for better collaboration. Of course, after completing the design document, we should also add it to our [Shared Drive](https://drive.google.com/drive/) and notify the appropriate working group to let everyone know of its existence. Only by doing so can we maximize the effectiveness of the design document and provide strong support for the smooth progress of the project.
|
||||
|
||||
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-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) 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-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) 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:
|
||||
|
||||
@@ -81,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-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) on the working group's Slack channel.
|
||||
+ 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.
|
||||
+ 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.
|
||||
|
||||
@@ -95,10 +95,10 @@ To propose PR for the Open-IM-Server item, we assume you have registered a GitHu
|
||||
|
||||
2. **CLONE** your own repository to main locally. Use `git clone https://github.com/<your-username>/Open-IM-Server.git` to clone repository to your local machine. Then you can create new branches to finish the change you wish to make.
|
||||
|
||||
3. **Set Remote** upstream to be `https://github.com/openimsdk/open-im-server.git` using the following two commands:
|
||||
3. **Set Remote** upstream to be `https://github.com/OpenIMSDK/Open-IM-Server.git` using the following two commands:
|
||||
|
||||
```bash
|
||||
❯ git remote add upstream https://github.com/openimsdk/open-im-server.git
|
||||
❯ git remote add upstream https://github.com/OpenIMSDK/Open-IM-Server.git
|
||||
❯ git remote set-url --push upstream no-pushing
|
||||
```
|
||||
|
||||
@@ -108,7 +108,7 @@ To propose PR for the Open-IM-Server item, we assume you have registered a GitHu
|
||||
❯ git remote -v
|
||||
origin https://github.com/<your-username>/Open-IM-Server.git (fetch)
|
||||
origin https://github.com/<your-username>/Open-IM-Server.git (push)
|
||||
upstream https://github.com/openimsdk/open-im-server.git (fetch)
|
||||
upstream https://github.com/OpenIMSDK/Open-IM-Server.git (fetch)
|
||||
upstream no-pushing (push)
|
||||
```
|
||||
|
||||
@@ -174,7 +174,7 @@ To propose PR for the Open-IM-Server item, we assume you have registered a GitHu
|
||||
# then create pull request, and merge
|
||||
```
|
||||
|
||||
7. **Open a pull request** to `openimsdk/open-im-server:main`
|
||||
7. **Open a pull request** to `OpenIMSDK/Open-IM-Server:main`
|
||||
|
||||
It is recommended to review your changes before filing a pull request. Check if your code doesn't conflict with the main branch and no redundant code is included.
|
||||
|
||||
@@ -190,7 +190,7 @@ Instead we encourage you to send us a private email to winxu81@gmail.com to repo
|
||||
|
||||
#### Reporting general issues
|
||||
|
||||
To be honest, we regard every user of Open-IM-Serveras a very kind contributor. After experiencing Open-IM-Server, you may have some feedback for the project. Then feel free to open an issue via [NEW ISSUE](https://github.com/openimsdk/open-im-server/issues/new/choose).
|
||||
To be honest, we regard every user of Open-IM-Serveras a very kind contributor. After experiencing Open-IM-Server, you may have some feedback for the project. Then feel free to open an issue via [NEW ISSUE](https://github.com/OpenIMSDK/Open-IM-Server/issues/new/choose).
|
||||
|
||||
Since we collaborate project Open-IM-Server in a distributed way, we appreciate **WELL-WRITTEN**, **DETAILED**, **EXPLICIT** issue reports. To make the communication more efficient, we wish everyone could search if your issue is an existing one in the searching list. If you find it existing, please add your details in comments under the existing issue instead of opening a brand new one.
|
||||
|
||||
@@ -258,7 +258,7 @@ An example for this could be:
|
||||
|
||||
PR is the only way to make change to Open-IM-Server project files. To help reviewers better get your purpose, PR description could not be too detailed. We encourage contributors to follow the [PR template](https://github.com/OpenIMSDK/.github/tree/main/.github/PULL_REQUEST_TEMPLATE.md) to finish the pull request.
|
||||
|
||||
You can find some very formal PR in [RFC](https://github.com/openimsdk/open-im-server/issues?q=is%3Aissue+is%3Aopen+RFC+label%3ARFC) issues and learn about them.
|
||||
You can find some very formal PR in [RFC](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+RFC+label%3ARFC) issues and learn about them.
|
||||
|
||||
**📖 Opening PRs:**
|
||||
|
||||
@@ -307,8 +307,8 @@ git() {
|
||||
|
||||
The documentation for Open-IM-Server includes:
|
||||
|
||||
+ [README.md](https://github.com/openimsdk/open-im-server/blob/main/README.md): This file includes the basic information and instructions for getting started with Open-IM-Server.
|
||||
+ [CONTRIBUTING.md](https://github.com/openimsdk/open-im-server/blob/main/CONTRIBUTING.md): This file contains guidelines for contributing to Open-IM-Server's codebase, such as how to submit issues, pull requests, and code reviews.
|
||||
+ [README.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/README.md): This file includes the basic information and instructions for getting started with Open-IM-Server.
|
||||
+ [CONTRIBUTING.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md): This file contains guidelines for contributing to Open-IM-Server's codebase, such as how to submit issues, pull requests, and code reviews.
|
||||
+ [Official Documentation](https://doc.rentsoft.cn/): This is the official documentation for Open-IM-Server, which includes comprehensive information on all of its features, configuration options, and troubleshooting tips.
|
||||
|
||||
Please obey the following rules to better format the docs, which would greatly improve the reading experience.
|
||||
@@ -324,9 +324,9 @@ Please obey the following rules to better format the docs, which would greatly i
|
||||
|
||||
We choose GitHub as the primary place for Open-IM-Server to collaborate. So the latest updates of Open-IM-Server are always here. Although contributions via PR is an explicit way to help, we still call for any other ways.
|
||||
|
||||
+ reply to other's [issues](https://github.com/openimsdk/open-im-server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) if you could;
|
||||
+ reply to other's [issues](https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) if you could;
|
||||
+ help solve other user's problems;
|
||||
+ help review other's [PR](https://github.com/openimsdk/open-im-server/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) design;
|
||||
+ help review other's [PR](https://github.com/OpenIMSDK/Open-IM-Server/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) design;
|
||||
+ discuss about Open-IM-Server to make things clearer;
|
||||
+ advocate [Open-IM-Server](https://google.com/search?q=Open-IM-Server) technology beyond GitHub;
|
||||
+ write blogs on Open-IM-Server and so on.
|
||||
@@ -364,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-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.
|
||||
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.
|
||||
|
||||
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-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://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.
|
||||
|
||||
+4
-4
@@ -10,8 +10,8 @@ ENV GOPROXY=$GOPROXY
|
||||
# Set up the working directory
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY go.mod go.sum go.work ./
|
||||
#RUN go mod download
|
||||
|
||||
# Copy all files to the container
|
||||
ADD . .
|
||||
@@ -25,7 +25,7 @@ WORKDIR ${SERVER_WORKDIR}
|
||||
|
||||
# Copy scripts and binary files to the production image
|
||||
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
|
||||
COPY --from=builder ${OPENIM_SERVER_CMDDIR} /openim/openim-server/scripts
|
||||
COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
|
||||
|
||||
CMD ["/openim/openim-server/scripts/docker-start-all.sh"]
|
||||
|
||||
@@ -11,9 +11,9 @@ 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 https://github.com/openimsdk/open-im-server/issues/574
|
||||
VERSION_PACKAGE=github.com/openimsdk/open-im-server/v3/pkg/version
|
||||
ROOT_PACKAGE=github.com/OpenIMSDK/Open-IM-Server
|
||||
# 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
|
||||
|
||||
# ==============================================================================
|
||||
# Includes
|
||||
@@ -58,16 +58,6 @@ export USAGE_OPTIONS
|
||||
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:
|
||||
@@ -112,7 +102,7 @@ install:
|
||||
check:
|
||||
@$(MAKE) go.check
|
||||
|
||||
## check-component: Check OpenIM component deployment ✨
|
||||
## check-component
|
||||
.PHONY: check-component
|
||||
check-component:
|
||||
@$(MAKE) go.check-component
|
||||
@@ -200,6 +190,11 @@ push.multiarch:
|
||||
tools:
|
||||
@$(MAKE) tools.install
|
||||
|
||||
## gen: Generate all necessary files. ✨
|
||||
.PHONY: gen
|
||||
gen:
|
||||
@$(MAKE) gen.run
|
||||
|
||||
## swagger: Generate swagger document. ✨
|
||||
.PHONY: swagger
|
||||
swagger:
|
||||
|
||||
+46
-46
@@ -10,11 +10,11 @@
|
||||
|
||||
|
||||
<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-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://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-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>
|
||||
|
||||
@@ -99,9 +99,9 @@ Open-IM-Server 不仅仅是一个即时消息服务器;它是将实时网络
|
||||
|
||||
9. **终极部署体验 🤖**
|
||||
|
||||
✅ 支持 [集群部署](https://github.com/openimsdk/open-im-server/edit/main/deployments/README.md)
|
||||
✅ 支持 [集群部署](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) 以获取更多信息。
|
||||
✅ 支持多架构镜像,我们的 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. **开源社区的大生态系统 🤲**
|
||||
|
||||
@@ -116,17 +116,17 @@ Open-IM-Server 不仅仅是一个即时消息服务器;它是将实时网络
|
||||
1. 克隆项目
|
||||
|
||||
```
|
||||
# 选择您需要的
|
||||
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
|
||||
git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build
|
||||
```
|
||||
|
||||
> **注意** 阅读我们的发布策略:https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md
|
||||
> **注意** 阅读我们的发布策略:https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
||||
|
||||
1. 修改 `.env`
|
||||
|
||||
```
|
||||
USER=root #无需修改
|
||||
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和端口或域名,
|
||||
@@ -138,38 +138,38 @@ DATA_DIR=./ #指定大磁盘目录
|
||||
> **注意** 此命令只能执行一次。它会基于 `.env` 中的 `PASSWORD` 变量修改 docker-compose 中的组件密码,并修改 `config/config.yaml` 中的组件密码。如果 `.env` 中的密码发生变化,您需要首先执行 `docker-compose down`;`rm components -rf` 然后执行此命令。
|
||||
|
||||
```
|
||||
|
||||
bashCopy code
|
||||
make install
|
||||
```
|
||||
|
||||
1. 检查服务
|
||||
|
||||
```
|
||||
|
||||
bashCopy code
|
||||
make check
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
</details> <details> <summary>从源码编译</summary>
|
||||
|
||||
您需要 `Go 1.18` 或更高版本,以及 `make`。
|
||||
|
||||
版本详情:https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md
|
||||
版本详情:https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
||||
|
||||
```
|
||||
# 选择您需要的
|
||||
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
|
||||
git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build
|
||||
```
|
||||
|
||||
阅读关于 [OpenIM 版本策略](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md)
|
||||
阅读关于 [OpenIM 版本策略](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)
|
||||
|
||||
使用 `make help` 来查看 OpenIM 支持的指令。
|
||||
|
||||
如图所示,所有服务已成功构建
|
||||
|
||||

|
||||

|
||||
|
||||
</details> <details> <summary>组件配置说明</summary>
|
||||
|
||||
@@ -180,7 +180,7 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。
|
||||
- 用于 RPC 服务发现和注册,支持集群。
|
||||
|
||||
```
|
||||
zookeeper:
|
||||
bashCopy codezookeeper:
|
||||
schema: openim #不建议修改
|
||||
address: [ 127.0.0.1:2181 ] #地址
|
||||
username: #用户名
|
||||
@@ -192,7 +192,7 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。
|
||||
- 用于存储用户、关系和群组,支持主从数据库。
|
||||
|
||||
```
|
||||
mysql:
|
||||
bashCopy codemysql:
|
||||
address: [ 127.0.0.1:13306 ] #地址
|
||||
username: root #用户名
|
||||
password: openIM123 #密码
|
||||
@@ -209,7 +209,7 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。
|
||||
- 用于存储离线消息,支持 mongo 分片集群。
|
||||
|
||||
```
|
||||
mongo:
|
||||
bashCopy codemongo:
|
||||
uri: #如果不为空,则直接使用此值
|
||||
address: [ 127.0.0.1:37017 ] #地址
|
||||
database: openIM #默认 mongo 数据库
|
||||
@@ -223,7 +223,7 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。
|
||||
- 用于存储消息序列号、最新消息、用户令牌和 mysql 缓存,支持集群部署。
|
||||
|
||||
```
|
||||
redis:
|
||||
bashCopy coderedis:
|
||||
address: [ 127.0.0.1:16379 ] #地址
|
||||
username: #用户名
|
||||
password: openIM123 #密码
|
||||
@@ -234,7 +234,7 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。
|
||||
- 用于消息队列,用于消息解耦,支持集群部署。
|
||||
|
||||
```
|
||||
kafka:
|
||||
bashCopy codekafka:
|
||||
username: #用户名
|
||||
password: #密码
|
||||
addr: [ 127.0.0.1:9092 ] #地址
|
||||
@@ -259,21 +259,21 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。
|
||||
启动服务
|
||||
|
||||
```
|
||||
|
||||
bashCopy code
|
||||
./scripts/start-all.sh;
|
||||
```
|
||||
|
||||
检查服务
|
||||
|
||||
```
|
||||
|
||||
bashCopy code
|
||||
./scripts/check-all.sh
|
||||
```
|
||||
|
||||
停止服务
|
||||
|
||||
```
|
||||
|
||||
bashCopy code
|
||||
./scripts/stop-all.sh
|
||||
```
|
||||
|
||||
@@ -302,56 +302,56 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。
|
||||
|
||||
OpenIM 不仅仅是一个开源的即时消息组件,它是您的应用程序生态系统的一个不可分割的部分。查看此图表以了解 AppServer、AppClient、Open-IM-Server 和 Open-IM-SDK 如何互动。
|
||||
|
||||

|
||||

|
||||
|
||||
## :building_construction: 总体架构
|
||||
|
||||
深入了解 Open-IM-Server 的功能与我们的架构图。
|
||||
|
||||

|
||||

|
||||
|
||||
## :hammer_and_wrench: 开始开发 OpenIM
|
||||
|
||||
OpenIM 我们的目标是建立一个顶级的开源社区。我们有一套标准,在 [Community repository](https://github.com/OpenIMSDK/community) 中。
|
||||
|
||||
如果您想为这个 Open-IM-Server 仓库做贡献,请阅读我们的 [贡献者文档](https://github.com/openimsdk/open-im-server/blob/main/CONTRIBUTING.md)。
|
||||
如果您想为这个 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)。
|
||||
在您开始之前,请确保您的更改是需要的。最好的方法是创建一个 [新的讨论](https://github.com/OpenIMSDK/Open-IM-Server/discussions/new/choose) 或 [Slack 通讯](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg),或者如果您发现一个问题,首先 [报告它](https://github.com/OpenIMSDK/Open-IM-Server/issues/new/choose)。
|
||||
|
||||
- [代码标准](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/)
|
||||
- [错误代码标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/error_code.md)
|
||||
- [代码标准](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)
|
||||
|
||||
## :busts_in_silhouette: 社区
|
||||
|
||||
- 📚 [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)
|
||||
- 🚀 [加入我们的 Slack 社区](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg)
|
||||
- :eyes: [加入我们的微信群 (微信群)](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
|
||||
|
||||
## :calendar: 社区会议
|
||||
|
||||
我们希望任何人都可以参与我们的社区并贡献代码,我们提供礼物和奖励,欢迎您每周四晚上加入我们。
|
||||
|
||||
我们的会议在 [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) 🎯,然后您可以搜索 Open-IM-Server 管道加入。
|
||||
我们的会议在 [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) 🎯,然后您可以搜索 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) 中找到。
|
||||
我们在 [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) 并分享您的使用案例。
|
||||
查看我们的 [用户案例研究](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 根据 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) 目录中显示,受版权法保护。
|
||||
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>
|
||||
<a href="https://github.com/OpenIMSDK/Open-IM-Server/graphs/contributors"> <img src="https://contrib.rocks/image?repo=OpenIMSDK/Open-IM-Server" /> </a>
|
||||
@@ -10,13 +10,12 @@
|
||||
|
||||
|
||||
<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-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://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-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>
|
||||
<a href="https://pkg.go.dev/github.com/openimsdk/open-im-server/v3"><img src="https://pkg.go.dev/badge/github.com/openimsdk/open-im-server/v3.svg" alt="Go Reference"></a>
|
||||
</p>
|
||||
|
||||
</p>
|
||||
@@ -82,7 +81,7 @@ Further enhancing your experience, we also provide an SDK client, wherein most c
|
||||
|
||||
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](https://github.com/OpenIMSDK), including [client SDK](https://github.com/openimsdk/openim-sdk-core) and server
|
||||
✅ 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)
|
||||
|
||||
@@ -100,9 +99,9 @@ Further enhancing your experience, we also provide an SDK client, wherein most c
|
||||
|
||||
9. **The ultimate deployment experience 🤖**
|
||||
|
||||
✅ Supports [cluster deployment](https://github.com/openimsdk/open-im-server/edit/main/deployments/README.md)
|
||||
✅ 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.
|
||||
✅ 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 🤲**
|
||||
|
||||
@@ -112,7 +111,7 @@ Further enhancing your experience, we also provide an SDK client, wherein most c
|
||||
|
||||
## :rocket: Quick Start
|
||||
|
||||
You can quickly learn OpenIM engineering solutions, all it takes is one simple command:
|
||||
You can quickly learn OpenIM engineering solutions, all it takes is one simple command:
|
||||
|
||||
```bash
|
||||
$ make demo
|
||||
@@ -120,19 +119,67 @@ $ make demo
|
||||
|
||||
🤲 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:
|
||||
|
||||
> [ !TIP ] Due to some issues with the release-v3.3 deployment, linux deployment requires the root user to deploy the entire deployment
|
||||
<details> <summary>Deploying with Docker Compose</summary>
|
||||
|
||||
<details> <summary>Deploying with Docker Compose</summary>
|
||||
|
||||
It is recommended to use Docker Compose for deployment, which can easily and quickly deploy the entire OpenIM service on a single node
|
||||
> 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.
|
||||
|
||||
+ [https://github.com/openimsdk/openim-docker](https://github.com/openimsdk/openim-docker)
|
||||
**1. Clone the project**
|
||||
|
||||
|
||||
```bash
|
||||
# choose what you need, We take branch 3.2 as an example
|
||||
$ BRANCH=release-v3.2
|
||||
$ git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim/openim-server && export openim_dir=$(pwd)/openim && cd ${openim_dir}/openim-server
|
||||
```
|
||||
|
||||
> **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
|
||||
|
||||
|
||||
|
||||
**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
|
||||
|
||||
```bash
|
||||
$ make init
|
||||
$ git diff
|
||||
```
|
||||
|
||||
Then feel free to modify your current config file, you can also modify `/scripts/install/environment.sh` document template, `make init` is essentially rendering `environment.sh` template, and then through the `make init` to automatically generate a new configuration.
|
||||
|
||||
If you only need to change the config file for a short time, or if you don't want to make any major changes in the future, you can modify the `.env file directly
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
**3. 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
|
||||
> You can deploy either directly with `make install` or with `docker compose up`, the logic is the same
|
||||
|
||||
```bash
|
||||
$ make install
|
||||
# OR
|
||||
$ docker-compose up
|
||||
```
|
||||
|
||||
4. Check the service
|
||||
|
||||
```bash
|
||||
$ make check
|
||||
```
|
||||
|
||||
Looking at the command line at this point, there are two items in the output, checking for the start of the component port that OpenIM depends on, and the start of the OpenIM core component
|
||||
|
||||
</details>
|
||||
|
||||
@@ -146,55 +193,122 @@ Ur need `Go 1.18` or higher version, and `make`.
|
||||
go version && make --version || echo "Error: One of the commands failed."
|
||||
```
|
||||
|
||||
Version Details: https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md
|
||||
|
||||
You can get the version number from the command below or from [github releases](https://github.com/openimsdk/open-im-server/tags).
|
||||
Version Details: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
|
||||
|
||||
```bash
|
||||
$ curl --silent "https://api.github.com/repos/openimsdk/open-im-server/releases" | jq -r '.[].tag_name'
|
||||
```
|
||||
|
||||
We have our own version management policy, if you are interested in our version management, I recommend reading [📚 OpenIM Version](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md), We recommend using stable versions such as `v3.3.0` and `v3.2.0` whenever possible. `v3.1.1-alpha.3` as well as `v3.3.0-beta.0` and `v3.2.0-rc.0` are pre-release or beta versions and are not recommended.
|
||||
|
||||
Set `OPENIM_VERSION` environment variables for the latest `OPENIM_VERSION` number, or replace the `OPENIM_VERSION` for you to install the OpenIM-Server `OPENIM_VERSION`:
|
||||
|
||||
```bash
|
||||
$ OPENIM_VERSION=`curl -s https://api.github.com/repos/openimsdk/open-im-server/releases/latest | grep -oE '"tag_name": "[^"]+"' | head -n1 | cut -d'"' -f4`
|
||||
# OPENIM_VERSION=v3.3.0
|
||||
```
|
||||
|
||||
Deploy basic components at the click of a command:
|
||||
|
||||
```bash
|
||||
# install openim dependency
|
||||
$ git clone https://github.com/openimsdk/open-im-server openim/openim-server && export openim=$(pwd)/openim/openim-server && cd $openim/openim-server && git checkout $OPENIM_VERSION
|
||||
$ make init && docker compose up -d && make start && make check
|
||||
# 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.
|
||||
|
||||
Use `make check` to check all component starts
|
||||
|
||||
```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.
|
||||
|
||||
Read: Configuration center document:https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md
|
||||
|
||||
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
|
||||
username: #username
|
||||
password: #password
|
||||
```
|
||||
|
||||
- MySQL
|
||||
|
||||
- Used for storing users, relationships, and groups, supports master-slave database.
|
||||
|
||||
```bash
|
||||
mysql:
|
||||
address: [ 127.0.0.1:13306 ] #address
|
||||
username: root #username
|
||||
password: openIM123 #password
|
||||
database: openIM_v2 #Not recommended to modify
|
||||
maxOpenConn: 1000 #maximum connection
|
||||
maxIdleConn: 100 #maximum idle connection
|
||||
maxLifeTime: 60 #maximum time a connection can be reused (seconds)
|
||||
logLevel: 4 #log level 1=slient 2=error 3=warn 4=info
|
||||
slowThreshold: 500 #slow statement threshold (milliseconds)
|
||||
```
|
||||
|
||||
- Mongo
|
||||
|
||||
- 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
|
||||
database: openIM #default mongo db
|
||||
username: root #username
|
||||
password: openIM123 #password
|
||||
maxPoolSize: 100 #maximum connections
|
||||
```
|
||||
|
||||
- Redis
|
||||
|
||||
- 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
|
||||
password: openIM123 #password
|
||||
```
|
||||
|
||||
- Kafka
|
||||
|
||||
- Used for message queues, for message decoupling, supports cluster deployment.
|
||||
|
||||
```bash
|
||||
kafka:
|
||||
username: #username
|
||||
password: #password
|
||||
addr: [ 127.0.0.1:9092 ] #address
|
||||
latestMsgToRedis:
|
||||
topic: "latestMsgToRedis"
|
||||
offlineMsgToMongo:
|
||||
topic: "offlineMsgToMongoMysql"
|
||||
msgToPush:
|
||||
topic: "msqToPush"
|
||||
msgToModify:
|
||||
topic: "msgToModify"
|
||||
consumerGroupID:
|
||||
msgToRedis: redis
|
||||
msgToMongo: mongo
|
||||
msgToMySql: mysql
|
||||
msgToPush: push
|
||||
msgToModify: modify
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<details> <summary>Deployed with kubernetes</summary>
|
||||
|
||||
|
||||
Read: https://github.com/openimsdk/open-im-server/blob/main/deployments/README.md
|
||||
read: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployments/README.md
|
||||
|
||||
</details>
|
||||
|
||||
<details> <summary>Open IM and Chat Ports</summary>
|
||||
<details> <summary>Open IM Ports</summary>
|
||||
|
||||
+ oepnim-server warehouse: https://github.com/openimsdk/open-im-server
|
||||
|
||||
| TCP Port | Description | Operation |
|
||||
| --------- | ------------------------------------------------------------ | ----------------------------------------------------- |
|
||||
@@ -202,6 +316,10 @@ Read: https://github.com/openimsdk/open-im-server/blob/main/deployments/README.m
|
||||
| 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 |
|
||||
|
||||
</details>
|
||||
|
||||
<details> <summary>Open Chat Ports</summary>
|
||||
|
||||
|
||||
+ chat warehouse: https://github.com/OpenIMSDK/chat
|
||||
|
||||
@@ -217,58 +335,58 @@ Read: https://github.com/openimsdk/open-im-server/blob/main/deployments/README.m
|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
## :building_construction: Overall Architecture
|
||||
|
||||
Delve into the heart of Open-IM-Server's functionality with our architecture diagram.
|
||||
|
||||

|
||||

|
||||
|
||||
## :hammer_and_wrench: To start developing OpenIM
|
||||
|
||||
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).
|
||||
|
||||
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).
|
||||
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.
|
||||
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-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg), 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/logging.md)
|
||||
- [Error Code Standards](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/error_code.md)
|
||||
- [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)
|
||||
+ 🚀 [Join our Slack community](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg)
|
||||
+ :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
|
||||
Our conference is in the [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) 🎯, 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).
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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 href="https://github.com/OpenIMSDK/Open-IM-Server/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=OpenIMSDK/Open-IM-Server" />
|
||||
</a>
|
||||
|
||||
+10
-151
@@ -255,134 +255,6 @@ 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.
|
||||
@@ -393,23 +265,12 @@ 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/*
|
||||
- deployment/*
|
||||
- config/*
|
||||
- build/*
|
||||
- scripts/*
|
||||
- Makefile
|
||||
- install.sh
|
||||
- CONTRIBUTING.md
|
||||
- docs/*
|
||||
- src: "*.md"
|
||||
dst: docs
|
||||
@@ -478,14 +339,12 @@ changelog:
|
||||
# - image_templates:
|
||||
# - "openimsdk/open-im-server:{{ .Tag }}-amd64"
|
||||
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64"
|
||||
# dockerfile: build/images/openim-api/Dockerfile.release
|
||||
# ids:
|
||||
# - openim-api
|
||||
# dockerfile: Dockerfile
|
||||
# use: buildx
|
||||
# build_flag_templates:
|
||||
# - "--pull"
|
||||
# - "--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.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"
|
||||
@@ -500,12 +359,12 @@ changelog:
|
||||
# - image_templates:
|
||||
# - "goreleaser/goreleaser:{{ .Tag }}-arm64"
|
||||
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64"
|
||||
# dockerfile: build/images/openim-api/Dockerfile.release
|
||||
# dockerfile: Dockerfile
|
||||
# use: buildx
|
||||
# build_flag_templates:
|
||||
# - "--pull"
|
||||
# - "--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.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"
|
||||
@@ -555,7 +414,7 @@ nfpms:
|
||||
- openim-rpc-user
|
||||
# Your app's vendor.
|
||||
vendor: OpenIMSDK
|
||||
homepage: https://github.com/openimsdk/open-im-server
|
||||
homepage: https://github.com/OpenIMSDK/Open-IM-Server
|
||||
maintainer: kubbot <https://github.com/kubbot>
|
||||
description: |-
|
||||
Auto sync github labels
|
||||
|
||||
@@ -43,8 +43,7 @@ COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-s
|
||||
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
|
||||
EXPOSE ${PORT}
|
||||
|
||||
ENTRYPOINT ["bash", "-c", "openim-api -c $OPENIM_SERVER_CONFIG_NAME --port $PORT"]
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-api --port ${PORT} -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -1,8 +0,0 @@
|
||||
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"]
|
||||
@@ -42,8 +42,4 @@ 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"]
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-cmdutils"]
|
||||
|
||||
@@ -41,8 +41,4 @@ 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"]
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-crontask"]
|
||||
|
||||
@@ -41,12 +41,10 @@ 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
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
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"]
|
||||
CMD ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-msggateway --port 10140 --ws_port 10001
|
||||
@@ -36,11 +36,12 @@ RUN make build BINS=openim-msgtransfer
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
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"]
|
||||
CMD ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-msgtransfer
|
||||
@@ -15,7 +15,6 @@
|
||||
# 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
|
||||
|
||||
@@ -39,14 +38,12 @@ FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
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"]
|
||||
CMD ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-push --port 10170
|
||||
@@ -33,20 +33,21 @@ COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-auth
|
||||
# RUN make build BINS=openim-rpc
|
||||
|
||||
RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth ./cmd/openim-rpc/openim-rpc-auth
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
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"]
|
||||
# ENTRYPOINT
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-auth --port 10160 -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -33,20 +33,27 @@ COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-conversation
|
||||
RUN make build BINS=openim-rpc
|
||||
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation ./cmd/openim-rpc/openim-rpc-conversation
|
||||
|
||||
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
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
|
||||
EXPOSE 20230
|
||||
|
||||
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"]
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-conversation --port 10230 --prometheus_port 20230 -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -33,20 +33,27 @@ COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-friend
|
||||
RUN make build BINS=openim-rpc
|
||||
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend ./cmd/openim-rpc/openim-rpc-friend
|
||||
|
||||
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
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
|
||||
EXPOSE 20120
|
||||
|
||||
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"]
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-friend --port 10120 --prometheus_port 20120 -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -33,20 +33,27 @@ COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-group
|
||||
RUN make build BINS=openim-rpc
|
||||
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group ./cmd/openim-rpc/openim-rpc-group
|
||||
|
||||
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
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
|
||||
EXPOSE 20150
|
||||
|
||||
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"]
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-group --port 10150 --prometheus_port 20150 -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -33,20 +33,27 @@ COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-msg
|
||||
RUN make build BINS=openim-rpc
|
||||
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg ./cmd/openim-rpc/openim-rpc-msg
|
||||
|
||||
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
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
|
||||
EXPOSE 20130
|
||||
|
||||
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"]
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-msg --port 10130 --prometheus_port 20130 -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -33,21 +33,26 @@ COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-third
|
||||
RUN make build BINS=openim-rpc
|
||||
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third ./cmd/openim-rpc/openim-rpc-third
|
||||
|
||||
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
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 10200
|
||||
|
||||
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"]
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-third --port 10200 -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -33,20 +33,26 @@ COPY . .
|
||||
|
||||
RUN make clean
|
||||
|
||||
RUN make build BINS=openim-rpc-user
|
||||
RUN make build BINS=openim-rpc
|
||||
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user ./cmd/openim-rpc/openim-rpc-user
|
||||
|
||||
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
|
||||
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
|
||||
|
||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV OS ${OS}
|
||||
ENV ARCH ${ARCH}
|
||||
|
||||
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"]
|
||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-user --port 10110 -c ${SERVER_WORKDIR}/config"]
|
||||
@@ -1,49 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make 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"]
|
||||
@@ -1,57 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||
|
||||
# Set go mod installation source and proxy
|
||||
|
||||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG GO111MODULE=on
|
||||
ARG GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /openim/openim-server
|
||||
|
||||
ENV GO111MODULE=$GO111MODULE
|
||||
ENV GOPROXY=$GOPROXY
|
||||
|
||||
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"]
|
||||
+18
-4
@@ -18,6 +18,9 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -28,10 +31,10 @@ import (
|
||||
openkeeper "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper"
|
||||
"github.com/OpenIMSDK/tools/log"
|
||||
|
||||
"github.com/openimsdk/open-im-server/v3/internal/api"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
|
||||
"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"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -43,6 +46,16 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
func startPprof() {
|
||||
runtime.GOMAXPROCS(1)
|
||||
runtime.SetMutexProfileFraction(1)
|
||||
runtime.SetBlockProfileRate(1)
|
||||
if err := http.ListenAndServe(":6060", nil); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
func run(port int) error {
|
||||
if port == 0 {
|
||||
return fmt.Errorf("port is empty")
|
||||
@@ -79,6 +92,7 @@ func run(port int) error {
|
||||
}
|
||||
fmt.Println("start api server, address: ", address, ", OpenIM version: ", config.Version)
|
||||
log.ZInfo(context.Background(), "start server success", "address", address, "version", config.Version)
|
||||
go startPprof()
|
||||
err = router.Run(address)
|
||||
if err != nil {
|
||||
log.ZError(context.Background(), "api run failed ", err, "address", address)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/internal/tools"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/tools"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/internal/push"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/push"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/internal/rpc/auth"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/rpc/auth"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/internal/rpc/conversation"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/rpc/conversation"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/internal/rpc/friend"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/rpc/friend"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/internal/rpc/group"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/rpc/group"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/internal/rpc/msg"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/rpc/msg"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/internal/rpc/third"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/rpc/third"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/open-im-server/v3/internal/rpc/user"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/internal/rpc/user"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -0,0 +1,378 @@
|
||||
# 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.
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Infrastructural configurations, please modify based on your setup
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
###################### Zookeeper ######################
|
||||
# Zookeeper configuration
|
||||
# It's not recommended to modify the schema
|
||||
#
|
||||
# Zookeeper address
|
||||
# Zookeeper username
|
||||
# Zookeeper password
|
||||
zookeeper:
|
||||
schema: openim
|
||||
address: [ 127.0.0.1:2181 ]
|
||||
username:
|
||||
password:
|
||||
|
||||
###################### Mysql ######################
|
||||
# MySQL configuration
|
||||
# Currently, only single machine setup is supported
|
||||
#
|
||||
# Maximum number of open connections
|
||||
# Maximum number of idle connections
|
||||
# Maximum lifetime in seconds a connection can be reused
|
||||
# Log level: 1=slient, 2=error, 3=warn, 4=info
|
||||
# Slow query threshold in milliseconds
|
||||
mysql:
|
||||
address: [ 127.0.0.1:13306 ]
|
||||
username: root
|
||||
password: openIM123
|
||||
database: openIM_v3
|
||||
maxOpenConn: 1000
|
||||
maxIdleConn: 100
|
||||
maxLifeTime: 60
|
||||
logLevel: 4
|
||||
slowThreshold: 500
|
||||
|
||||
###################### Mongo ######################
|
||||
# MongoDB configuration
|
||||
# If uri is not empty, it will be used directly
|
||||
#
|
||||
# MongoDB address for standalone setup, Mongos address for sharded cluster setup
|
||||
# Default MongoDB database name
|
||||
# Maximum connection pool size
|
||||
mongo:
|
||||
uri:
|
||||
address: [ 127.0.0.1:37017 ]
|
||||
database: openIM_v3
|
||||
username: root
|
||||
password: openIM123
|
||||
maxPoolSize: 100
|
||||
|
||||
###################### Redis ######################
|
||||
# Redis configuration
|
||||
#
|
||||
# Username is required only for Redis version 6.0+
|
||||
redis:
|
||||
address: [ 127.0.0.1:16379 ]
|
||||
username:
|
||||
password: openIM123
|
||||
|
||||
###################### Kafka ######################
|
||||
# Kafka configuration
|
||||
#
|
||||
# Kafka username
|
||||
# Kafka password
|
||||
# It's not recommended to modify this topic name
|
||||
# Consumer group ID, it's not recommended to modify
|
||||
kafka:
|
||||
username:
|
||||
password:
|
||||
addr: [ 127.0.0.1:9092 ]
|
||||
latestMsgToRedis:
|
||||
topic: "latestMsgToRedis"
|
||||
offlineMsgToMongo:
|
||||
topic: "offlineMsgToMongoMysql"
|
||||
msgToPush:
|
||||
topic: "msgToPush"
|
||||
consumerGroupID:
|
||||
msgToRedis: redis
|
||||
msgToMongo: mongo
|
||||
msgToMySql: mysql
|
||||
msgToPush: push
|
||||
|
||||
###################### RPC ######################
|
||||
# RPC configuration
|
||||
#
|
||||
# IP address to register with zookeeper when starting RPC, the IP and corresponding rpcPort should be accessible by api/gateway
|
||||
# Default listen IP is 0.0.0.0
|
||||
rpc:
|
||||
registerIP:
|
||||
listenIP: 0.0.0.0
|
||||
|
||||
###################### API ######################
|
||||
# API configuration
|
||||
#
|
||||
# API service port
|
||||
# Default listen IP is 0.0.0.0
|
||||
api:
|
||||
openImApiPort: [ 10002 ]
|
||||
listenIP: 0.0.0.0
|
||||
|
||||
###################### Gateway ######################
|
||||
# Object storage configuration
|
||||
#
|
||||
# Use minio for object storage
|
||||
# API URL should be accessible by the app
|
||||
# It's not recommended to modify the bucket name
|
||||
# Endpoint should be accessible by the app
|
||||
# Session token
|
||||
# Configuration for Tencent COS
|
||||
# Configuration for Aliyun OSS
|
||||
# apiURL is the address of the api, the access address of the app, use s3 must be configured
|
||||
# minio.endpoint can be configured as an intranet address,
|
||||
# minio.signEndpoint is minio public network address
|
||||
object:
|
||||
enable: "minio"
|
||||
apiURL: "http://127.0.0.1:10002"
|
||||
minio:
|
||||
bucket: "openim"
|
||||
endpoint: "http://127.0.0.1:10005"
|
||||
accessKeyID: "root"
|
||||
secretAccessKey: "openIM123"
|
||||
sessionToken: ""
|
||||
signEndpoint: "http://127.0.0.1:10005"
|
||||
cos:
|
||||
bucketURL: "https://temp-1252357374.cos.ap-chengdu.myqcloud.com"
|
||||
secretID: ""
|
||||
secretKey: ""
|
||||
sessionToken: ""
|
||||
oss:
|
||||
endpoint: "https://oss-cn-chengdu.aliyuncs.com"
|
||||
bucket: "demo-9999999"
|
||||
bucketURL: "https://demo-9999999.oss-cn-chengdu.aliyuncs.com"
|
||||
accessKeyID: ""
|
||||
accessKeySecret: ""
|
||||
sessionToken: ""
|
||||
|
||||
# RPC service ports
|
||||
# These ports are passed into the program by the script and are not recommended to modify
|
||||
# For launching multiple programs, just fill in multiple ports separated by commas
|
||||
# For example, [10110, 10111]
|
||||
rpcPort:
|
||||
openImUserPort: [ 10110 ]
|
||||
openImFriendPort: [ 10120 ]
|
||||
openImMessagePort: [ 10130 ]
|
||||
openImMessageGatewayPort: [ 10140 ]
|
||||
openImGroupPort: [ 10150 ]
|
||||
openImAuthPort: [ 10160 ]
|
||||
openImPushPort: [ 10170 ]
|
||||
openImConversationPort: [ 10180 ]
|
||||
openImThirdPort: [ 10190 ]
|
||||
|
||||
# RPC service names for registration, it's not recommended to modify these
|
||||
rpcRegisterName:
|
||||
openImUserName: User
|
||||
openImFriendName: Friend
|
||||
openImMsgName: Msg
|
||||
openImPushName: Push
|
||||
openImMessageGatewayName: MessageGateway
|
||||
openImGroupName: Group
|
||||
openImAuthName: Auth
|
||||
openImConversationName: Conversation
|
||||
openImThirdName: Third
|
||||
|
||||
# Log configuration
|
||||
#
|
||||
# Storage directory
|
||||
# Log rotation time
|
||||
# Maximum number of logs to retain
|
||||
# Log level, 6 means all levels
|
||||
# Whether to output to stdout
|
||||
# Whether to output in json format
|
||||
# Whether to include stack trace in logs
|
||||
log:
|
||||
storageLocation: ../../../../../logs/
|
||||
rotationTime: 24
|
||||
remainRotationCount: 2
|
||||
remainLogLevel: 6
|
||||
isStdout: false
|
||||
isJson: false
|
||||
withStack: false
|
||||
|
||||
# Long connection server configuration
|
||||
#
|
||||
# Websocket port for msg_gateway
|
||||
# Maximum number of websocket connections
|
||||
# Maximum length of websocket request package
|
||||
# Websocket connection handshake timeout
|
||||
longConnSvr:
|
||||
openImWsPort: [ 10001 ]
|
||||
websocketMaxConnNum: 100000
|
||||
websocketMaxMsgLen: 4096
|
||||
websocketTimeout: 10
|
||||
|
||||
# Push notification service configuration
|
||||
#
|
||||
# Use GeTui for push notifications
|
||||
# GeTui offline push configuration
|
||||
# FCM offline push configuration
|
||||
# Account file, place it in the config directory
|
||||
# JPush configuration, modify these after applying in JPush backend
|
||||
push:
|
||||
enable: getui
|
||||
geTui:
|
||||
pushUrl: "https://restapi.getui.com/v2/$appId"
|
||||
masterSecret: ""
|
||||
appKey: ""
|
||||
intent: ""
|
||||
channelID: ""
|
||||
channelName: ""
|
||||
fcm:
|
||||
serviceAccount: "x.json"
|
||||
jpns:
|
||||
appKey:
|
||||
masterSecret:
|
||||
pushUrl:
|
||||
pushIntent:
|
||||
|
||||
# App manager configuration
|
||||
#
|
||||
# Built-in app manager user IDs
|
||||
# Built-in app manager nicknames
|
||||
manager:
|
||||
userID: [ "openIM123456","openIM654321","openIMAdmin" ]
|
||||
nickname: [ "system1","system2", "system3" ]
|
||||
|
||||
# Multi-platform login policy
|
||||
# For each platform(Android, iOS, Windows, Mac, web), only one can be online at a time
|
||||
multiLoginPolicy: 1
|
||||
|
||||
# Whether to store messages in MySQL, messages in MySQL are only used for management background
|
||||
chatPersistenceMysql: true
|
||||
|
||||
# Message cache timeout in seconds, it's not recommended to modify
|
||||
msgCacheTimeout: 86400
|
||||
|
||||
# Whether to enable read receipts for group chat
|
||||
groupMessageHasReadReceiptEnable: true
|
||||
|
||||
# Whether to enable read receipts for single chat
|
||||
singleMessageHasReadReceiptEnable: true
|
||||
|
||||
# MongoDB offline message retention period in days
|
||||
retainChatRecords: 365
|
||||
|
||||
# Schedule to clear expired messages(older than retainChatRecords days) in MongoDB every Wednesday at 2am
|
||||
# This deletion is just for cleaning up disk usage according to previous configuration retainChatRecords, no notification will be sent
|
||||
chatRecordsClearTime: "0 2 * * 3"
|
||||
|
||||
# Schedule to auto delete messages every day at 2am
|
||||
# This deletion is for messages that have been retained for more than msg_destruct_time (seconds) in the conversation field
|
||||
msgDestructTime: "0 2 * * *"
|
||||
|
||||
# Secret key
|
||||
secret: openIM123
|
||||
|
||||
# Token policy
|
||||
#
|
||||
# Token expiration period in days
|
||||
tokenPolicy:
|
||||
expire: 90
|
||||
|
||||
# Message verification policy
|
||||
#
|
||||
# Whether to verify friendship when sending messages
|
||||
messageVerify:
|
||||
friendVerify: false
|
||||
|
||||
# iOS push notification configuration
|
||||
#
|
||||
# iOS push notification sound
|
||||
# Whether to count badge
|
||||
# Whether it's production environment
|
||||
iosPush:
|
||||
pushSound: "xxx"
|
||||
badgeCount: true
|
||||
production: false
|
||||
|
||||
# Callback configuration
|
||||
#
|
||||
# Callback URL
|
||||
# Whether to enable this callback event
|
||||
# Timeout in seconds
|
||||
# Whether to continue execution if callback fails
|
||||
callback:
|
||||
url:
|
||||
beforeSendSingleMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
afterSendSingleMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
beforeSendGroupMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
afterSendGroupMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
msgModify:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
userOnline:
|
||||
enable: false
|
||||
timeout: 5
|
||||
userOffline:
|
||||
enable: false
|
||||
timeout: 5
|
||||
userKickOff:
|
||||
enable: false
|
||||
timeout: 5
|
||||
offlinePush:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
onlinePush:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
superGroupOnlinePush:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeAddFriend:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeCreateGroup:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeMemberJoinGroup:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeSetGroupMemberInfo:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
setMessageReactionExtensions:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
|
||||
###################### Prometheus ######################
|
||||
# Prometheus configuration
|
||||
# The number of Prometheus ports per service needs to correspond to rpcPort
|
||||
# The number of ports needs to be consistent with msg_transfer_service_num in script/path_info.sh
|
||||
prometheus:
|
||||
enable: false
|
||||
userPrometheusPort: [ 20110 ]
|
||||
friendPrometheusPort: [ 20120 ]
|
||||
messagePrometheusPort: [ 20130 ]
|
||||
messageGatewayPrometheusPort: [ 20140 ]
|
||||
groupPrometheusPort: [ 20150 ]
|
||||
authPrometheusPort: [ 20160 ]
|
||||
pushPrometheusPort: [ 20170 ]
|
||||
conversationPrometheusPort: [ 20230 ]
|
||||
rtcPrometheusPort: [ 21300 ]
|
||||
thirdPrometheusPort: [ 21301 ]
|
||||
messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ]
|
||||
+8
-8
@@ -28,7 +28,7 @@
|
||||
# Zookeeper password
|
||||
zookeeper:
|
||||
schema: openim
|
||||
address: [ 172.28.0.1:12181 ]
|
||||
address: [ 127.0.0.1:2181 ]
|
||||
username: ''
|
||||
password: ''
|
||||
|
||||
@@ -42,7 +42,7 @@ zookeeper:
|
||||
# Log level: 1=slient, 2=error, 3=warn, 4=info
|
||||
# Slow query threshold in milliseconds
|
||||
mysql:
|
||||
address: [ 172.28.0.1:13306 ]
|
||||
address: [ 127.0.0.1:13306 ]
|
||||
username: root
|
||||
password: openIM123
|
||||
database: openIM_v3
|
||||
@@ -61,7 +61,7 @@ mysql:
|
||||
# Maximum connection pool size
|
||||
mongo:
|
||||
uri: ''
|
||||
address: [ 172.28.0.1:37017 ]
|
||||
address: [ 127.0.0.1:37017 ]
|
||||
database: openIM_v3
|
||||
username: root
|
||||
password: openIM123
|
||||
@@ -72,7 +72,7 @@ mongo:
|
||||
#
|
||||
# Username is required only for Redis version 6.0+
|
||||
redis:
|
||||
address: [ 172.28.0.1:16379 ]
|
||||
address: [ 127.0.0.1:16379 ]
|
||||
username: ''
|
||||
password: openIM123
|
||||
|
||||
@@ -86,7 +86,7 @@ redis:
|
||||
kafka:
|
||||
username: ''
|
||||
password: ''
|
||||
addr: [ 172.28.0.1:19094 ]
|
||||
addr: [ 127.0.0.1:9092 ]
|
||||
latestMsgToRedis:
|
||||
topic: "latestMsgToRedis"
|
||||
offlineMsgToMongo:
|
||||
@@ -132,14 +132,14 @@ api:
|
||||
# minio.signEndpoint is minio public network address
|
||||
object:
|
||||
enable: "minio"
|
||||
apiURL: "http://172.28.0.1:10002"
|
||||
apiURL: "http://14.153.17.42:10002"
|
||||
minio:
|
||||
bucket: "openim"
|
||||
endpoint: "http://172.28.0.1:10005"
|
||||
endpoint: "http://127.0.0.1:10005"
|
||||
accessKeyID: "root"
|
||||
secretAccessKey: "openIM123"
|
||||
sessionToken: ''
|
||||
signEndpoint: "http://172.28.0.1:10002"
|
||||
signEndpoint: "http://14.153.17.42:10005"
|
||||
cos:
|
||||
bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com
|
||||
secretID: ''
|
||||
|
||||
+4
-75
@@ -7,7 +7,7 @@ OpenIM 支持很多种集群化部署方式,包括但不限于 helm, sealos, k
|
||||
目前各个贡献者,以及之前的官方有出过一些可以参考的方案:
|
||||
|
||||
- https://github.com/OpenIMSDK/k8s-jenkins
|
||||
- https://github.com/openimsdk/open-im-server-k8s-deploy
|
||||
- https://github.com/OpenIMSDK/Open-IM-Server-k8s-deploy
|
||||
- https://github.com/OpenIMSDK/openim-charts
|
||||
- https://github.com/showurl/deploy-openim
|
||||
|
||||
@@ -19,83 +19,12 @@ Kubernetes: >= 1.16.0-0
|
||||
Helm: >= 3.0
|
||||
```
|
||||
|
||||
假设 OpenIM 项目根目录路径为 `OpenIM_ROOT`
|
||||
|
||||
### 最低配置
|
||||
进入 OpenIM 项目根目录
|
||||
|
||||
建议生产环境的最低配置如下:
|
||||
$ cd ${OpenIM_ROOT}
|
||||
|
||||
```bash
|
||||
CPU: 4
|
||||
Memory: 8G
|
||||
Disk: 100G
|
||||
```
|
||||
|
||||
## 生成配置文件
|
||||
|
||||
我们将自动文件全部自动化处理了,所以生成配置文件对于 openim 来说是可选的,但是如果你想要自定义配置,可以参考下面的步骤:
|
||||
|
||||
```bash
|
||||
$ make init
|
||||
# 或者是使用脚本:
|
||||
# ./scripts/init-config.sh
|
||||
```
|
||||
此时会帮你在 `deployments/openim/config` 目录下生成配置文件,你可以根据自己的需求进行修改。
|
||||
|
||||
|
||||
## 集群搭建
|
||||
|
||||
如果你已经有了一个 `kubernetes` 集群,或者是你希望自己从头开始搭建一个 `kubernetes` 那么你可以直接跳过这一步。
|
||||
|
||||
为了快速开始,我使用 [sealos](https://github.com/labring/sealos) 来快速搭建集群,sealos 底层也是对 kubeadm 的封装:
|
||||
|
||||
```bash
|
||||
$ SEALOS_VERSION=`curl -s https://api.github.com/repos/labring/sealos/releases/latest | grep -oE '"tag_name": "[^"]+"' | head -n1 | cut -d'"' -f4` && \
|
||||
curl -sfL https://raw.githubusercontent.com/labring/sealos/${SEALOS_VERSION}/scripts/install.sh |
|
||||
sh -s ${SEALOS_VERSION} labring/sealos
|
||||
```
|
||||
|
||||
**支持的版本:**
|
||||
|
||||
+ docker: `labring/kubernetes-docker`:(v1.24.0~v1.27.0)
|
||||
+ containerd: `labring/kubernetes`:(v1.24.0~v1.27.0)
|
||||
|
||||
|
||||
#### 安装集群:
|
||||
|
||||
集群的信息如下:
|
||||
|
||||
| 机器名 | IP地址 | 系统信息 |
|
||||
|---------|-----------------|------------------------------------------------------------------------------------------------------------|
|
||||
| master01| 10.0.0.9 | Linux VM-0-9-ubuntu 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
|
||||
| node01 | 10.0.0.4 | Linux VM-0-9-ubuntu 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
|
||||
| node02 | 10.0.0.10 | Linux VM-0-9-ubuntu 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
|
||||
|
||||
```bash
|
||||
$ export CLUSTER_USERNAME=ubuntu
|
||||
$ export CLUSTER_PASSWORD=123456
|
||||
$ sealos run labring/kubernetes:v1.25.0 labring/helm:v3.8.2 labring/calico:v3.24.1 \
|
||||
--masters 10.0.0.9 \
|
||||
--nodes 10.0.0.4,10.0.0.10 \
|
||||
-u "$CLUSTER_USERNAME" \
|
||||
-p "$CLUSTER_PASSWORD"
|
||||
```
|
||||
|
||||
### 安装 helm
|
||||
|
||||
helm通过打包的方式,支持发布的版本管理和控制,很大程度上简化了Kubernetes应用的部署和管理。
|
||||
|
||||
|
||||
**使用脚本:**
|
||||
|
||||
```bash
|
||||
$ curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
||||
```
|
||||
|
||||
**添加仓库:**
|
||||
|
||||
```bash
|
||||
$ helm repo add brigade https://openimsdk.github.io/openim-charts
|
||||
```
|
||||
|
||||
|
||||
### 容器化安装
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -1,38 +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.
|
||||
|
||||
apiVersion: v2
|
||||
name: openim-chat
|
||||
description: A Helm chart for Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "1.16.0"
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
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.
|
||||
@@ -1,22 +0,0 @@
|
||||
1. Get the application URL by running these commands:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
{{- range .paths }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "openim-chat.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "openim-chat.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "openim-chat.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "openim-chat.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
|
||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
|
||||
{{- end }}
|
||||
@@ -1,62 +0,0 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "openim-chat.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "openim-chat.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "openim-chat.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "openim-chat.labels" -}}
|
||||
helm.sh/chart: {{ include "openim-chat.chart" . }}
|
||||
{{ include "openim-chat.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "openim-chat.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "openim-chat.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "openim-chat.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "openim-chat.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,75 +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.
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "openim-chat.fullname" . }}
|
||||
labels:
|
||||
{{- include "openim-chat.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "openim-chat.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "openim-chat.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "openim-chat.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -1,42 +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.
|
||||
|
||||
{{- if .Values.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "openim-chat.fullname" . }}
|
||||
labels:
|
||||
{{- include "openim-chat.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "openim-chat.fullname" . }}
|
||||
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,75 +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.
|
||||
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "openim-chat.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
|
||||
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "openim-chat.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
||||
pathType: {{ .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,29 +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.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "openim-chat.fullname" . }}
|
||||
labels:
|
||||
{{- include "openim-chat.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "openim-chat.selectorLabels" . | nindent 4 }}
|
||||
@@ -1,26 +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.
|
||||
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "openim-chat.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "openim-chat.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,96 +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.
|
||||
|
||||
# Default values for openim-chat.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: nginx
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
@@ -1,23 +0,0 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -1,74 +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.
|
||||
|
||||
apiVersion: v2
|
||||
name: openim-server
|
||||
description: A Helm chart for Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "default"
|
||||
|
||||
icon: https://raw.githubusercontent.com/openimsdk/open-im-server/main/assets/openim-logo-gradient.svg
|
||||
|
||||
maintainers:
|
||||
- name: "OpenIM"
|
||||
url: "https://github.com/openimsdk"
|
||||
|
||||
keywords:
|
||||
- openim
|
||||
- im
|
||||
- chat
|
||||
|
||||
sources:
|
||||
- "https://github.com/openimsdk/open-im-server"
|
||||
- "https://github.com/openimsdk/openim-sdk-core"
|
||||
- "https://github.com/openimsdk/openim-docker"
|
||||
|
||||
dependencies:
|
||||
- name: mysql
|
||||
version: 8.0.25
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
- name: redis
|
||||
version: 14.6.1
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
- name: mongodb
|
||||
version: 10.1.0
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
- name: kafka
|
||||
version: 14.1.0
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
- name: minio
|
||||
version: 8.1.2
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
- name: zookeeper
|
||||
version: 5.17.0
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
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.
|
||||
@@ -1,15 +0,0 @@
|
||||
# OpenIM Server Chat
|
||||
|
||||
## 目录结构
|
||||
|
||||
```bash
|
||||
openim-server/
|
||||
Chart.yaml # 包含了chart信息的YAML文件
|
||||
LICENSE # 包含OpenIM Chart许可证的纯文本文件
|
||||
README.md # OpenIM 可读的README文件
|
||||
values.yaml # chart 默认的配置值
|
||||
charts/ # 包含chart依赖的其他chart
|
||||
crds/ # 自定义资源的定义
|
||||
templates/ # 模板目录, 当和values 结合时,可生成有效的Kubernetes manifest文件
|
||||
templates/NOTES.txt # 包含简要使用说明的纯文本文件
|
||||
```
|
||||
@@ -1,22 +0,0 @@
|
||||
1. Get the application URL by running these commands:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
{{- range .paths }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "openim-server.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "openim-server.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "openim-server.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "openim-server.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
|
||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
|
||||
{{- end }}
|
||||
@@ -1,62 +0,0 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "openim-server.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "openim-server.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "openim-server.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "openim-server.labels" -}}
|
||||
helm.sh/chart: {{ include "openim-server.chart" . }}
|
||||
{{ include "openim-server.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "openim-server.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "openim-server.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "openim-server.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "openim-server.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,75 +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.
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "openim-server.fullname" . }}
|
||||
labels:
|
||||
{{- include "openim-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "openim-server.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "openim-server.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "openim-server.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -1,42 +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.
|
||||
|
||||
{{- if .Values.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "openim-server.fullname" . }}
|
||||
labels:
|
||||
{{- include "openim-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "openim-server.fullname" . }}
|
||||
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,75 +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.
|
||||
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "openim-server.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
|
||||
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "openim-server.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
||||
pathType: {{ .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,29 +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.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "openim-server.fullname" . }}
|
||||
labels:
|
||||
{{- include "openim-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "openim-server.selectorLabels" . | nindent 4 }}
|
||||
@@ -1,26 +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.
|
||||
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "openim-server.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "openim-server.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,96 +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.
|
||||
|
||||
# Default values for openim-server.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: nginx
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
@@ -1,124 +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.
|
||||
|
||||
# Configuration for OpenIMServer
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# TODO: This config file is the template file
|
||||
# --| source: deployments/templates/chat.yaml
|
||||
# --| env: scripts/install/environment
|
||||
# --| target: config/config.yaml
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
###################### Zookeeper ######################
|
||||
# Zookeeper configuration
|
||||
# It's not recommended to modify the schema
|
||||
zookeeper:
|
||||
schema: ${ZOOKEEPER_SCHEMA}
|
||||
zkAddr:
|
||||
- ${ZOOKEEPER_ADDRESS}:${ZOOKEEPER_PORT}
|
||||
username: ${ZOOKEEPER_USERNAME}
|
||||
password: ${ZOOKEEPER_PASSWORD}
|
||||
|
||||
###################### Chat API ######################
|
||||
chatApi:
|
||||
openImChatApiPort: [ ${OPENIM_CHAT_API_PORT} ]
|
||||
listenIP: ${CHAT_API_LISTEN_IP}
|
||||
|
||||
###################### Admin API ######################
|
||||
adminApi:
|
||||
openImAdminApiPort: [ ${OPENIM_ADMIN_API_PORT} ]
|
||||
listenIP: ${ADMIN_API_LISTEN_IP}
|
||||
|
||||
###################### RPC ######################
|
||||
rpc:
|
||||
registerIP: #作为rpc启动时,注册到zookeeper的IP,api/gateway能访问到此ip和对应的rpcPort中的端口
|
||||
listenIP: #默认为0.0.0.0
|
||||
|
||||
rpcPort:
|
||||
openImAdminPort: [ ${OPENIM_ADMIN_PORT} ]
|
||||
openImChatPort: [ ${OPENIM_CHAT_PORT} ]
|
||||
rpcRegisterName:
|
||||
openImAdminName: ${OPENIM_ADMIN_NAME}
|
||||
openImChatName: ${OPENIM_CHAT_NAME}
|
||||
|
||||
###################### MySQL ######################
|
||||
mysql:
|
||||
# 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 #慢语句阈值 (毫秒)
|
||||
database: openim_enterprise
|
||||
|
||||
###################### Log ######################
|
||||
log:
|
||||
storageLocation: ../logs/ #存放目录
|
||||
# rotationTime: 24 #日志旋转时间
|
||||
# remainRotationCount: 2 #日志数量
|
||||
# remainLogLevel: 6 #日志级别 6表示全都打印,
|
||||
# isStdout: false
|
||||
# isJson: false
|
||||
# withStack: false
|
||||
|
||||
###################### Secret & Token Policy ######################
|
||||
# secret: openIM123
|
||||
#tokenPolicy:
|
||||
# expire: 86400
|
||||
|
||||
###################### Verify Code ######################
|
||||
verifyCode:
|
||||
validTime: 300 # 验证码有效时间
|
||||
validCount: 5 # 验证码有效次数
|
||||
uintTime: 86400 # 单位时间间隔
|
||||
maxCount: 10 # 单位时间内最大获取次数
|
||||
superCode: "666666" # 超级验证码(只有use为空时使用)
|
||||
len: 6 # 验证码长度
|
||||
use: "" # 使用的验证码服务(use: "ali")
|
||||
ali:
|
||||
endpoint: "dysmsapi.aliyuncs.com"
|
||||
accessKeyId: ""
|
||||
accessKeySecret: ""
|
||||
signName: ""
|
||||
verificationCodeTemplateCode: ""
|
||||
|
||||
|
||||
###################### Proxy Header ######################
|
||||
# 获取ip的header,没有配置直接获取远程地址
|
||||
#proxyHeader: "X-Forwarded-For"
|
||||
|
||||
###################### Admin List ######################
|
||||
adminList:
|
||||
- adminID: admin1
|
||||
nickname: chat1
|
||||
imAdmin: openIM123456
|
||||
- adminID: admin2
|
||||
nickname: chat2
|
||||
imAdmin: openIM654321
|
||||
- adminID: admin3
|
||||
nickname: chat3
|
||||
imAdmin: openIMAdmin
|
||||
|
||||
###################### OpenIM URL ######################
|
||||
openIMUrl: ${OPENIM_SERVER_ADDRESS}:${API_OPENIM_PORT}
|
||||
|
||||
###################### Redis ######################
|
||||
redis:
|
||||
# address: [ 127.0.0.1:16379 ]
|
||||
# username:
|
||||
# password: openIM123
|
||||
@@ -12,268 +12,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# ======================================
|
||||
# ========= Basic Configuration ========
|
||||
# ======================================
|
||||
|
||||
# The user for authentication or system operations.
|
||||
# Default: USER=root
|
||||
USER=${USER}
|
||||
|
||||
# Password associated with the specified user for authentication.
|
||||
# Default: PASSWORD=openIM123
|
||||
PASSWORD=${PASSWORD}
|
||||
|
||||
# Endpoint for the MinIO object storage service.
|
||||
# Default: MINIO_ENDPOINT=http://172.28.0.1:10005
|
||||
MINIO_ENDPOINT=${MINIO_ENDPOINT}
|
||||
|
||||
# Base URL for the application programming interface (API).
|
||||
# Default: API_URL=http://172.28.0.1:10002
|
||||
API_URL=${API_URL}
|
||||
|
||||
# Directory path for storing data files or related information.
|
||||
# Default: DATA_DIR=./
|
||||
DATA_DIR=${DATA_DIR}
|
||||
|
||||
# ======================================
|
||||
# ========= Network Configuration ======
|
||||
# ======================================
|
||||
|
||||
# Subnet for the Docker network.
|
||||
# Default: DOCKER_BRIDGE_SUBNET=172.28.0.0/16
|
||||
DOCKER_BRIDGE_SUBNET=${DOCKER_BRIDGE_SUBNET}
|
||||
|
||||
# Gateway for the Docker network.
|
||||
# Default: DOCKER_BRIDGE_GATEWAY=172.28.0.1
|
||||
DOCKER_BRIDGE_GATEWAY=${DOCKER_BRIDGE_GATEWAY}
|
||||
|
||||
# Address or hostname for the MySQL network.
|
||||
# Default: MYSQL_NETWORK_ADDRESS=172.28.0.2
|
||||
MYSQL_NETWORK_ADDRESS=${MYSQL_NETWORK_ADDRESS}
|
||||
|
||||
# Address or hostname for the MongoDB network.
|
||||
# Default: MONGO_NETWORK_ADDRESS=172.28.0.3
|
||||
MONGO_NETWORK_ADDRESS=${MONGO_NETWORK_ADDRESS}
|
||||
|
||||
# Address or hostname for the Redis network.
|
||||
# Default: REDIS_NETWORK_ADDRESS=172.28.0.4
|
||||
REDIS_NETWORK_ADDRESS=${REDIS_NETWORK_ADDRESS}
|
||||
|
||||
# Address or hostname for the Kafka network.
|
||||
# Default: KAFKA_NETWORK_ADDRESS=172.28.0.5
|
||||
KAFKA_NETWORK_ADDRESS=${KAFKA_NETWORK_ADDRESS}
|
||||
|
||||
# Address or hostname for the ZooKeeper network.
|
||||
# Default: ZOOKEEPER_NETWORK_ADDRESS=172.28.0.6
|
||||
ZOOKEEPER_NETWORK_ADDRESS=${ZOOKEEPER_NETWORK_ADDRESS}
|
||||
|
||||
# Address or hostname for the MinIO network.
|
||||
# Default: MINIO_NETWORK_ADDRESS=172.28.0.7
|
||||
MINIO_NETWORK_ADDRESS=${MINIO_NETWORK_ADDRESS}
|
||||
|
||||
# Address or hostname for the OpenIM web network.
|
||||
# Default: OPENIM_WEB_NETWORK_ADDRESS=172.28.0.8
|
||||
OPENIM_WEB_NETWORK_ADDRESS=${OPENIM_WEB_NETWORK_ADDRESS}
|
||||
|
||||
# Address or hostname for the OpenIM server network.
|
||||
# Default: OPENIM_SERVER_NETWORK_ADDRESS=172.28.0.9
|
||||
OPENIM_SERVER_NETWORK_ADDRESS=${OPENIM_SERVER_NETWORK_ADDRESS}
|
||||
|
||||
# Address or hostname for the OpenIM chat network.
|
||||
# Default: OPENIM_CHAT_NETWORK_ADDRESS=172.28.0.10
|
||||
OPENIM_CHAT_NETWORK_ADDRESS=${OPENIM_CHAT_NETWORK_ADDRESS}
|
||||
|
||||
# Address or hostname for the Prometheus network.
|
||||
# Default: PROMETHEUS_NETWORK_ADDRESS=172.28.0.11
|
||||
PROMETHEUS_NETWORK_ADDRESS=${PROMETHEUS_NETWORK_ADDRESS}
|
||||
|
||||
# Address or hostname for the Grafana network.
|
||||
# Default: GRAFANA_NETWORK_ADDRESS=172.28.0.12
|
||||
GRAFANA_NETWORK_ADDRESS=${GRAFANA_NETWORK_ADDRESS}
|
||||
|
||||
|
||||
# ===============================================
|
||||
# = Component Extension Configuration =
|
||||
# ===============================================
|
||||
|
||||
# ============ Component Extension Configuration ==========
|
||||
# ----- ZooKeeper Configuration -----
|
||||
# Address or hostname for the ZooKeeper service.
|
||||
# Default: ZOOKEEPER_ADDRESS=172.28.0.1
|
||||
ZOOKEEPER_ADDRESS=${ZOOKEEPER_NETWORK_ADDRESS}
|
||||
|
||||
# Port for ZooKeeper service.
|
||||
# Default: ZOOKEEPER_PORT=12181
|
||||
ZOOKEEPER_PORT=${ZOOKEEPER_PORT}
|
||||
|
||||
# ----- MySQL Configuration -----
|
||||
|
||||
# Address or hostname for the MySQL service.
|
||||
# Default: MYSQL_ADDRESS=172.28.0.1
|
||||
MYSQL_ADDRESS=${MYSQL_NETWORK_ADDRESS}
|
||||
|
||||
# Port on which MySQL database service is running.
|
||||
# Default: MYSQL_PORT=13306
|
||||
MYSQL_PORT=${MYSQL_PORT}
|
||||
|
||||
# Password to authenticate with the MySQL database service.
|
||||
# Default: MYSQL_PASSWORD=openIM123
|
||||
MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||
|
||||
# ----- MongoDB Configuration -----
|
||||
# Address or hostname for the MongoDB service.
|
||||
# Default: MONGO_ADDRESS=172.28.0.1
|
||||
MONGO_ADDRESS=${MONGO_NETWORK_ADDRESS}
|
||||
|
||||
# Port on which MongoDB service is running.
|
||||
# Default: MONGO_PORT=37017
|
||||
MONGO_PORT=${MONGO_PORT}
|
||||
|
||||
# Username to authenticate with the MongoDB service.
|
||||
# Default: MONGO_USERNAME=root
|
||||
MONGO_USERNAME=${MONGO_USERNAME}
|
||||
|
||||
# Password to authenticate with the MongoDB service.
|
||||
# Default: MONGO_PASSWORD=openIM123
|
||||
MONGO_PASSWORD=${MONGO_PASSWORD}
|
||||
|
||||
# Name of the database in MongoDB to be used.
|
||||
# Default: MONGO_DATABASE=openIM_v3
|
||||
MONGO_DATABASE=${MONGO_DATABASE}
|
||||
|
||||
# ----- Redis Configuration -----
|
||||
# Address or hostname for the Redis service.
|
||||
# Default: REDIS_ADDRESS=172.28.0.1
|
||||
REDIS_ADDRESS=${REDIS_NETWORK_ADDRESS}
|
||||
|
||||
# Port on which Redis in-memory data structure store is running.
|
||||
# Default: REDIS_PORT=16379
|
||||
REDIS_PORT=${REDIS_PORT}
|
||||
|
||||
# Password to authenticate with the Redis service.
|
||||
# Default: REDIS_PASSWORD=openIM123
|
||||
REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||
|
||||
# ----- Kafka Configuration -----
|
||||
# Address or hostname for the Kafka service.
|
||||
# Default: KAFKA_ADDRESS=172.28.0.1
|
||||
KAFKA_ADDRESS=${KAFKA_NETWORK_ADDRESS}
|
||||
|
||||
# Port on which Kafka distributed streaming platform is running.
|
||||
# Default: KAFKA_PORT=19092
|
||||
KAFKA_PORT=${KAFKA_PORT}
|
||||
|
||||
# Topic in Kafka for storing the latest messages in Redis.
|
||||
# Default: KAFKA_LATESTMSG_REDIS_TOPIC=latestMsgToRedis
|
||||
KAFKA_LATESTMSG_REDIS_TOPIC=${KAFKA_LATESTMSG_REDIS_TOPIC}
|
||||
|
||||
# Topic in Kafka for pushing messages (e.g. notifications or updates).
|
||||
# Default: KAFKA_MSG_PUSH_TOPIC=msgToPush
|
||||
KAFKA_MSG_PUSH_TOPIC=${KAFKA_MSG_PUSH_TOPIC}
|
||||
|
||||
# Topic in Kafka for storing offline messages in MongoDB.
|
||||
# Default: KAFKA_OFFLINEMSG_MONGO_TOPIC=offlineMsgToMongoMysql
|
||||
KAFKA_OFFLINEMSG_MONGO_TOPIC=${KAFKA_OFFLINEMSG_MONGO_TOPIC}
|
||||
|
||||
# ----- MinIO Configuration ----
|
||||
# Address or hostname for the MinIO object storage service.
|
||||
# Default: MINIO_ADDRESS=172.28.0.1
|
||||
MINIO_ADDRESS=${MINIO_NETWORK_ADDRESS}
|
||||
|
||||
# Port on which MinIO object storage service is running.
|
||||
# Default: MINIO_PORT=10005
|
||||
MINIO_PORT=${MINIO_PORT}
|
||||
|
||||
# Access key to authenticate with the MinIO service.
|
||||
# Default: MINIO_ACCESS_KEY=root
|
||||
MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
|
||||
|
||||
# Secret key corresponding to the access key for MinIO authentication.
|
||||
# Default: MINIO_SECRET_KEY=openIM123
|
||||
MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
|
||||
|
||||
# ----- Prometheus Configuration -----
|
||||
# Address or hostname for the Prometheus service.
|
||||
# Default: PROMETHEUS_ADDRESS=172.28.0.1
|
||||
PROMETHEUS_ADDRESS=${PROMETHEUS_NETWORK_ADDRESS}
|
||||
|
||||
# Port on which Prometheus service is running.
|
||||
# Default: PROMETHEUS_PORT=19090
|
||||
PROMETHEUS_PORT=${PROMETHEUS_PORT}
|
||||
|
||||
# ----- Grafana Configuration -----
|
||||
# Address or hostname for the Grafana service.
|
||||
# Default: GRAFANA_ADDRESS=172.28.0.1
|
||||
GRAFANA_ADDRESS=${GRAFANA_NETWORK_ADDRESS}
|
||||
|
||||
# Port on which Grafana service is running.
|
||||
# Default: GRAFANA_PORT=3000
|
||||
GRAFANA_PORT=${GRAFANA_PORT}
|
||||
|
||||
# ======================================
|
||||
# ============ OpenIM Web ===============
|
||||
# ======================================
|
||||
|
||||
# Path to the OpenIM web distribution.
|
||||
# Default: OPENIM_WEB_DIST_PATH=/app/dist
|
||||
OPENIM_WEB_DIST_PATH=${OPENIM_WEB_DIST_PATH}
|
||||
|
||||
# Port on which OpenIM web service is running.
|
||||
# Default: OPENIM_WEB_PORT=11001
|
||||
OPENIM_WEB_PORT=${OPENIM_WEB_PORT}
|
||||
|
||||
# Address or hostname for the OpenIM web service.
|
||||
# Default: OPENIM_WEB_ADDRESS=172.28.0.1
|
||||
OPENIM_WEB_ADDRESS=${OPENIM_WEB_NETWORK_ADDRESS}
|
||||
|
||||
|
||||
# ======================================
|
||||
# ========= OpenIM Server ==============
|
||||
# ======================================
|
||||
|
||||
# Address or hostname for the OpenIM server.
|
||||
# Default: OPENIM_SERVER_ADDRESS=172.28.0.1
|
||||
OPENIM_SERVER_ADDRESS=${OPENIM_SERVER_NETWORK_ADDRESS}
|
||||
|
||||
# Port for the OpenIM WebSockets.
|
||||
# Default: OPENIM_WS_PORT=10001
|
||||
OPENIM_WS_PORT=${OPENIM_WS_PORT}
|
||||
|
||||
# Port for the OpenIM API.
|
||||
# Default: API_OPENIM_PORT=10002
|
||||
API_OPENIM_PORT=${API_OPENIM_PORT}
|
||||
|
||||
|
||||
# ======================================
|
||||
# ========== OpenIM Chat ===============
|
||||
# ======================================
|
||||
|
||||
# Branch name for OpenIM chat.
|
||||
# Default: CHAT_BRANCH=main
|
||||
CHAT_BRANCH=${CHAT_BRANCH}
|
||||
|
||||
# Address or hostname for the OpenIM chat service.
|
||||
# Default: OPENIM_CHAT_ADDRESS=172.28.0.1
|
||||
OPENIM_CHAT_ADDRESS=${OPENIM_CHAT_NETWORK_ADDRESS}
|
||||
|
||||
# Port for the OpenIM chat API.
|
||||
# Default: OPENIM_CHAT_API_PORT=10008
|
||||
OPENIM_CHAT_API_PORT=${OPENIM_CHAT_API_PORT}
|
||||
|
||||
# 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_DATA_DIR}
|
||||
|
||||
|
||||
# ======================================
|
||||
# ========== OpenIM Admin ==============
|
||||
# ======================================
|
||||
|
||||
# Branch name for OpenIM server.
|
||||
# Default: SERVER_BRANCH=main
|
||||
SERVER_BRANCH=${SERVER_BRANCH}
|
||||
|
||||
# Port for the OpenIM admin API.
|
||||
# Default: OPENIM_ADMIN_API_PORT=10009
|
||||
OPENIM_ADMIN_API_PORT=${OPENIM_ADMIN_API_PORT}
|
||||
DATA_DIR=${DATA_DIR}
|
||||
@@ -144,7 +144,7 @@ source ./environment.sh
|
||||
cat > openim-api.service.template <<EOF
|
||||
[Unit]
|
||||
Description=OpenIM Server API
|
||||
Documentation=https://github.com/oepnimsdk/open-im-server/blob/master/init/README.md
|
||||
Documentation=https://github.com/marmotedu/iam/blob/master/init/README.md
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=${OPENIM_DATA_DIR}/openim-api
|
||||
@@ -179,7 +179,7 @@ do
|
||||
cat > $service.service.template <<EOF
|
||||
[Unit]
|
||||
Description=OpenIM Server - $service
|
||||
Documentation=https://github.com/oepnimsdk/open-im-server/blob/master/init/README.md
|
||||
Documentation=https://github.com/marmotedu/iam/blob/master/init/README.md
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=${OPENIM_DATA_DIR}/$service
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=OPENIM OPENIM API
|
||||
Documentation=Control interface for the OpenIM API service.
|
||||
Documentation=https://github.com/openimsdk/open-im-server/blob/main/deployment/init/README.md
|
||||
Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=${OPENIM_DATA_DIR}/openim-api
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=OPENIM OPENIM CMDUTILS
|
||||
Documentation=Utility toolkit for common OpenIM command-line operations.
|
||||
Documentation=https://github.com/openimsdk/open-im-server/blob/main/deployment/init/README.md
|
||||
Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=${OPENIM_DATA_DIR}/openim-cmdutils
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=OPENIM OPENIM CRONTASK
|
||||
Documentation=Manages the OpenIM CronTask service, with both direct and systemctl installation methods.
|
||||
Documentation=https://github.com/openimsdk/open-im-server/blob/main/deployment/init/README.md
|
||||
Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=${OPENIM_DATA_DIR}/openim-crontask
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=OPENIM OPENIM MSGGATEWAY
|
||||
Documentation=https://github.com/openimsdk/open-im-server/blob/main/deployment/init/README.md
|
||||
Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=${OPENIM_DATA_DIR}/openim-msggateway
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=OPENIM OPENIM MSGTRANSFER
|
||||
Documentation=https://github.com/openimsdk/open-im-server/blob/main/deployment/init/README.md
|
||||
Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=${OPENIM_DATA_DIR}/openim-msgtransfer
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=OPENIM OPENIM PUSH
|
||||
Documentation=Interface for controlling the OpenIM Push Notification service.
|
||||
Documentation=https://github.com/openimsdk/open-im-server/blob/main/deployment/init/README.md
|
||||
Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=${OPENIM_DATA_DIR}/openim-push
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=OPENIM OPENIM RPC AUTH
|
||||
Documentation=https://github.com/openimsdk/open-im-server/blob/main/deployment/init/README.md
|
||||
Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=${OPENIM_DATA_DIR}/openim-rpc-auth
|
||||
|
||||
@@ -86,7 +86,7 @@ redis:
|
||||
kafka:
|
||||
username: ${KAFKA_USERNAME}
|
||||
password: ${KAFKA_PASSWORD}
|
||||
addr: [ ${KAFKA_ADDRESS}:${KAFKA_PORT} ]
|
||||
addr: [ ${KAFKA_ADDR}:${KAFKA_PORT} ]
|
||||
latestMsgToRedis:
|
||||
topic: "${KAFKA_LATESTMSG_REDIS_TOPIC}"
|
||||
offlineMsgToMongo:
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
#fixme Clone openIM Server project before using docker-compose,project address:https://github.com/OpenIMSDK/Open-IM-Server.git
|
||||
version: "3"
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
ports:
|
||||
- 13306:3306
|
||||
- 23306:33060
|
||||
container_name: mysql
|
||||
volumes:
|
||||
- ${DATA_DIR}/components/mysql/data:/var/lib/mysql
|
||||
- /etc/localtime:/etc/localtime
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${PASSWORD}
|
||||
restart: always
|
||||
|
||||
mongodb:
|
||||
image: mongo:6.0.2
|
||||
ports:
|
||||
- 37017:27017
|
||||
container_name: mongo
|
||||
command: --wiredTigerCacheSizeGB 1 --auth
|
||||
volumes:
|
||||
- ${DATA_DIR}/components/mongodb/data/db:/data/db
|
||||
- ${DATA_DIR}/components/mongodb/data/logs:/data/logs
|
||||
- ${DATA_DIR}/components/mongodb/data/conf:/etc/mongo
|
||||
- ./scripts/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
# cache
|
||||
- wiredTigerCacheSizeGB=1
|
||||
- MONGO_INITDB_ROOT_USERNAME=${USER}
|
||||
- MONGO_INITDB_ROOT_PASSWORD=${PASSWORD}
|
||||
- MONGO_INITDB_DATABASE=openIM
|
||||
- MONGO_USERNAME=${USER}
|
||||
- MONGO_PASSWORD=${PASSWORD}
|
||||
restart: always
|
||||
|
||||
redis:
|
||||
image: redis:7.0.0
|
||||
ports:
|
||||
- 16379:6379
|
||||
container_name: redis
|
||||
volumes:
|
||||
- ${DATA_DIR}/components/redis/data:/data
|
||||
#redis config file
|
||||
- ${DATA_DIR}/components/redis/config/redis.conf:/usr/local/redis/config/redis.conf
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
restart: always
|
||||
sysctls:
|
||||
net.core.somaxconn: 1024
|
||||
command: redis-server --requirepass ${PASSWORD} --appendonly yes
|
||||
|
||||
zookeeper:
|
||||
image: wurstmeister/zookeeper
|
||||
ports:
|
||||
- 2181:2181
|
||||
container_name: zookeeper
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
restart: always
|
||||
network_mode: "host"
|
||||
|
||||
kafka:
|
||||
image: wurstmeister/kafka
|
||||
container_name: kafka
|
||||
restart: always
|
||||
ports:
|
||||
- 9092:9092
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
KAFKA_BROKER_ID: 0
|
||||
KAFKA_ZOOKEEPER_CONNECT: 127.0.0.1:2181
|
||||
KAFKA_CREATE_TOPICS: "latestMsgToRedis:8:1,msgToPush:8:1,offlineMsgToMongoMysql:8:1"
|
||||
KAFKA_ADVERTISED_LISTENERS: INSIDE://127.0.0.1:9092,OUTSIDE://103.116.45.174:9092
|
||||
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9093
|
||||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT"
|
||||
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
|
||||
depends_on:
|
||||
- zookeeper
|
||||
network_mode: "host"
|
||||
|
||||
minio:
|
||||
image: minio/minio
|
||||
ports:
|
||||
- 10005:9000
|
||||
- 9090:9090
|
||||
container_name: minio
|
||||
volumes:
|
||||
- ${DATA_DIR}/components/mnt/data:/data
|
||||
- ${DATA_DIR}/components/mnt/config:/root/.minio
|
||||
environment:
|
||||
MINIO_ROOT_USER: ${USER}
|
||||
MINIO_ROOT_PASSWORD: ${PASSWORD}
|
||||
restart: always
|
||||
command: minio server /data --console-address ':9090'
|
||||
|
||||
openim-server:
|
||||
image: ghcr.io/openimsdk/openim-server:main
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main
|
||||
# image: openim/openim-server:main
|
||||
container_name: openim-server
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "./scripts/check-all.sh"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
volumes:
|
||||
- ./logs:/openim/openim-server/logs
|
||||
- ./config:/openim/openim-server/config
|
||||
- ./scripts:/openim/openim-server/scripts
|
||||
restart: always
|
||||
depends_on:
|
||||
- zookeeper
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- minio
|
||||
network_mode: "host"
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "1g"
|
||||
max-file: "2"
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
volumes:
|
||||
- ./.docker-compose_cfg/prometheus-compose.yml:/etc/prometheus/prometheus.yml
|
||||
container_name: prometheus
|
||||
# ports:
|
||||
# - 9091:9091
|
||||
depends_on:
|
||||
- openim-server
|
||||
command: --web.listen-address=:9091 --config.file="/etc/prometheus/prometheus.yml"
|
||||
network_mode: "host"
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana
|
||||
volumes:
|
||||
- ./.docker-compose_cfg/datasource-compose.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
|
||||
- ./.docker-compose_cfg/grafana.ini:/etc/grafana/grafana.ini
|
||||
- ./.docker-compose_cfg/node-exporter-full_rev1.json:/var/lib/grafana/dashboards/node-exporter-full_rev1.json
|
||||
container_name: grafana
|
||||
depends_on:
|
||||
- prometheus
|
||||
network_mode: "host"
|
||||
|
||||
|
||||
# node-exporter:
|
||||
# image: quay.io/prometheus/node-exporter
|
||||
# container_name: node-exporter
|
||||
# restart: always
|
||||
# ports:
|
||||
# - "9100:9100"
|
||||
@@ -1,206 +0,0 @@
|
||||
#fixme Clone openIM Server project before using docker-compose,project address:https://github.com/OpenIMSDK/Open-IM-Server.git
|
||||
version: '3'
|
||||
|
||||
networks:
|
||||
server:
|
||||
driver: bridge
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: '${DOCKER_BRIDGE_SUBNET}'
|
||||
gateway: '${DOCKER_BRIDGE_GATEWAY}'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
ports:
|
||||
- "${MYSQL_PORT}:3306"
|
||||
container_name: mysql
|
||||
volumes:
|
||||
- "${DATA_DIR}/components/mysql/data:/var/lib/mysql"
|
||||
- "/etc/localtime:/etc/localtime"
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: "${MYSQL_PASSWORD}"
|
||||
restart: always
|
||||
networks:
|
||||
server:
|
||||
ipv4_address: ${MYSQL_NETWORK_ADDRESS}
|
||||
|
||||
mongodb:
|
||||
image: mongo:6.0.2
|
||||
ports:
|
||||
- "${MONGO_PORT}:27017"
|
||||
container_name: mongo
|
||||
command: --wiredTigerCacheSizeGB 1 --auth
|
||||
volumes:
|
||||
- "${DATA_DIR}/components/mongodb/data/db:/data/db"
|
||||
- "${DATA_DIR}/components/mongodb/data/logs:/data/logs"
|
||||
- "${DATA_DIR}/components/mongodb/data/conf:/etc/mongo"
|
||||
- ./scripts/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh"
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- wiredTigerCacheSizeGB=1
|
||||
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USERNAME}
|
||||
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD}
|
||||
- MONGO_INITDB_DATABASE=${MONGO_DATABASE}
|
||||
restart: always
|
||||
networks:
|
||||
server:
|
||||
ipv4_address: ${MONGO_NETWORK_ADDRESS}
|
||||
|
||||
redis:
|
||||
image: redis:7.0.0
|
||||
container_name: redis
|
||||
ports:
|
||||
- "${REDIS_PORT}:6379"
|
||||
volumes:
|
||||
- "${DATA_DIR}/components/redis/data:/data"
|
||||
- "${DATA_DIR}/components/redis/config/redis.conf:/usr/local/redis/config/redis.conf"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
restart: always
|
||||
sysctls:
|
||||
net.core.somaxconn: 1024
|
||||
command: redis-server --requirepass ${REDIS_PASSWORD} --appendonly yes
|
||||
networks:
|
||||
server:
|
||||
ipv4_address: ${REDIS_NETWORK_ADDRESS}
|
||||
|
||||
zookeeper:
|
||||
image: bitnami/zookeeper:3.8
|
||||
container_name: zookeeper
|
||||
ports:
|
||||
- "${ZOOKEEPER_PORT}:2181"
|
||||
volumes:
|
||||
- "/etc/localtime:/etc/localtime"
|
||||
environment:
|
||||
- ALLOW_ANONYMOUS_LOGIN=yes
|
||||
- TZ="Asia/Shanghai"
|
||||
restart: always
|
||||
networks:
|
||||
server:
|
||||
ipv4_address: ${ZOOKEEPER_NETWORK_ADDRESS}
|
||||
|
||||
kafka:
|
||||
image: 'bitnami/kafka:3.5.1'
|
||||
container_name: kafka
|
||||
user: root
|
||||
restart: always
|
||||
ports:
|
||||
- "${KAFKA_PORT}:9094"
|
||||
volumes:
|
||||
- ./scripts/create_topic.sh:/opt/bitnami/kafka/create_topic.sh
|
||||
- ${DATA_DIR}/components/kafka:/bitnami/kafka
|
||||
command: >
|
||||
bash -c "
|
||||
/opt/bitnami/scripts/kafka/run.sh & sleep 5; /opt/bitnami/kafka/create_topic.sh; wait
|
||||
"
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- KAFKA_CFG_NODE_ID=0
|
||||
- KAFKA_CFG_PROCESS_ROLES=controller,broker
|
||||
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@<your_host>:9093
|
||||
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
|
||||
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://${DOCKER_BRIDGE_GATEWAY}:${KAFKA_PORT}
|
||||
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
|
||||
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
|
||||
networks:
|
||||
server:
|
||||
ipv4_address: ${KAFKA_NETWORK_ADDRESS}
|
||||
|
||||
minio:
|
||||
image: minio/minio
|
||||
ports:
|
||||
- "${MINIO_PORT}:9000"
|
||||
- "9090:9090"
|
||||
container_name: minio
|
||||
volumes:
|
||||
- "${DATA_DIR}/components/mnt/data:/data"
|
||||
- "${DATA_DIR}/components/mnt/config:/root/.minio"
|
||||
environment:
|
||||
MINIO_ROOT_USER: "${MINIO_ACCESS_KEY}"
|
||||
MINIO_ROOT_PASSWORD: "${MINIO_SECRET_KEY}"
|
||||
restart: always
|
||||
command: minio server /data --console-address ':9090'
|
||||
networks:
|
||||
server:
|
||||
ipv4_address: ${MINIO_NETWORK_ADDRESS}
|
||||
|
||||
openim-web:
|
||||
image: ghcr.io/openimsdk/openim-web:v3.5.0-docker
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web:v3.5.0-docker
|
||||
# image: openim/openim-web:v3.5.0-docker
|
||||
container_name: openim-web
|
||||
environment:
|
||||
- OPENIM_WEB_DIST_PATH=${OPENIM_WEB_DIST_PATH}
|
||||
- OPENIM_WEB_PORT=${OPENIM_WEB_PORT}
|
||||
restart: always
|
||||
ports:
|
||||
- "${OPENIM_WEB_PORT}:11001"
|
||||
networks:
|
||||
server:
|
||||
ipv4_address: ${OPENIM_WEB_NETWORK_ADDRESS}
|
||||
|
||||
# openim-server:
|
||||
# image: ghcr.io/openimsdk/openim-server:main
|
||||
# # image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main
|
||||
# # image: openim/openim-server:main
|
||||
# # build: .
|
||||
# container_name: openim-server
|
||||
# ports:
|
||||
# - ${OPENIM_WS_PORT}:10001
|
||||
# - ${API_OPENIM_PORT}:10002
|
||||
# healthcheck:
|
||||
# test: ["CMD", "/openim/openim-server/scripts/check-all.sh"]
|
||||
# interval: 300s
|
||||
# timeout: 10s
|
||||
# retries: 5
|
||||
# volumes:
|
||||
# - ./logs:/openim/openim-server/logs
|
||||
# - ./_output/logs:/openim/openim-server/_output/logs
|
||||
# - ./config:/openim/openim-server/config
|
||||
# - ./scripts:/openim/openim-server/scripts
|
||||
# restart: always
|
||||
# depends_on:
|
||||
# - kafka
|
||||
# - mysql
|
||||
# - mongodb
|
||||
# - redis
|
||||
# - minio
|
||||
# logging:
|
||||
# driver: json-file
|
||||
# options:
|
||||
# max-size: "1g"
|
||||
# max-file: "2"
|
||||
# networks:
|
||||
# server:
|
||||
# ipv4_address: ${OPENIM_SERVER_NETWORK_ADDRESS}
|
||||
|
||||
# prometheus:
|
||||
# image: prom/prometheus
|
||||
# volumes:
|
||||
# - ./.docker-compose_cfg/prometheus-compose.yml:/etc/prometheus/prometheus.yml
|
||||
# container_name: prometheus
|
||||
# ports:
|
||||
# - ${PROMETHEUS_PORT}:9091
|
||||
# depends_on:
|
||||
# - openim-server
|
||||
# command: --web.listen-address=:9091 --config.file="/etc/prometheus/prometheus.yml"
|
||||
# networks:
|
||||
# openim-server:
|
||||
# ipv4_address: ${PROMETHEUS_NETWORK_ADDRESS}
|
||||
|
||||
# grafana:
|
||||
# image: grafana/grafana
|
||||
# volumes:
|
||||
# - ./.docker-compose_cfg/datasource-compose.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
|
||||
# - ./.docker-compose_cfg/grafana.ini:/etc/grafana/grafana.ini
|
||||
# - ./.docker-compose_cfg/node-exporter-full_rev1.json:/var/lib/grafana/dashboards/node-exporter-full_rev1.json
|
||||
# container_name: grafana
|
||||
# ports:
|
||||
# - ${GRAFANA_PORT}:3000
|
||||
# depends_on:
|
||||
# - prometheus
|
||||
# networks:
|
||||
# openim-server:
|
||||
# ipv4_address: ${GRAFANA_NETWORK_ADDRESS}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user