@ -109,7 +109,233 @@ Further enhancing your experience, we also provide an SDK client, wherein most c
✅ We have a large open source community called [OpenIMSDK](https://github.com/OpenIMSDK) that runs the core modules, we have an open source community called [openim-sigs](https://github.com/openim-sigs) to explore more IM-based infrastructure products.
## :rocket: Quick Start
You can quickly learn OpenIM engineering solutions, all it takes is one simple command:
```bash
$ make demo
```
🤲 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>
**1. Clone the project**
```bash
# choose what you need, We take branch 3.2 as an example
> 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**
>
> 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>
<details><summary>Compile from Source</summary>
Ur need `Go 1.18` or higher version, and `make`.
```bash
$ go version; make --version
```
Version Details: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md
```bash
# choose what you need
$ BRANCH=release-v3.1
$ git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build
```
Read about the [OpenIM Version Policy](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)
`make help` to help you see the instructions supported by OpenIM.
All services have been successfully built as shown in the figure
| TCP:10001 | ws protocol, message port such as message sending, pushing etc, used for client SDK | 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 |