We release logs are recorded on [✨ CHANGELOG](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CHANGELOG/CHANGELOG.md)
We release logs are recorded on [✨ CHANGELOG](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CHANGELOG/CHANGELOG.md)--config_folder_path
For information on versions of OpenIM and how to maintain branches, read [📚this article](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)
This release is only possible thanks to **all** the support of some **awesome people**!
Contributions to this project are welcome! Please see [CONTRIBUTING.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md) for details.
@ -505,19 +512,16 @@ release:
</p>
## Contact Us
## Get Involved with OpenIM!
We value close connections with our users, developers, and contributors here at OpenIMSDK. 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.
**Hereare some ways to get involved with the OpenIM community:**
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 OpenIMSDK. You can ask technical questions, seek help, or share your experiences with other users of OpenIMSDK.
📢 **Slack Channel**:Join our Slack channels for discussions, communication, and support. Click [here](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) to join the Open-IM-Server Slack team channel.
In [OpenIM community is recruiting new members! discussion](https://github.com/orgs/OpenIMSDK/discussions/426) please leave your information, convenient we will better developers around the small gift to send to your hands.
📧 **Gmail Contact**:If you have any questions, suggestions, or feedback for our open-source projects, please feel free to [contact us via email](https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=winxu81@gmail.com).
In addition to Slack, we also offer the following ways to get in touch:
📖 **Blog**:Stay up-to-date with OpenIM-Server projects and trends by reading our [blog](https://doc.rentsoft.cn/). We share the latest developments, tech trends, and other interesting information related to OpenIM.
+ <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.
📱 **WeChat**:Add us on WeChat (QR Code) and indicate that you are a user or developer of Open-IM-Server. We'll process your request as soon as possible.
Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
Remember, your contributions play a vital role in making OpenIM successful, and we look forward to your active participation in our community! 🙌
# OpenIM Image Management Strategy and Pulling Guide
OpenIM is an efficient, stable, and scalable instant messaging framework that provides convenient deployment methods through Docker images. OpenIM manages multiple image sources, hosted respectively on GitHub (ghcr), Alibaba Cloud, and Docker Hub. This document is aimed at detailing the image management strategy of OpenIM and providing the steps for pulling these images.
## Image Management Strategy
OpenIM's versions correspond to GitHub's tag versions. Each time we release a new version and tag it on GitHub, an automated process is triggered that pushes the new Docker image version to the following three platforms:
1. **GitHub (ghcr.io):** We use GitHub Container Registry (ghcr.io) to host OpenIM's Docker images. This allows us to better integrate with the GitHub source code repository, providing better version control and continuous integration/deployment (CI/CD) features. You can view all GitHub images [here](https://github.com/orgs/OpenIMSDK/packages).
2. **Alibaba Cloud (registry.cn-hangzhou.aliyuncs.com):** For users in Mainland China, we also host OpenIM's Docker images on Alibaba Cloud to provide faster pull speeds. You can view all Alibaba Cloud images on this [page](https://cr.console.aliyun.com/cn-hangzhou/instances/repositories) of Alibaba Cloud Image Service (note that you need to log in to your Alibaba Cloud account first).
3. **Docker Hub (docker.io):** Docker Hub is the most commonly used Docker image hosting platform, and we also host OpenIM's images there to facilitate developers worldwide. You can view all Docker Hub images on the [OpenIM's Docker Hub page](https://hub.docker.com/r/openim).
## OpenIM Image Design and Usage Guide
OpenIM offers a comprehensive and flexible system of Docker images, available across multiple repositories. We actively maintain these images across different platforms, namely GitHub's ghcr.io, Alibaba Cloud, and Docker Hub. However, we highly recommend ghcr.io for deployment.
### Available Versions
We provide multiple versions of our images to meet different project requirements. Here's a quick overview of what you can expect:
1. `main`: This image corresponds to the latest version of the main branch in OpenIM. It is updated frequently, making it perfect for users who want to stay at the cutting edge of our features.
2. `release-v3.*`: This is the image that corresponds to the latest version of OpenIM's stable release branch. It's ideal for users who prefer a balance between new features and stability.
3. `v3.*.*`: These images are specific to each tag in OpenIM. They are preserved in their original state and are never overwritten. These are the go-to images for users who need a specific, unchanging version of OpenIM.
### Multi-Architecture Images
In order to cater to a wider range of needs, some of our images are provided with multiple architectures under `OS / Arch`. These images offer greater compatibility across different operating systems and hardware architectures, ensuring that OpenIM can be deployed virtually anywhere.
When pulling OpenIM's Docker images, you can choose the most suitable source based on your geographic location and network conditions. Here are the steps to pull OpenIM images from each source:
### Select image
1. Choose the image repository platform you prefer. As previously mentioned, we recommend [OpenIM ghcr.io](https://github.com/orgs/OpenIMSDK/packages).
2. Choose the image name and image version that suits your needs. Refer to the description above for more details.
### Install image
1. First, make sure Docker is installed on your machine. If not, you can refer to the [Docker official documentation](https://docs.docker.com/get-docker/) for installation.
2. Open the terminal and run the following commands to pull the images:
Our project, OpenIM, follows the [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/) standards.
OpenIM, the open source project, employs a comprehensive version management system to ensure the reliability and traceability of our software. Our version management consists of three main components: the `main` branch, the `release` branch, and `tag` management.
## Main Branch
The `main` branch is where all the latest code resides. It's the hub of activity, embodying all the cutting-edge features that are currently being developed or updated. However, since it's subject to frequent changes and updates, it may not always represent the most stable version of the software. Access the `main` branch [here](https://github.com/OpenIMSDK/Open-IM-Server/tree/main).
## Release Branch
On the other hand, we have the `release` branch. For instance, in the context of version 3.1, we maintain a `release-v3.1` branch. Unlike the `main` branch, the release branch is designed to be a continuously stable and updated version of the software. This provides a reliable option for users who prefer stability over the latest, but potentially unstable, features. Access the `release-v3.1` branch [here](https://github.com/OpenIMSDK/Open-IM-Server/tree/release-v3.1).
## Tag Management
In addition to the `main` and `release` branches, `tag` also plays a pivotal role in version control. Tags are immutable, meaning once they're created, they remain unchanged. Therefore, if you need a specific version of the software, you can use the corresponding tag. All of our available tags can be viewed [here](https://github.com/OpenIMSDK/Open-IM-Server/tags).
Moreover, our Docker image versions are closely tied with these three components. For example, a tag might correspond to the Docker image `ghcr.io/openimsdk/openim-server:v3.1.0`, a release might be represented as `ghcr.io/openimsdk/openim-server:release-v3.0`, and the main branch could be represented as `ghcr.io/openimsdk/openim-server:main` or `ghcr.io/openimsdk/openim-server:latest`.
Here is the specification of our version numbers:
- **Revision version number**: The third digit of the version number, representing bug fixes or code optimizations, usually no new features are added and it is backward compatible with older versions.
- **Build version number**: Usually automatically generated by the system, every code submission will result in an automatic increment by 1.
- Version modifiers
: These can represent the development stage and stability of the software. Common ones include:
- `alpha`: An internal testing version with many bugs, generally used for communication among developers.
- `beta`: A test version with many bugs, generally used for testing by eager community members, who provide feedback to the developers.
- `rc`: Release candidate, to be released as the official version, it's the last test version before the official version.
- `ga`: General Availability, the first stable release.
- `r/release/or nothing`: The final release version, intended for general users.
- `lts`: Long Term Support, the official will specify the maintenance year for this version and will fix all bugs found in this version.
When adding partial functions to the project, the minor version number increases by 1, and the revision version number resets to 0. When there are major changes in the project, the major version number increases by 1. The build number is generally automatically generated by the compiler during the compilation process, only the format needs to be defined, and it does not need to be manually controlled.
## OpenIM version
OpenIM manages two primary branches: `main` and `release`. The project uses Semantic Versioning 2.0.0 to tag different versions of the software, each indicating a significant milestone in the software's development.
@ -14,6 +49,10 @@ In the OpenIM repository, the versioning adheres to the `MAJOR.MINOR.PATCH` form
When a significant milestone like v3.1.0 is achieved, a new branch `release-v3.1` is created. This branch contains all the code pertaining to this stable release. All bug fixes and features intended for the next version, v3.2.0, are merged into this branch.
The release of `PATCH` versions (Z in `X.Y.Z`) are driven by bug fixes, and these can be rolled out depending on the bug's priority or over a scheduled time. On the other hand, `MINOR` versions (Y in `X.Y.Z`) are released based on the project's roadmap, milestone completion, or on a scheduled timeline. Importantly, the API of minor versions is always backward-compatible.
@ -55,3 +94,8 @@ git push origin main
```
Remember, communication with your team is key throughout this process, keeping everyone up-to-date with the changes being made.
success "Source code downloaded and extracted to $REPO-$MODIFIED_TAG"
}
function set_openim_env(){
warn "This command can only be executed once. It will modify the component passwords in docker-compose based on the PASSWORD variable in .env, and modify the component passwords in config/config.yaml. If the password in .env changes, you need to first execute docker-compose down; rm components -rf and then execute this command."
# Set default values for user input
# If the USER environment variable is not set, it defaults to 'root'
if[ -z "$USER"];then
USER="root"
debug "USER is not set. Defaulting to 'root'."
fi
# If the PASSWORD environment variable is not set, it defaults to 'openIM123'
# This password applies to redis, mysql, mongo, as well as accessSecret in config/config.yaml
if[ -z "$PASSWORD"];then
PASSWORD="openIM123"
debug "PASSWORD is not set. Defaulting to 'openIM123'."
fi
# If the ENDPOINT environment variable is not set, it defaults to 'http://127.0.0.1:10005'
# This is minio's external service IP and port, or it could be a domain like storage.xx.xx
# The app must be able to access this IP and port or domain
if[ -z "$ENDPOINT"];then
ENDPOINT="http://127.0.0.1:10005"
debug "ENDPOINT is not set. Defaulting to 'http://127.0.0.1:10005'."
fi
# If the API_URL environment variable is not set, it defaults to 'http://127.0.0.1:10002/object/'
# The app must be able to access this IP and port or domain
if[ -z "$API_URL"];then
API_URL="http://127.0.0.1:10002/object/"
debug "API_URL is not set. Defaulting to 'http://127.0.0.1:10002/object/'."
fi
# If the DATA_DIR environment variable is not set, it defaults to the current directory './'
# This can be set to a directory with large disk space
print_with_delay "Open-IM-Server is not just a product; it's a revolution. It's about bringing the power of seamless, real-time messaging to your fingertips. And it's about joining a global community of developers, dedicated to pushing the boundaries of what's possible." 0.01
print_progress 50 0.02
# Reset text color back to normal
echo -e "\033[0m"
# Set text color to yellow for the Slack link
echo -e "\033[1;33m"
print_with_delay "Join our developer community on Slack: https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg" 0.01
This document outlines the directory structure for scripts in the OpenIM Server project. These scripts play a critical role in various areas like building, deploying, running and managing the services of OpenIM.
```bash
scripts/
├── LICENSE # License related files
│ ├── LICENSE # The license file
│ └── LICENSE_TEMPLATES # Template for license file
├── README.md # Readme file for scripts directory
├── advertise.sh # Script for advertisement services
├── batch_start_all.sh # Script to start all services in batch
├── build.cmd # Windows build command script
├── build_all_service.sh # Script to build all services
├── build_push_k8s_images.sh # Script to build and push images for Kubernetes
├── check_all.sh # Script to check status of all services
├── common.sh # Contains common functions used by other scripts
├── coverage.awk # AWK script for coverage report generation
├── coverage.sh # Script for generating coverage reports
├── docker_check_service.sh # Docker specific service check script
├── docker_start_all.sh # Script to start all services in a docker environment
├── ensure_tag.sh # Script to ensure proper tagging of docker images
├── enterprise # Scripts specific to enterprise version
│ ├── check_all.sh # Check status of all enterprise services
│ ├── function.sh # Functions specific to enterprise version
│ └── path_info.cfg # Path information configuration for enterprise version
├── env_check.sh # Script to check the environment
├── function.sh # Contains functions used by other scripts
├── githooks # Git hook scripts
│ ├── commit-msg # Script to validate commit message
│ ├── pre-commit # Script to run before each commit
│ └── pre-push # Script to run before each push
├── init_pwd.sh # Script to initialize password
├── install_im_compose.sh # Script to install IM with Docker Compose
├── install_im_server.sh # Script to install IM server
├── lib # Library scripts
│ ├── color.sh # Script for console color manipulation
│ ├── golang.sh # Script for golang related utility functions
│ ├── init.sh # Script for initialization tasks
│ ├── logging.sh # Script for logging related utility functions
│ ├── release.sh # Script for release related utility functions
│ ├── util.sh # Script for generic utility functions
│ └── version.sh # Script for versioning related tasks
├── make-rules # Makefile rules
│ ├── common.mk # Common Make rules
│ ├── copyright.mk # Copyright related Make rules
│ ├── dependencies.mk # Dependencies related Make rules
│ ├── gen.mk # Make rules for code generation
│ ├── golang.mk # Golang specific Make rules
│ ├── image.mk # Make rules for image building
│ ├── release.mk # Make rules for release process
│ ├── swagger.mk # Make rules for swagger documentation
│ └── tools.mk # Make rules for tools and utilities
├── mongo-init.sh # Script to initialize MongoDB
├── msg_gateway_start.sh # Script to start message gateway service
├── msg_transfer_start.sh # Script to start message transfer service
├── path_info.sh # Script containing path information
├── push_start.sh # Script to start push service
├── release.sh # Script to perform release process
├── start_all.sh # Script to start all services
├── start_cron.sh # Script to start cron jobs
├── start_rpc_service.sh # Script to start RPC service
├── stop_all.sh # Script to stop all services
└── style_info.sh # Script containing style related information
```
The purpose of having a structured scripts directory like this is to make the operations of OpenIM Server clear and easy to manage. Each script has its own responsibility, making it easier to maintain and update. It's also helpful for newcomers who can easily understand what each part of the system is doing by just looking at this directory structure.
Each directory and script in the structure should be understood as a part of a larger whole. All scripts work together to ensure the smooth operation and maintenance of the OpenIM Server.
print_with_delay "Open-IM-Server is not just a product; it's a revolution. It's about bringing the power of seamless, real-time messaging to your fingertips. And it's about joining a global community of developers, dedicated to pushing the boundaries of what's possible." 0.01
print_progress 50 0.02
# Reset text color back to normal
echo -e "\033[0m"
# Set text color to yellow for the Slack link
echo -e "\033[1;33m"
print_with_delay "Join our developer community on Slack: https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg" 0.01