diff --git a/.env b/.env
index b2252cc9c..2f2766ef6 100644
--- a/.env
+++ b/.env
@@ -30,7 +30,7 @@ MINIO_ENDPOINT=http://172.28.0.1:10005
# Base URL for the application programming interface (API).
# Default: API_URL=http://172.28.0.1:10002
-API_URL=http://172.28.0.1:10002
+API_URL=http://127.0.0.1:10002
# Directory path for storing data files or related information.
# Default: DATA_DIR=./
diff --git a/.github/workflows/build-openim-web-image.yml b/.github/workflows/build-openim-web-image.yml
index 471d7688e..6e8e7d823 100644
--- a/.github/workflows/build-openim-web-image.yml
+++ b/.github/workflows/build-openim-web-image.yml
@@ -84,7 +84,7 @@ jobs:
id: meta2
uses: docker/metadata-action@v4.6.0
with:
- images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server
+ images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web
- name: Log in to AliYun Docker Hub
uses: docker/login-action@v2
@@ -117,7 +117,7 @@ jobs:
id: meta3
uses: docker/metadata-action@v4.6.0
with:
- images: ghcr.io/openimsdk/openim-server
+ images: ghcr.io/openimsdk/openim-web
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
diff --git a/CHANGELOG/CHANGELOG.md b/CHANGELOG/CHANGELOG.md
index 41df11bba..2358b5fb8 100644
--- a/CHANGELOG/CHANGELOG.md
+++ b/CHANGELOG/CHANGELOG.md
@@ -89,9 +89,9 @@ $ git-chglog --config custom/dir/config.yml
## create next tag
```bash
-git-chglog --next-tag 2.0.0 -o CHANGELOG.md
-git commit -am "release 2.0.0"
-git tag 2.0.0
+$ git-chglog --next-tag 2.0.0 -o CHANGELOG.md
+$ git commit -am "release 2.0.0"
+$ git tag 2.0.0
```
| Query | Description | Example |
@@ -112,6 +112,9 @@ git tag 2.0.0
+ [OpenIM CHANGELOG-V2.9](CHANGELOG-2.9.md)
+ [OpenIM CHANGELOG-V3.0](CHANGELOG-3.0.md)
+ [OpenIM CHANGELOG-V3.1](CHANGELOG-3.1.md)
++ [OpenIM CHANGELOG-V3.2](CHANGELOG-3.2.md)
++ [OpenIM CHANGELOG-V3.3](CHANGELOG-3.3.md)
+
## Introduction
@@ -121,7 +124,7 @@ In both the open-source and closed-source software development communities, it i
The most common format for version numbers is as follows:
-```
+```bash
major.minor[.patch[.build]]
```
diff --git a/Dockerfile b/Dockerfile
index 5bd3930e0..f738d4457 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -25,7 +25,7 @@ WORKDIR ${SERVER_WORKDIR}
# Copy scripts and binary files to the production image
COPY --from=builder ${OPENIM_SERVER_BINDIR} /openim/openim-server/_output/bin
-COPY --from=builder ${OPENIM_SERVER_CMDDIR} /openim/openim-server/scripts
-COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
+# COPY --from=builder ${OPENIM_SERVER_CMDDIR} /openim/openim-server/scripts
+# COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
CMD ["/openim/openim-server/scripts/docker-start-all.sh"]
diff --git a/README.md b/README.md
index 504dcd012..d1af632bf 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,7 @@
+
@@ -81,7 +82,7 @@ Further enhancing your experience, we also provide an SDK client, wherein most c
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, including client SDK and server
+ ✅ 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
✅ 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)
@@ -111,7 +112,7 @@ Further enhancing your experience, we also provide an SDK client, wherein most c
## :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
$ make demo
@@ -119,64 +120,18 @@ $ 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:
- Deploying with Docker Compose
+ Deploying with Docker Compose
+It is recommended to use Docker Compose for deployment, which can easily and quickly deploy the entire OpenIM service on a single node
-> 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.
++ [https://github.com/openimsdk/openim-docker](https://github.com/openimsdk/openim-docker)
-**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**
+>
> 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
-```
-
-
Compile from Source
@@ -211,16 +166,11 @@ Deploy basic components at the click of a command:
```bash
# 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
-$ 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 init && docker compose -f basic-openim-server-dependency.yml up -d && make start && make check
```
> `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.
@@ -240,8 +190,9 @@ Read: https://github.com/openimsdk/open-im-server/blob/main/deployments/README.m
- Open IM Ports
+ Open IM and Chat Ports
++ oepnim-server warehouse: https://github.com/openimsdk/open-im-server
| TCP Port | Description | Operation |
| --------- | ------------------------------------------------------------ | ----------------------------------------------------- |
@@ -249,10 +200,6 @@ 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:10005 | Required when choosing minio storage (openIM uses minio storage by default) | Port release or nginx reverse proxy, and firewall off |
-
-
- Open Chat Ports
-
+ chat warehouse: https://github.com/OpenIMSDK/chat
diff --git a/config/config.yaml b/config/config.yaml
index c1059581b..9d6b3c335 100644
--- a/config/config.yaml
+++ b/config/config.yaml
@@ -132,14 +132,14 @@ api:
# minio.signEndpoint is minio public network address
object:
enable: "minio"
- apiURL: "http://172.28.0.1:10002"
+ apiURL: "http://http://127.0.0.1:10002"
minio:
bucket: "openim"
endpoint: "http://172.28.0.1:10005"
accessKeyID: "root"
secretAccessKey: "openIM123"
sessionToken: ''
- signEndpoint: "http://172.28.0.1:10005"
+ signEndpoint: "http://127.0.0.1:10005"
cos:
bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com
secretID: ''
diff --git a/docker-compose.yml b/docker-compose.yml
index 126409d3d..543d5558f 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -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'
networks:
@@ -10,29 +10,6 @@ networks:
- subnet: '${DOCKER_BRIDGE_SUBNET}'
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:
mysql:
image: mysql:5.7
@@ -40,7 +17,7 @@ services:
- "${MYSQL_PORT}:3306"
container_name: mysql
volumes:
- - mysql_data:/var/lib/mysql
+ - "${DATA_DIR}/components/mysql/data:/var/lib/mysql"
- "/etc/localtime:/etc/localtime"
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_PASSWORD}"
@@ -56,10 +33,10 @@ services:
container_name: mongo
command: --wiredTigerCacheSizeGB 1 --auth
volumes:
- - mongodb_data:/data/db
- - mongodb_logs:/data/logs
- - mongodb_config:/etc/mongo
- - "./scripts/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro"
+ - "${DATA_DIR}/components/mongodb/data/db:/data/db"
+ - "${DATA_DIR}/components/mongodb/data/logs:/data/logs"
+ - "${DATA_DIR}/components/mongodb/data/conf:/etc/mongo"
+ - ./scripts/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro"
environment:
- TZ=Asia/Shanghai
- wiredTigerCacheSizeGB=1
@@ -77,8 +54,8 @@ services:
ports:
- "${REDIS_PORT}:6379"
volumes:
- - redis_data:/data
- - redis_config:/usr/local/redis/config/redis.conf
+ - "${DATA_DIR}/components/redis/data:/data"
+ - "${DATA_DIR}/components/redis/config/redis.conf:/usr/local/redis/config/redis.conf"
environment:
TZ: Asia/Shanghai
restart: always
@@ -118,8 +95,6 @@ services:
bash -c "
/opt/bitnami/scripts/kafka/run.sh & sleep 5; /opt/bitnami/kafka/create_topic.sh; wait
"
- extra_hosts:
- - "host.docker.internal:host-gateway"
environment:
- TZ=Asia/Shanghai
- KAFKA_CFG_NODE_ID=0
@@ -140,8 +115,8 @@ services:
- "9090:9090"
container_name: minio
volumes:
- - minio_data:/data
- - minio_config:/root/.minio
+ - "${DATA_DIR}/components/mnt/data:/data"
+ - "${DATA_DIR}/components/mnt/config:/root/.minio"
environment:
MINIO_ROOT_USER: "${MINIO_ACCESS_KEY}"
MINIO_ROOT_PASSWORD: "${MINIO_SECRET_KEY}"
@@ -153,6 +128,8 @@ services:
openim-web:
image: ghcr.io/openimsdk/openim-web:latest
+ # image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web:latest
+ # image: openim/openim-web:latest
container_name: openim-web
environment:
- OPENIM_WEB_DIST_PATH=${OPENIM_WEB_DIST_PATH}
@@ -165,8 +142,8 @@ services:
ipv4_address: ${OPENIM_WEB_NETWORK_ADDRESS}
# openim-server:
-# # image: ghcr.io/openimsdk/openim-server:main
-# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main
+# image: ghcr.io/openimsdk/openim-server:main
+# # image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main
# # image: openim/openim-server:main
# # build: .
# container_name: openim-server
@@ -180,7 +157,7 @@ services:
# retries: 5
# volumes:
# - ./logs:/openim/openim-server/logs
-# - ./_output:/openim/openim-server/_output
+# - ./_output/logs:/openim/openim-server/_output/logs
# - ./config:/openim/openim-server/config
# - ./scripts:/openim/openim-server/scripts
# restart: always
@@ -199,69 +176,31 @@ services:
# server:
# ipv4_address: ${OPENIM_SERVER_NETWORK_ADDRESS}
- # openim-chat:
- # # image: ghcr.io/openimsdk/openim-chat:main
- # image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat:main
- # # image: ghcr.io/openimsdk/openim-chat:main
- # container_name: openim-chat
- # healthcheck:
- # test: ["CMD", "/openim/openim-chat/scripts/check_all.sh"]
- # interval: 300s
- # timeout: 10s
- # retries: 5
- # ports:
- # - ${OPENIM_CHAT_API_PORT}:10008
- # - ${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}
-
- # prometheus:
- # image: prom/prometheus
- # volumes:
- # - openim_server_prometheus_config:/etc/prometheus
- # container_name: prometheus
- # ports:
- # - ${PROMETHEUS_PORT}:9091
- # command: --web.listen-address=:9091 --config.file="/etc/prometheus"
- # networks:
- # server:
- # ipv4_address: ${PROMETHEUS_NETWORK_ADDRESS}
-
- # grafana:
- # 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}
+# prometheus:
+# image: prom/prometheus
+# volumes:
+# - ./.docker-compose_cfg/prometheus-compose.yml:/etc/prometheus/prometheus.yml
+# container_name: prometheus
+# ports:
+# - ${PROMETHEUS_PORT}:9091
+# depends_on:
+# - openim-server
+# command: --web.listen-address=:9091 --config.file="/etc/prometheus/prometheus.yml"
+# networks:
+# openim-server:
+# ipv4_address: ${PROMETHEUS_NETWORK_ADDRESS}
- # node-exporter:
- # image: quay.io/prometheus/node-exporter
- # container_name: node-exporter
- # restart: always
- # ports:
- # - "9100:9100"
+# grafana:
+# image: grafana/grafana
+# volumes:
+# - ./.docker-compose_cfg/datasource-compose.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
+# - ./.docker-compose_cfg/grafana.ini:/etc/grafana/grafana.ini
+# - ./.docker-compose_cfg/node-exporter-full_rev1.json:/var/lib/grafana/dashboards/node-exporter-full_rev1.json
+# container_name: grafana
+# ports:
+# - ${GRAFANA_PORT}:3000
+# depends_on:
+# - prometheus
+# networks:
+# openim-server:
+# ipv4_address: ${GRAFANA_NETWORK_ADDRESS}
\ No newline at end of file
diff --git a/scripts/demo.sh b/scripts/demo.sh
index 51a8a7aa7..329e04f0f 100755
--- a/scripts/demo.sh
+++ b/scripts/demo.sh
@@ -13,6 +13,20 @@
# See the License for the specific language governing permissions and
# 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 green=$(tput bold; tput setaf 2)
readonly yellow=$(tput bold; tput setaf 3)
@@ -58,8 +72,11 @@ clear
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::run "curl https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml -o basic-openim-server-dependency.yml"
-openim::util::run "docker compose up --f basic-openim-server-dependency.yml up -d"
+openim::util::run "docker compose up -d"
+clear
+
+openim::util::desc "========> Use make init-githooks Initialize git hooks "
+openim::util::run "make init-githooks"
clear
openim::util::desc "The specification is pretty high, you need to be bound on your branch name, as well as commit messages"
@@ -133,3 +150,5 @@ clear
openim::util::desc "Add copyright"
openim::util::run "make add-copyright"
clear
+
+exit 0
diff --git a/scripts/install/openim-push.sh b/scripts/install/openim-push.sh
index e57edfaf6..aa5ebe7d4 100755
--- a/scripts/install/openim-push.sh
+++ b/scripts/install/openim-push.sh
@@ -71,7 +71,7 @@ function openim::push::start()
for (( i=0; i<${#OPENIM_PUSH_PORTS_ARRAY[@]}; i++ )); do
openim::log::info "start push process, port: ${OPENIM_PUSH_PORTS_ARRAY[$i]}, prometheus port: ${PUSH_PROM_PORTS_ARRAY[$i]}"
- nohup ${OPENIM_PUSH_BINARY} --port ${OPENIM_PUSH_PORTS_ARRAY[$i]} --prometheus_port ${PUSH_PROM_PORTS_ARRAY[$i]} >> ${LOG_FILE} 2>&1 &
+ nohup ${OPENIM_PUSH_BINARY} --port ${OPENIM_PUSH_PORTS_ARRAY[$i]} -c ${OPENIM_PUSH_CONFIG} --prometheus_port ${PUSH_PROM_PORTS_ARRAY[$i]} >> ${LOG_FILE} 2>&1 &
done
openim::util::check_process_names ${SERVER_NAME}