mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-09 11:35:59 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 734f2a5116 | |||
| 1ecfbb6563 |
@@ -28,6 +28,114 @@ env:
|
|||||||
GO_VERSION: "1.20"
|
GO_VERSION: "1.20"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build-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-server:latest
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4.6.0
|
||||||
|
with:
|
||||||
|
images: openim/openim-server
|
||||||
|
# generate Docker tags based on the following events/attributes
|
||||||
|
tags: |
|
||||||
|
type=schedule
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
type=sha
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
# linux/ppc64le,linux/s390x
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
build-aliyun:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
# registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:latest
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta2
|
||||||
|
uses: docker/metadata-action@v4.6.0
|
||||||
|
with:
|
||||||
|
images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web
|
||||||
|
|
||||||
|
- name: Log in to AliYun Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: registry.cn-hangzhou.aliyuncs.com
|
||||||
|
username: ${{ secrets.ALIREGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.ALIREGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
# linux/ppc64le,linux/s390x
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.meta2.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta2.outputs.labels }}
|
||||||
|
|
||||||
|
build-ghcr:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
# ghcr.io/openimsdk/openim-server:latest
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta3
|
||||||
|
uses: docker/metadata-action@v4.6.0
|
||||||
|
with:
|
||||||
|
images: ghcr.io/openimsdk/openim-web
|
||||||
|
|
||||||
|
- 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: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
# linux/ppc64le,linux/s390x
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.meta3.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta3.outputs.labels }}
|
||||||
|
|
||||||
build-openim-web-dockerhub:
|
build-openim-web-dockerhub:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -38,12 +146,12 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
# docker.io/openim/openim-web:latest
|
# docker.io/openim/openim-server:latest
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4.6.0
|
uses: docker/metadata-action@v4.6.0
|
||||||
with:
|
with:
|
||||||
images: openim/openim-web
|
images: openim/openim-server
|
||||||
# generate Docker tags based on the following events/attributes
|
# generate Docker tags based on the following events/attributes
|
||||||
tags: |
|
tags: |
|
||||||
type=schedule
|
type=schedule
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ jobs:
|
|||||||
version: 2.x
|
version: 2.x
|
||||||
- name: Docker Operations
|
- name: Docker Operations
|
||||||
run: |
|
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 docker compose up -d
|
||||||
sudo sleep 60
|
sudo sleep 60
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
<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://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://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://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>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
@@ -82,7 +81,7 @@ Further enhancing your experience, we also provide an SDK client, wherein most c
|
|||||||
|
|
||||||
5. **Open Source :open_hands:**
|
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)
|
✅ 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)
|
||||||
|
|
||||||
@@ -112,7 +111,7 @@ Further enhancing your experience, we also provide an SDK client, wherein most c
|
|||||||
|
|
||||||
## :rocket: Quick Start
|
## :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
|
```bash
|
||||||
$ make demo
|
$ make demo
|
||||||
@@ -120,18 +119,64 @@ $ 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:
|
🤲 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:
|
||||||
|
|
||||||
<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
|
|
||||||
|
|
||||||
+ [https://github.com/openimsdk/openim-docker](https://github.com/openimsdk/openim-docker)
|
> docker compose will not be maintained in future versions, but it is still the easiest and most convenient way to organize docker compose deployments into a separate project https://github.com/openim-sigs/openim-docker to maintain.
|
||||||
|
|
||||||
|
**1. Clone the project**
|
||||||
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone -b main https://github.com/openim-sigs/openim-docker openim/openim-docker && export openim=$(pwd)/openim && cd $openim/openim-docker && ./scripts/init-config.sh && docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
> **Note**
|
> **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
|
> 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
|
||||||
|
|
||||||
|
Modify the automation script:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cat scripts/install/environment.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Recommended using environment variables:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export PASSWORD="openIM123" # Set password
|
||||||
|
export USER="root" # Set username
|
||||||
|
# Choose chat version and server version https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/images.md, eg: main, release-v*.*
|
||||||
|
export CHAT_BRANCH="main"
|
||||||
|
export SERVER_BRANCH="main"
|
||||||
|
#... Other environment variables
|
||||||
|
# MONGO_USERNAME: This sets the MongoDB username
|
||||||
|
# MONGO_PASSWORD: Set the MongoDB password
|
||||||
|
# MONGO_DATABASE: Sets the MongoDB database name
|
||||||
|
# MINIO_ENDPOINT: set the MinIO service address
|
||||||
|
# DOCKER_BRIDGE_SUBNET: set the docker bridge network address
|
||||||
|
export DOCKER_BRIDGE_SUBNET="172.28.0.0/16"
|
||||||
|
# API_URL: under network environment, set OpenIM Server API address
|
||||||
|
export API_URL="http://127.0.0.1:10002"
|
||||||
|
```
|
||||||
|
|
||||||
|
If you wish to use more custom features, read our [config documentation](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md).
|
||||||
|
|
||||||
|
|
||||||
|
Next, update the configuration using make init:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ make init
|
||||||
|
$ git diff
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details> <summary>Compile from Source</summary>
|
<details> <summary>Compile from Source</summary>
|
||||||
@@ -166,11 +211,16 @@ Deploy basic components at the click of a command:
|
|||||||
```bash
|
```bash
|
||||||
# install openim dependency
|
# 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
|
$ 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
|
$ curl https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml -o basic-openim-server-dependency.yml && make init && docker compose -f basic-openim-server-dependency.yml up -d && make start
|
||||||
```
|
```
|
||||||
|
|
||||||
> `make help` to help you see the instructions supported by OpenIM.
|
> `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.
|
You can use the `make help-all` see OpenIM in action.
|
||||||
|
|
||||||
@@ -190,9 +240,8 @@ Read: https://github.com/openimsdk/open-im-server/blob/main/deployments/README.m
|
|||||||
|
|
||||||
</details>
|
</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 |
|
| TCP Port | Description | Operation |
|
||||||
| --------- | ------------------------------------------------------------ | ----------------------------------------------------- |
|
| --------- | ------------------------------------------------------------ | ----------------------------------------------------- |
|
||||||
@@ -200,6 +249,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: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 |
|
| 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
|
+ chat warehouse: https://github.com/OpenIMSDK/chat
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -139,7 +139,7 @@ object:
|
|||||||
accessKeyID: "root"
|
accessKeyID: "root"
|
||||||
secretAccessKey: "openIM123"
|
secretAccessKey: "openIM123"
|
||||||
sessionToken: ''
|
sessionToken: ''
|
||||||
signEndpoint: "http://172.28.0.1:10002"
|
signEndpoint: "http://172.28.0.1:10005"
|
||||||
cos:
|
cos:
|
||||||
bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com
|
bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com
|
||||||
secretID: ''
|
secretID: ''
|
||||||
|
|||||||
@@ -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.
|
|
||||||
@@ -35,40 +35,4 @@ version: 0.1.0
|
|||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# 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.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
# It is recommended to use it with quotes.
|
# It is recommended to use it with quotes.
|
||||||
appVersion: "default"
|
appVersion: "1.16.0"
|
||||||
|
|
||||||
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 # 包含简要使用说明的纯文本文件
|
|
||||||
```
|
|
||||||
+103
-40
@@ -1,4 +1,4 @@
|
|||||||
#fixme Clone openIM Server project before using docker-compose,project address:https://github.com/OpenIMSDK/Open-IM-Server.git
|
#fixme Clone openIM Server project before using docker-compose,project address:https://github.com/openimsdk/open-im-server.git
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
@@ -10,6 +10,29 @@ networks:
|
|||||||
- subnet: '${DOCKER_BRIDGE_SUBNET}'
|
- subnet: '${DOCKER_BRIDGE_SUBNET}'
|
||||||
gateway: '${DOCKER_BRIDGE_GATEWAY}'
|
gateway: '${DOCKER_BRIDGE_GATEWAY}'
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mysql_data:
|
||||||
|
mongodb_data:
|
||||||
|
mongodb_logs:
|
||||||
|
mongodb_config:
|
||||||
|
redis_data:
|
||||||
|
redis_config:
|
||||||
|
kafka_data:
|
||||||
|
minio_data:
|
||||||
|
minio_config:
|
||||||
|
openim_server_logs:
|
||||||
|
openim_server_output:
|
||||||
|
openim_server_config:
|
||||||
|
openim_server_scripts:
|
||||||
|
openim_chat_logs:
|
||||||
|
openim_chat_output:
|
||||||
|
openim_chat_config:
|
||||||
|
openim_chat_scripts:
|
||||||
|
openim_server_prometheus_config:
|
||||||
|
openim_server_grafana_datasource:
|
||||||
|
openim_server_grafana_config:
|
||||||
|
openim_server_grafana_dashboard:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:5.7
|
image: mysql:5.7
|
||||||
@@ -17,7 +40,7 @@ services:
|
|||||||
- "${MYSQL_PORT}:3306"
|
- "${MYSQL_PORT}:3306"
|
||||||
container_name: mysql
|
container_name: mysql
|
||||||
volumes:
|
volumes:
|
||||||
- "${DATA_DIR}/components/mysql/data:/var/lib/mysql"
|
- mysql_data:/var/lib/mysql
|
||||||
- "/etc/localtime:/etc/localtime"
|
- "/etc/localtime:/etc/localtime"
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: "${MYSQL_PASSWORD}"
|
MYSQL_ROOT_PASSWORD: "${MYSQL_PASSWORD}"
|
||||||
@@ -33,10 +56,10 @@ services:
|
|||||||
container_name: mongo
|
container_name: mongo
|
||||||
command: --wiredTigerCacheSizeGB 1 --auth
|
command: --wiredTigerCacheSizeGB 1 --auth
|
||||||
volumes:
|
volumes:
|
||||||
- "${DATA_DIR}/components/mongodb/data/db:/data/db"
|
- mongodb_data:/data/db
|
||||||
- "${DATA_DIR}/components/mongodb/data/logs:/data/logs"
|
- mongodb_logs:/data/logs
|
||||||
- "${DATA_DIR}/components/mongodb/data/conf:/etc/mongo"
|
- mongodb_config:/etc/mongo
|
||||||
- ./scripts/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro"
|
- "./scripts/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro"
|
||||||
environment:
|
environment:
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
- wiredTigerCacheSizeGB=1
|
- wiredTigerCacheSizeGB=1
|
||||||
@@ -54,8 +77,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "${REDIS_PORT}:6379"
|
- "${REDIS_PORT}:6379"
|
||||||
volumes:
|
volumes:
|
||||||
- "${DATA_DIR}/components/redis/data:/data"
|
- redis_data:/data
|
||||||
- "${DATA_DIR}/components/redis/config/redis.conf:/usr/local/redis/config/redis.conf"
|
- redis_config:/usr/local/redis/config/redis.conf
|
||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
restart: always
|
restart: always
|
||||||
@@ -95,6 +118,8 @@ services:
|
|||||||
bash -c "
|
bash -c "
|
||||||
/opt/bitnami/scripts/kafka/run.sh & sleep 5; /opt/bitnami/kafka/create_topic.sh; wait
|
/opt/bitnami/scripts/kafka/run.sh & sleep 5; /opt/bitnami/kafka/create_topic.sh; wait
|
||||||
"
|
"
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
environment:
|
environment:
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
- KAFKA_CFG_NODE_ID=0
|
- KAFKA_CFG_NODE_ID=0
|
||||||
@@ -115,8 +140,8 @@ services:
|
|||||||
- "9090:9090"
|
- "9090:9090"
|
||||||
container_name: minio
|
container_name: minio
|
||||||
volumes:
|
volumes:
|
||||||
- "${DATA_DIR}/components/mnt/data:/data"
|
- minio_data:/data
|
||||||
- "${DATA_DIR}/components/mnt/config:/root/.minio"
|
- minio_config:/root/.minio
|
||||||
environment:
|
environment:
|
||||||
MINIO_ROOT_USER: "${MINIO_ACCESS_KEY}"
|
MINIO_ROOT_USER: "${MINIO_ACCESS_KEY}"
|
||||||
MINIO_ROOT_PASSWORD: "${MINIO_SECRET_KEY}"
|
MINIO_ROOT_PASSWORD: "${MINIO_SECRET_KEY}"
|
||||||
@@ -127,8 +152,8 @@ services:
|
|||||||
ipv4_address: ${MINIO_NETWORK_ADDRESS}
|
ipv4_address: ${MINIO_NETWORK_ADDRESS}
|
||||||
|
|
||||||
openim-web:
|
openim-web:
|
||||||
# image: ghcr.io/openimsdk/openim-web:latest
|
image: ghcr.io/openimsdk/openim-web:latest
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web:latest
|
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web:latest
|
||||||
# image: openim/openim-web:latest
|
# image: openim/openim-web:latest
|
||||||
container_name: openim-web
|
container_name: openim-web
|
||||||
environment:
|
environment:
|
||||||
@@ -143,7 +168,7 @@ services:
|
|||||||
|
|
||||||
# openim-server:
|
# openim-server:
|
||||||
# image: ghcr.io/openimsdk/openim-server:main
|
# image: ghcr.io/openimsdk/openim-server:main
|
||||||
# # image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main
|
# # image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:release-v3.3
|
||||||
# # image: openim/openim-server:main
|
# # image: openim/openim-server:main
|
||||||
# # build: .
|
# # build: .
|
||||||
# container_name: openim-server
|
# container_name: openim-server
|
||||||
@@ -176,31 +201,69 @@ services:
|
|||||||
# server:
|
# server:
|
||||||
# ipv4_address: ${OPENIM_SERVER_NETWORK_ADDRESS}
|
# ipv4_address: ${OPENIM_SERVER_NETWORK_ADDRESS}
|
||||||
|
|
||||||
# prometheus:
|
# openim-chat:
|
||||||
# image: prom/prometheus
|
# image: ghcr.io/openimsdk/openim-chat:main
|
||||||
# volumes:
|
# # image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat:main
|
||||||
# - ./.docker-compose_cfg/prometheus-compose.yml:/etc/prometheus/prometheus.yml
|
# # image: ghcr.io/openimsdk/openim-chat:main
|
||||||
# container_name: prometheus
|
# container_name: openim-chat
|
||||||
# ports:
|
# healthcheck:
|
||||||
# - ${PROMETHEUS_PORT}:9091
|
# test: ["CMD", "/openim/openim-chat/scripts/check_all.sh"]
|
||||||
# depends_on:
|
# interval: 300s
|
||||||
# - openim-server
|
# timeout: 10s
|
||||||
# command: --web.listen-address=:9091 --config.file="/etc/prometheus/prometheus.yml"
|
# retries: 5
|
||||||
# networks:
|
# ports:
|
||||||
# openim-server:
|
# - ${OPENIM_CHAT_API_PORT}:10008
|
||||||
# ipv4_address: ${PROMETHEUS_NETWORK_ADDRESS}
|
# - ${OPENIM_ADMIN_API_PORT}:10009
|
||||||
|
# volumes:
|
||||||
|
# - openim_chat_logs:/openim/openim-chat/logs
|
||||||
|
# - openim_chat_output:/openim/openim-chat/_output
|
||||||
|
# - openim_chat_config:/openim/openim-chat/config
|
||||||
|
# - openim_chat_scripts:/openim/openim-chat/scripts
|
||||||
|
# restart: always
|
||||||
|
# user: root:root
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - mongodb
|
||||||
|
# - redis
|
||||||
|
# - minio
|
||||||
|
# - server
|
||||||
|
# logging:
|
||||||
|
# driver: json-file
|
||||||
|
# options:
|
||||||
|
# max-size: "1g"
|
||||||
|
# max-file: "2"
|
||||||
|
# networks:
|
||||||
|
# server:
|
||||||
|
# ipv4_address: ${OPENIM_CHAT_NETWORK_ADDRESS}
|
||||||
|
|
||||||
# grafana:
|
# prometheus:
|
||||||
# image: grafana/grafana
|
# image: prom/prometheus
|
||||||
# volumes:
|
# volumes:
|
||||||
# - ./.docker-compose_cfg/datasource-compose.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
|
# - openim_server_prometheus_config:/etc/prometheus
|
||||||
# - ./.docker-compose_cfg/grafana.ini:/etc/grafana/grafana.ini
|
# container_name: prometheus
|
||||||
# - ./.docker-compose_cfg/node-exporter-full_rev1.json:/var/lib/grafana/dashboards/node-exporter-full_rev1.json
|
# ports:
|
||||||
# container_name: grafana
|
# - ${PROMETHEUS_PORT}:9091
|
||||||
# ports:
|
# command: --web.listen-address=:9091 --config.file="/etc/prometheus"
|
||||||
# - ${GRAFANA_PORT}:3000
|
# networks:
|
||||||
# depends_on:
|
# server:
|
||||||
# - prometheus
|
# ipv4_address: ${PROMETHEUS_NETWORK_ADDRESS}
|
||||||
# networks:
|
|
||||||
# openim-server:
|
# grafana:
|
||||||
# ipv4_address: ${GRAFANA_NETWORK_ADDRESS}
|
# image: grafana/grafana
|
||||||
|
# volumes:
|
||||||
|
# - openim_server_grafana_datasource:/etc/grafana/provisioning/datasources
|
||||||
|
# - openim_server_grafana_config:/etc/grafana
|
||||||
|
# - openim_server_grafana_dashboard:/var/lib/grafana/dashboards
|
||||||
|
# container_name: grafana
|
||||||
|
# ports:
|
||||||
|
# - ${GRAFANA_PORT}:3000
|
||||||
|
# networks:
|
||||||
|
# server:
|
||||||
|
# ipv4_address: ${GRAFANA_NETWORK_ADDRESS}
|
||||||
|
|
||||||
|
# node-exporter:
|
||||||
|
# image: quay.io/prometheus/node-exporter
|
||||||
|
# container_name: node-exporter
|
||||||
|
# restart: always
|
||||||
|
# ports:
|
||||||
|
# - "9100:9100"
|
||||||
|
|||||||
+2
-21
@@ -13,20 +13,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
if ! command -v pv &> /dev/null
|
|
||||||
then
|
|
||||||
echo "pv not found, installing..."
|
|
||||||
if [ -e /etc/debian_version ]; then
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y pv
|
|
||||||
elif [ -e /etc/redhat-release ]; then
|
|
||||||
sudo yum install -y pv
|
|
||||||
else
|
|
||||||
echo "Unsupported OS, please install pv manually."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
readonly t_reset=$(tput sgr0)
|
readonly t_reset=$(tput sgr0)
|
||||||
readonly green=$(tput bold; tput setaf 2)
|
readonly green=$(tput bold; tput setaf 2)
|
||||||
readonly yellow=$(tput bold; tput setaf 3)
|
readonly yellow=$(tput bold; tput setaf 3)
|
||||||
@@ -72,11 +58,8 @@ clear
|
|||||||
|
|
||||||
openim::util::desc "========> Start the basic openim docker components"
|
openim::util::desc "========> Start the basic openim docker components"
|
||||||
openim::util::desc "========> You can use docker-compose ps to check the status of the container"
|
openim::util::desc "========> You can use docker-compose ps to check the status of the container"
|
||||||
openim::util::run "docker compose up -d"
|
openim::util::run "curl https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml -o basic-openim-server-dependency.yml"
|
||||||
clear
|
openim::util::run "docker compose up --f basic-openim-server-dependency.yml up -d"
|
||||||
|
|
||||||
openim::util::desc "========> Use make init-githooks Initialize git hooks "
|
|
||||||
openim::util::run "make init-githooks"
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
openim::util::desc "The specification is pretty high, you need to be bound on your branch name, as well as commit messages"
|
openim::util::desc "The specification is pretty high, you need to be bound on your branch name, as well as commit messages"
|
||||||
@@ -150,5 +133,3 @@ clear
|
|||||||
openim::util::desc "Add copyright"
|
openim::util::desc "Add copyright"
|
||||||
openim::util::run "make add-copyright"
|
openim::util::run "make add-copyright"
|
||||||
clear
|
clear
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
|||||||
trap 'openim::util::onCtrlC' INT
|
trap 'openim::util::onCtrlC' INT
|
||||||
|
|
||||||
chmod +x "${OPENIM_ROOT}"/scripts/*.sh
|
chmod +x "${OPENIM_ROOT}"/scripts/*.sh
|
||||||
|
"${OPENIM_ROOT}"/scripts/init-config.sh
|
||||||
|
|
||||||
openim::util::ensure_docker_daemon_connectivity
|
openim::util::ensure_docker_daemon_connectivity
|
||||||
|
|
||||||
@@ -39,12 +40,10 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
pushd "${OPENIM_ROOT}"
|
pushd "${OPENIM_ROOT}"
|
||||||
${DOCKER_COMPOSE_COMMAND} stop
|
|
||||||
curl https://gitee.com/openimsdk/openim-docker/raw/main/example/full-openim-server-and-chat.yml -o docker-compose.yml && make init && docker compose up -d
|
${DOCKER_COMPOSE_COMMAND} up -d
|
||||||
"${OPENIM_ROOT}"/scripts/init-config.sh
|
|
||||||
${DOCKER_COMPOSE_COMMAND} up --remove-orphans -d
|
|
||||||
sleep 60
|
sleep 60
|
||||||
${DOCKER_COMPOSE_COMMAND} logs openim-server
|
${DOCKER_COMPOSE_COMMAND} logs
|
||||||
${DOCKER_COMPOSE_COMMAND} ps
|
${DOCKER_COMPOSE_COMMAND} ps
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ readonly API_URL=${API_URL:-"http://${IP}:${API_OPENIM_PORT}"}
|
|||||||
|
|
||||||
def "OBJECT_ENABLE" "minio" # 对象是否启用
|
def "OBJECT_ENABLE" "minio" # 对象是否启用
|
||||||
# 对象的API地址
|
# 对象的API地址
|
||||||
readonly OBJECT_APIURL=${OBJECT_APIURL:-"${API_URL}"}
|
readonly OBJECT_APIURL=${OBJECT_APIURL:-"http://${API_URL}"}
|
||||||
def "MINIO_BUCKET" "openim" # MinIO的存储桶名称
|
def "MINIO_BUCKET" "openim" # MinIO的存储桶名称
|
||||||
def "MINIO_PORT" "10005" # MinIO的端口
|
def "MINIO_PORT" "10005" # MinIO的端口
|
||||||
# MinIO的端点URL
|
# MinIO的端点URL
|
||||||
|
|||||||
Reference in New Issue
Block a user