From 6b02a91fa9a926948ff875fb0ae0c6c106df2890 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Tue, 12 Mar 2024 11:56:15 +0800 Subject: [PATCH] merge main to releae-v1.6 branch (#462) * Update README to add link to 'How to Setup LiveKit Server' document. (#454) * Delete .github/workflows/sync-release.yml (#457) * Delete .github/workflows/sync-release.yml * Delete .github/workflows/sync.yml * docs: sora zh readme from awesome (#460) * docs: sora zh readme from awesome (#461) * docs: sora zh readme from awesome * feat: fix openim helm charts bug --------- Co-authored-by: OpenIM Bot <124379614+kubbot@users.noreply.github.com> --------- Co-authored-by: DanGiant <49437710+DanGiant@users.noreply.github.com> Co-authored-by: OpenIM Bot <124379614+kubbot@users.noreply.github.com> --- .github/workflows/sync-release.yml | 40 ---------------------- .github/workflows/sync.yml | 40 ---------------------- Dockerfile | 2 +- HOW_TO_SETUP_LIVEKIT_SERVER.md | 54 ++++++++++++++++++++++++++++++ README.md | 4 +++ build/images/api-admin/Dockerfile | 4 +-- build/images/api-chat/Dockerfile | 4 +-- build/images/rpc-admin/Dockerfile | 4 +-- build/images/rpc-chat/Dockerfile | 4 +-- 9 files changed, 67 insertions(+), 89 deletions(-) delete mode 100644 .github/workflows/sync-release.yml delete mode 100644 .github/workflows/sync.yml create mode 100644 HOW_TO_SETUP_LIVEKIT_SERVER.md diff --git a/.github/workflows/sync-release.yml b/.github/workflows/sync-release.yml deleted file mode 100644 index 868f42584..000000000 --- a/.github/workflows/sync-release.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright © 2023 KubeCub open source community. All rights reserved. -# Licensed under the MIT License (the "License"); -# you may not use this file except in compliance with the License. - -# https://github.com/BetaHuhn/repo-file-sync-action -name: Synchronize OpenIM Chat release public code to other repositories -on: - push: - branches: - - release-* - - workflow_dispatch: - -jobs: - sync: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Run GitHub File Sync - uses: BetaHuhn/repo-file-sync-action@latest - with: - GH_INSTALLATION_TOKEN: "${{ secrets.BOT_GITHUB_TOKEN }}" - CONFIG_PATH: .github/sync-release.yml - ORIGINAL_MESSAGE: true - SKIP_PR: true - COMMIT_EACH_FILE: false - COMMIT_BODY: "🤖 kubbot to synchronize the warehouse" - GIT_EMAIL: "3293172751ysy@gmail.com" - GIT_USERNAME: "kubbot" - PR_BODY: 👌 kubecub provides automated community services - REVIEWERS: | - kubbot - cubxxw - PR_LABELS: | - file-sync - automerge - ASSIGNEES: | - kubbot \ No newline at end of file diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml deleted file mode 100644 index 153ba5b0e..000000000 --- a/.github/workflows/sync.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright © 2023 KubeCub open source community. All rights reserved. -# Licensed under the MIT License (the "License"); -# you may not use this file except in compliance with the License. - -# https://github.com/BetaHuhn/repo-file-sync-action -name: Synchronize OpenIM Chat main public code to other repositories -on: - push: - branches: - - main - - workflow_dispatch: - -jobs: - sync: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Run GitHub File Sync - uses: BetaHuhn/repo-file-sync-action@latest - with: - GH_INSTALLATION_TOKEN: "${{ secrets.BOT_GITHUB_TOKEN }}" - CONFIG_PATH: .github/sync.yml - ORIGINAL_MESSAGE: true - SKIP_PR: true - COMMIT_EACH_FILE: false - COMMIT_BODY: "🤖 kubbot to synchronize the warehouse" - GIT_EMAIL: "3293172751ysy@gmail.com" - GIT_USERNAME: "kubbot" - PR_BODY: 👌 kubecub provides automated community services - REVIEWERS: | - kubbot - cubxxw - PR_LABELS: | - file-sync - automerge - ASSIGNEES: | - kubbot \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8f5c697e1..2ecf60a70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ ARG GOOS FROM golang:1.21 AS builder ARG GO111MODULE=on -ARG GOPROXY=https://goproxy.cn,direct +ARG GOPROXY=https://goproxy.io,direct WORKDIR /openim/openim-chat diff --git a/HOW_TO_SETUP_LIVEKIT_SERVER.md b/HOW_TO_SETUP_LIVEKIT_SERVER.md new file mode 100644 index 000000000..cf4c8c85a --- /dev/null +++ b/HOW_TO_SETUP_LIVEKIT_SERVER.md @@ -0,0 +1,54 @@ +# How to setup LiveKit server + +OpenIM Chat uses LiveKit server as the media server to support video call and video meeting services. + + +## Something about LiveKit + +[Livekit](https://github.com/livekit/livekit-server) is an open source WebRTC SFU written in go, built on top of the excellent [Pion](https://github.com/pion) project. You can get more information about it on its website [livekit.io](https://livekit.io/). + + +## Setup LiveKit server on Linux + +Please follow the following instructions to setup a LiveKit server to work with OpenIM Chat and OpenIM server on Linux server. + +### Docker installation + +For self hosting user, we suggest you install LiveKit server by docker pull. You can get a server ready for use in a short time. + +```bash +sudo docker pull livekit/livekit-server +``` + +For cloud deployment, you may follow the [Deploy to a VM](https://docs.livekit.io/realtime/self-hosting/vm/#Deploy-to-a-VM) on [livekit.io](https://docs.livekit.io/). + +### Generate configuration + +To generate configuration file for LiveKit server, please refer to [Generate configuration](https://docs.livekit.io/realtime/self-hosting/vm/#Generate-configuration). + +The keys section of the generated .yaml file is the "apiKey: apiSecret" pair. This key pair should be set to the LiveKit section as the value of key and secret arguments. + +### Generate access token for video call participant + +Please refer to [Generating tokens](https://docs.livekit.io/realtime/server/generating-tokens/) on [livekit.io](https://docs.livekit.io/). + +### Run it + +For self hosting user, you may start LiveKit with: + +```bash +docker run --rm \ + -p 7880:7880 \ + -p 7881:7881 \ + -p 7882:7882/udp \ + -v $PWD/livekit.yaml:/livekit.yaml \ + livekit/livekit-server \ + --config /livekit.yaml \ + --bind 0.0.0.0 +``` + +For cloud deployment user, you may follow the [Deploy to a VM](https://docs.livekit.io/realtime/self-hosting/vm/#Deploy-to-a-VM) on [livekit.io](https://docs.livekit.io/). + +## More about Deploying LiveKit + +Please refer to the self hosting [Deploying LiveKit](https://docs.livekit.io/realtime/self-hosting/deployment/) documentation. diff --git a/README.md b/README.md index d0bf6aef9..78a9310a4 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,10 @@ $ ./scripts/stop-all.sh Please refer to "[How to add REST RPC API for OpenIM Chat](./HOW_TO_ADD_REST_RPC_API.md)". +## Setup LiveKit if you want to enable Audio and Video chat + +Please refer to "[How to setup LiveKit server](./HOW_TO_SETUP_LIVEKIT_SERVER.md)". + ## Contributing Contributions to this project are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for details. diff --git a/build/images/api-admin/Dockerfile b/build/images/api-admin/Dockerfile index 6d7b713d2..6da6be2bc 100644 --- a/build/images/api-admin/Dockerfile +++ b/build/images/api-admin/Dockerfile @@ -19,10 +19,10 @@ ARG GOARCH ARG GOOS -FROM golang:1.20 AS builder +FROM golang:1.21 AS builder ARG GO111MODULE=on -ARG GOPROXY=https://goproxy.cn,direct +ARG GOPROXY=https://goproxy.io,direct WORKDIR /openim/openim-chat diff --git a/build/images/api-chat/Dockerfile b/build/images/api-chat/Dockerfile index 3a06d51e8..3fb734fc9 100644 --- a/build/images/api-chat/Dockerfile +++ b/build/images/api-chat/Dockerfile @@ -19,10 +19,10 @@ ARG GOARCH ARG GOOS -FROM golang:1.20 AS builder +FROM golang:1.21 AS builder ARG GO111MODULE=on -ARG GOPROXY=https://goproxy.cn,direct +ARG GOPROXY=https://goproxy.io,direct WORKDIR /openim/openim-chat diff --git a/build/images/rpc-admin/Dockerfile b/build/images/rpc-admin/Dockerfile index 736e21227..639d6c8d3 100644 --- a/build/images/rpc-admin/Dockerfile +++ b/build/images/rpc-admin/Dockerfile @@ -19,10 +19,10 @@ ARG GOARCH ARG GOOS -FROM golang:1.20 AS builder +FROM golang:1.21 AS builder ARG GO111MODULE=on -ARG GOPROXY=https://goproxy.cn,direct +ARG GOPROXY=https://goproxy.io,direct WORKDIR /openim/openim-chat diff --git a/build/images/rpc-chat/Dockerfile b/build/images/rpc-chat/Dockerfile index e9ffa383f..4c602cf11 100644 --- a/build/images/rpc-chat/Dockerfile +++ b/build/images/rpc-chat/Dockerfile @@ -19,10 +19,10 @@ ARG GOARCH ARG GOOS -FROM golang:1.20 AS builder +FROM golang:1.21 AS builder ARG GO111MODULE=on -ARG GOPROXY=https://goproxy.cn,direct +ARG GOPROXY=https://goproxy.io,direct WORKDIR /openim/openim-chat