mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
feat: set docs openim-server url address fix (#1043)
* feat: set docs openim-server url address fix Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: add openim code fix Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
@@ -35,4 +35,4 @@
|
||||
|
||||
## Testing conventions
|
||||
|
||||
Please refer to [TESTING.md](https://github.com/OpenIMSDK/Open-IM-Server/tree/main/test/readme) document.
|
||||
Please refer to [TESTING.md](https://github.com/openimsdk/open-im-server/tree/main/test/readme) document.
|
||||
|
||||
@@ -61,7 +61,7 @@ OpenIM build and test processes development require Docker to run certain steps.
|
||||
|
||||
### Vagrant
|
||||
|
||||
As described in the [Testing documentation](https://github.com/OpenIMSDK/Open-IM-Server/tree/main/test/readme), all the smoke tests are run in virtual machines managed by Vagrant. To install Vagrant in the development environment, [follow the instructions from the Hashicorp website](https://www.vagrantup.com/downloads), alongside any of the following hypervisors:
|
||||
As described in the [Testing documentation](https://github.com/openimsdk/open-im-server/tree/main/test/readme), all the smoke tests are run in virtual machines managed by Vagrant. To install Vagrant in the development environment, [follow the instructions from the Hashicorp website](https://www.vagrantup.com/downloads), alongside any of the following hypervisors:
|
||||
|
||||
- [VirtualBox](https://www.virtualbox.org/)
|
||||
- [libvirt](https://libvirt.org/) and the [vagrant-libvirt plugin](https://github.com/vagrant-libvirt/vagrant-libvirt#installation)
|
||||
|
||||
@@ -13,7 +13,7 @@ Three ways to modify the configuration:
|
||||
```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*.*
|
||||
# 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
|
||||
@@ -48,9 +48,76 @@ make init
|
||||
The `config/config.yaml` file has detailed configuration instructions for the storage components.
|
||||
|
||||
|
||||
The config file is available via [environment.sh](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/scripts/install/environment.sh) configuration [openim.yaml](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployments/templates/openim.yaml) template, and then through the `make init` to automatically generate a new configuration.
|
||||
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.
|
||||
|
||||
|
||||
## Environment variable
|
||||
|
||||
By setting the environment variable below, You can then refresh the configuration using `make init` or `./scripts/init-config.sh`
|
||||
|
||||
##### MINIO
|
||||
|
||||
+ [MINIO DOCS](https://min.io/docs/minio/kubernetes/upstream/index.html)
|
||||
|
||||
apiURL is the address of the api, the access address of the app, use s3 must be configured
|
||||
|
||||
#### Overview
|
||||
|
||||
MinIO is an object storage server that is API compatible with Amazon S3. It's best suited for storing unstructured data such as photos, videos, log files, backups, and container/VM images. In this guide, we'll walk through the process of configuring MinIO with custom settings.
|
||||
|
||||
#### Default Configuration
|
||||
|
||||
Configuration can be achieved by modifying the default variables in the `./scripts/install/environment.sh` file. However, for more flexibility and dynamic adjustments, setting environment variables is recommended.
|
||||
|
||||
#### Setting Up the Environment Variables
|
||||
|
||||
##### IP Configuration
|
||||
|
||||
By default, the system generates the public IP of the machine. To manually set a public or local IP address, use:
|
||||
|
||||
```bash
|
||||
export IP=127.0.0.1
|
||||
```
|
||||
|
||||
##### API URL
|
||||
|
||||
This is the address your application uses to communicate with MinIO. By default, it uses the public IP. However, you can adjust it to a public domain or another IP.
|
||||
|
||||
```bash
|
||||
export API_URL=127.0.0.1:10002
|
||||
```
|
||||
|
||||
##### MinIO Endpoint Configuration
|
||||
|
||||
This is the primary address MinIO uses for communications:
|
||||
|
||||
```bash
|
||||
export MINIO_ENDPOINT="127.0.0.1"
|
||||
```
|
||||
|
||||
##### MinIO Sign Endpoint
|
||||
|
||||
For direct external access to stored content:
|
||||
|
||||
```bash
|
||||
export MINIO_SIGN_ENDPOINT=127.0.0.1:10005
|
||||
```
|
||||
|
||||
##### Modifying MinIO's Port
|
||||
|
||||
If you need to adjust MinIO's port from the default:
|
||||
|
||||
```bash
|
||||
export MINIO_PORT="10005"
|
||||
```
|
||||
|
||||
#### Applying the Configuration
|
||||
|
||||
After setting your desired environment variables, restart the MinIO server to apply the changes.
|
||||
|
||||
#### Verification
|
||||
|
||||
It's crucial to verify the configurations by checking the connectivity between your application and MinIO using the set API URL and ensuring that the data can be directly accessed using the `signEndpoint`.
|
||||
|
||||
|
||||
## Configuration Details
|
||||
@@ -133,6 +200,16 @@ The config file is available via [environment.sh](https://github.com/OpenIMSDK/O
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Config options
|
||||
|
||||
...
|
||||
...
|
||||
|
||||
## Use the default values
|
||||
|
||||
A method to revert to the default value:
|
||||
|
||||
```bash
|
||||
export IP=127.0.0.1
|
||||
```
|
||||
|
||||
@@ -27,8 +27,8 @@ Ensuring this strategy's success extends beyond just documentation; it hinges on
|
||||
|
||||
- [Contributor License Agreement](https://github.com/openim-sigs/cla) is considered implicit for all code within cherry pick pull requests, **unless there is a large conflict**.
|
||||
- A pull request merged against the `main` branch.
|
||||
- The release branch exists (example: [`release-1.18`](https://github.com/OpenIMSDK/Open-IM-Server/tree/release-v3.1))
|
||||
- The normal git and GitHub configured shell environment for pushing to your openim-server `origin` fork on GitHub and making a pull request against a configured remote `upstream` that tracks `https://github.com/OpenIMSDK/Open-IM-Server.git`, including `GITHUB_USER`.
|
||||
- The release branch exists (example: [`release-1.18`](https://github.com/openimsdk/open-im-server/tree/release-v3.1))
|
||||
- The normal git and GitHub configured shell environment for pushing to your openim-server `origin` fork on GitHub and making a pull request against a configured remote `upstream` that tracks `https://github.com/openimsdk/open-im-server.git`, including `GITHUB_USER`.
|
||||
- Have GitHub CLI (`gh`) installed following [installation instructions](https://github.com/cli/cli#installation).
|
||||
- A github personal access token which has permissions "repo" and "read:org". Permissions are required for [gh auth login](https://cli.github.com/manual/gh_auth_login) and not used for anything unrelated to cherry-pick creation process (creating a branch and initiating PR).
|
||||
|
||||
@@ -65,7 +65,7 @@ It is critical that our full community is actively engaged on enhancements in th
|
||||
|
||||
### Steps
|
||||
|
||||
- Run the [cherry pick script](https://github.com/OpenIMSDK/Open-IM-Server/tree/main/scripts/cherry-pick.sh)
|
||||
- Run the [cherry pick script](https://github.com/openimsdk/open-im-server/tree/main/scripts/cherry-pick.sh)
|
||||
|
||||
This example applies a main branch PR #98765 to the remote branch `upstream/release-v3.1`:
|
||||
|
||||
@@ -75,9 +75,9 @@ It is critical that our full community is actively engaged on enhancements in th
|
||||
|
||||
- Be aware the cherry pick script assumes you have a git remote called `upstream` that points at the openim-server github org.
|
||||
|
||||
Please see our [recommended Git workflow](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/contributors/github-workflow.md#workflow).
|
||||
Please see our [recommended Git workflow](https://github.com/openimsdk/open-im-server/blob/main/docs/contributors/github-workflow.md#workflow).
|
||||
|
||||
- You will need to run the cherry pick script separately for each patch release you want to cherry pick to. Cherry picks should be applied to all [active](https://github.com/OpenIMSDK/Open-IM-Server/releases) release branches where the fix is applicable.
|
||||
- You will need to run the cherry pick script separately for each patch release you want to cherry pick to. Cherry picks should be applied to all [active](https://github.com/openimsdk/open-im-server/releases) release branches where the fix is applicable.
|
||||
|
||||
- If `GITHUB_TOKEN` is not set you will be asked for your github password: provide the github [personal access token](https://github.com/settings/tokens) rather than your actual github password. If you can securely set the environment variable `GITHUB_TOKEN` to your personal access token then you can avoid an interactive prompt. Refer [mislav/hub#2655 (comment)](https://github.com/mislav/hub/issues/2655#issuecomment-735836048)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ OpenIM project uses the [GitHub flow](https://docs.github.com/en/get-started/qui
|
||||
|
||||
### Branch naming conventions
|
||||
|
||||
Every forked repository works independently, meaning that any contributor can create branches with the name they see fit. However, it is worth noting that OpenIM mirrors [OpenIM version skew policy](https://github.com/OpenIMSDK/Open-IM-Server/releases) by maintaining release branches for the most recent three minor releases. The only exception is that the main branch mirrors the latest OpenIM release (3.10) instead of using a `release-` prefixed one.
|
||||
Every forked repository works independently, meaning that any contributor can create branches with the name they see fit. However, it is worth noting that OpenIM mirrors [OpenIM version skew policy](https://github.com/openimsdk/open-im-server/releases) by maintaining release branches for the most recent three minor releases. The only exception is that the main branch mirrors the latest OpenIM release (3.10) instead of using a `release-` prefixed one.
|
||||
|
||||
```text
|
||||
main -------------------------------------------. (OpenIM 3.10)
|
||||
@@ -39,7 +39,7 @@ There are everyday tasks related to git that every contributor needs to perform,
|
||||
|
||||
Creating a OpenIM fork, cloning it, and setting its upstream remote can be summarized on:
|
||||
|
||||
1. Visit <https://github.com/OpenIMSDK/Open-IM-Server>
|
||||
1. Visit <https://github.com/openimsdk/open-im-server>
|
||||
2. Click the `Fork` button (top right) to establish a cloud-based fork
|
||||
3. Clone fork to local storage
|
||||
4. Add to your fork OpenIM remote as upstream
|
||||
@@ -54,8 +54,8 @@ git clone https://github.com/$user/OpenIM.git
|
||||
|
||||
## Add OpenIM as upstream to your fork
|
||||
cd OpenIM
|
||||
git remote add upstream https://github.com/OpenIMSDK/Open-IM-Server.git
|
||||
# or: git remote add upstream git@github.com:OpenIMSDK/Open-IM-Server.git
|
||||
git remote add upstream https://github.com/openimsdk/open-im-server.git
|
||||
# or: git remote add upstream git@github.com:openimsdk/open-im-server.git
|
||||
|
||||
## Ensure to never push to upstream directly
|
||||
git remote set-url --push upstream no_push
|
||||
|
||||
@@ -26,11 +26,11 @@ docker pull minio/minio
|
||||
|
||||
## 2. OpenIM & Chat Images
|
||||
|
||||
**For detailed understanding of version management and storage of OpenIM and Chat**: [version.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)
|
||||
**For detailed understanding of version management and storage of OpenIM and Chat**: [version.md](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md)
|
||||
|
||||
### OpenIM Image
|
||||
|
||||
- Get image version info: [images.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md)
|
||||
- Get image version info: [images.md](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/images.md)
|
||||
- Depending on the required version, execute the following command:
|
||||
|
||||
```bash
|
||||
@@ -111,6 +111,6 @@ docker-compose ps
|
||||
|
||||
## 6. Reference Links
|
||||
|
||||
- [OpenIMSDK Issue #432](https://github.com/OpenIMSDK/Open-IM-Server/issues/432)
|
||||
- [OpenIMSDK Issue #432](https://github.com/openimsdk/open-im-server/issues/432)
|
||||
- [Notion Link](https://nsddd.notion.site/435ee747c0bc44048da9300a2d745ad3?pvs=25)
|
||||
- [OpenIMSDK Issue #474](https://github.com/OpenIMSDK/Open-IM-Server/issues/474)
|
||||
- [OpenIMSDK Issue #474](https://github.com/openimsdk/open-im-server/issues/474)
|
||||
@@ -1,6 +1,6 @@
|
||||
# utils go
|
||||
|
||||
+ [toold readme](https://github.com/OpenIMSDK/Open-IM-Server/tree/main/tools)
|
||||
+ [toold readme](https://github.com/openimsdk/open-im-server/tree/main/tools)
|
||||
|
||||
about scripts fix:
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user