mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-10-26 21:22:16 +08:00 
			
		
		
		
	feat: add openim scripts fix and optimize config about openim source code deployment for this PR? openim ci and scripts (#1641)
* fix: fix openim zk env set Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: fix openim zk env set Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add openim docker prom Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add openim docker prom Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
		
							parent
							
								
									1e52376d7b
								
							
						
					
					
						commit
						959c5a7ae1
					
				| @ -4,20 +4,20 @@ | |||||||
| # These options can be set via environment variables. If both environment variables  | # These options can be set via environment variables. If both environment variables  | ||||||
| # and settings in this .env file exist, the environment variables take precedence. | # and settings in this .env file exist, the environment variables take precedence. | ||||||
| # ----------------------------------------------------------------------------- | # ----------------------------------------------------------------------------- | ||||||
|  | # ========================== | ||||||
|  | # General Configuration | ||||||
|  | # ========================== | ||||||
|  | # These settings apply to the overall environment. | ||||||
| 
 | 
 | ||||||
| # Local IP address for the service | # Data storage directory for persistent data. | ||||||
| # To modify, uncomment and replace with the actual IP address | # Example: DATA_DIR=/path/to/data | ||||||
| OPENIM_IP=${OPENIM_IP} |  | ||||||
| 
 |  | ||||||
| # Data storage directory |  | ||||||
| DATA_DIR=${DATA_DIR} | DATA_DIR=${DATA_DIR} | ||||||
| 
 | 
 | ||||||
| # Choose the image address: GitHub (ghcr.io/openimsdk), Docker Hub (openim),  | # Docker image registry. Uncomment the preferred one. | ||||||
| # or Ali Cloud (registry.cn-hangzhou.aliyuncs.com/openimsdk). | # Options: ghcr.io/openimsdk, openim, registry.cn-hangzhou.aliyuncs.com/openimsdk | ||||||
| # Uncomment one of the following three options. Aliyun is recommended for users in China. | # IMAGE_REGISTRY="ghcr.io/openimsdk" | ||||||
| # export IMAGE_REGISTRY="ghcr.io/openimsdk" | # IMAGE_REGISTRY="openim" | ||||||
| # export IMAGE_REGISTRY="openim" | # IMAGE_REGISTRY="registry.cn-hangzhou.aliyuncs.com/openimsdk" | ||||||
| # export IMAGE_REGISTRY="registry.cn-hangzhou.aliyuncs.com/openimsdk" |  | ||||||
| IMAGE_REGISTRY=${IMAGE_REGISTRY} | IMAGE_REGISTRY=${IMAGE_REGISTRY} | ||||||
| 
 | 
 | ||||||
| # ====================================== | # ====================================== | ||||||
| @ -45,23 +45,45 @@ NODE_EXPORTER_NETWORK_ADDRESS=${NODE_EXPORTER_NETWORK_ADDRESS} | |||||||
| OPENIM_ADMIN_FRONT_NETWORK_ADDRESS=${OPENIM_ADMIN_FRONT_NETWORK_ADDRESS} | OPENIM_ADMIN_FRONT_NETWORK_ADDRESS=${OPENIM_ADMIN_FRONT_NETWORK_ADDRESS} | ||||||
| ALERT_MANAGER_NETWORK_ADDRESS=${ALERT_MANAGER_NETWORK_ADDRESS} | ALERT_MANAGER_NETWORK_ADDRESS=${ALERT_MANAGER_NETWORK_ADDRESS} | ||||||
| 
 | 
 | ||||||
| # ----------------------------------------------------------------------------- | # ============================================================================== | ||||||
| # Database Configuration | # Configuration Update Instructions | ||||||
| # This section contains environment variable settings related to databases. | # ============================================================================== | ||||||
| # ----------------------------------------------------------------------------- | # This header outlines the methods to update common variables in config.yaml and .env files. | ||||||
|  | # These instructions are vital for maintaining the OpenIM environment's configuration. | ||||||
|  | # | ||||||
|  | # METHOD 1: Regenerate All Configurations | ||||||
|  | # ---------------------------------------- | ||||||
|  | # Use this method to regenerate all configurations. | ||||||
|  | # Steps: | ||||||
|  | #   1. Delete existing config files: | ||||||
|  | #      - openim-server/config/config.yaml | ||||||
|  | #      - openim-chat/config/config.yaml | ||||||
|  | #   2. Modify the .env file as required. | ||||||
|  | #   3. Run 'docker compose up -d'. This will regenerate: | ||||||
|  | #       - config/config.yaml | ||||||
|  | # | ||||||
|  | # METHOD 2: Modify Individual Configuration Files | ||||||
|  | # ----------------------------------------------- | ||||||
|  | # Use this method to update specific configuration files. | ||||||
|  | # Steps: | ||||||
|  | #   1. Modify the .env file as necessary. | ||||||
|  | #   2. Update the corresponding entries in: | ||||||
|  | #      - config/config.yaml | ||||||
|  | #   3. Restart the services with 'docker compose up -d'. | ||||||
|  | #   4. Special Note: If you modify OPENIM_IP, API_OPENIM_PORT, or MINIO_PORT in .env, | ||||||
|  | #      ensure to update the corresponding services and configurations accordingly. | ||||||
|  | # | ||||||
|  | # It is essential to follow these methods to ensure consistent and correct application behavior. | ||||||
|  | # ============================================================================== | ||||||
|  | # Local IP address of the service. Modify if necessary. | ||||||
|  | # Example: OPENIM_IP=172.28.0.1, | ||||||
|  | OPENIM_IP=${OPENIM_IP} | ||||||
| 
 | 
 | ||||||
| # ----- ZooKeeper Configuration ----- | # ----- ZooKeeper Configuration ----- | ||||||
| # Address or hostname for the ZooKeeper service. |  | ||||||
| 
 |  | ||||||
| # Port for ZooKeeper service. | # Port for ZooKeeper service. | ||||||
| # Default: ZOOKEEPER_PORT=12181 | # Default: ZOOKEEPER_PORT=12181 | ||||||
| ZOOKEEPER_PORT=${ZOOKEEPER_PORT} | ZOOKEEPER_PORT=${ZOOKEEPER_PORT} | ||||||
| 
 | 
 | ||||||
| # ----- MongoDB Configuration ----- |  | ||||||
| # Address or hostname for the MongoDB service. |  | ||||||
| # Default: MONGO_ADDRESS=172.28.0.1 |  | ||||||
| MONGO_ADDRESS=${MONGO_NETWORK_ADDRESS} |  | ||||||
| 
 |  | ||||||
| # Port on which MongoDB service is running. | # Port on which MongoDB service is running. | ||||||
| # Default: MONGO_PORT=37017 | # Default: MONGO_PORT=37017 | ||||||
| # MONGO_PORT=${MONGO_PORT} | # MONGO_PORT=${MONGO_PORT} | ||||||
| @ -79,9 +101,6 @@ MONGO_PASSWORD=${MONGO_PASSWORD} | |||||||
| MONGO_DATABASE=${MONGO_DATABASE} | MONGO_DATABASE=${MONGO_DATABASE} | ||||||
| 
 | 
 | ||||||
| # ----- Redis Configuration ----- | # ----- Redis Configuration ----- | ||||||
| # Address or hostname for the Redis service. |  | ||||||
| # Default: REDIS_ADDRESS=172.28.0.1 |  | ||||||
| REDIS_ADDRESS=${REDIS_NETWORK_ADDRESS} |  | ||||||
| 
 | 
 | ||||||
| # Port on which Redis in-memory data structure store is running. | # Port on which Redis in-memory data structure store is running. | ||||||
| # Default: REDIS_PORT=16379 | # Default: REDIS_PORT=16379 | ||||||
| @ -91,11 +110,6 @@ REDIS_PORT=${REDIS_PORT} | |||||||
| # Default: REDIS_PASSWORD=openIM123 | # Default: REDIS_PASSWORD=openIM123 | ||||||
| REDIS_PASSWORD=${REDIS_PASSWORD} | REDIS_PASSWORD=${REDIS_PASSWORD} | ||||||
| 
 | 
 | ||||||
| # ----- Kafka Configuration ----- |  | ||||||
| # Address or hostname for the Kafka service. |  | ||||||
| # Default: KAFKA_ADDRESS=172.28.0.1 |  | ||||||
| KAFKA_ADDRESS=${KAFKA_NETWORK_ADDRESS} |  | ||||||
| 
 |  | ||||||
| # Kakfa username to authenticate with the Kafka service. | # Kakfa username to authenticate with the Kafka service. | ||||||
| # KAFKA_USERNAME=${KAFKA_USERNAME} | # KAFKA_USERNAME=${KAFKA_USERNAME} | ||||||
| 
 | 
 | ||||||
| @ -107,20 +121,13 @@ KAFKA_PORT=${KAFKA_PORT} | |||||||
| # Default: KAFKA_LATESTMSG_REDIS_TOPIC=latestMsgToRedis | # Default: KAFKA_LATESTMSG_REDIS_TOPIC=latestMsgToRedis | ||||||
| KAFKA_LATESTMSG_REDIS_TOPIC=${KAFKA_LATESTMSG_REDIS_TOPIC} | KAFKA_LATESTMSG_REDIS_TOPIC=${KAFKA_LATESTMSG_REDIS_TOPIC} | ||||||
| 
 | 
 | ||||||
| # Topic in Kafka for pushing messages (e.g. notifications or updates). | # MINIO_PORT | ||||||
| # Default: KAFKA_MSG_PUSH_TOPIC=msgToPush | # ---------- | ||||||
| KAFKA_MSG_PUSH_TOPIC=${KAFKA_MSG_PUSH_TOPIC} | # MINIO_PORT sets the port for the MinIO object storage service. | ||||||
| 
 | # Upon changing this port, the MinIO endpoint URLs in the `config/config.yaml` file must be updated | ||||||
| # Topic in Kafka for storing offline messages in MongoDB. | # to reflect this change. The endpoints include both the 'endpoint' and 'signEndpoint'  | ||||||
| # Default: KAFKA_OFFLINEMSG_MONGO_TOPIC=offlineMsgToMongoMysql | # under the MinIO configuration. | ||||||
| KAFKA_OFFLINEMSG_MONGO_TOPIC=${KAFKA_OFFLINEMSG_MONGO_TOPIC} | # | ||||||
| 
 |  | ||||||
| # ----- MinIO Configuration ---- |  | ||||||
| # Address or hostname for the MinIO object storage service. |  | ||||||
| # Default: MINIO_ADDRESS=172.28.0.1 |  | ||||||
| MINIO_ADDRESS=${MINIO_NETWORK_ADDRESS} |  | ||||||
| 
 |  | ||||||
| # Port on which MinIO object storage service is running. |  | ||||||
| # Default: MINIO_PORT=10005 | # Default: MINIO_PORT=10005 | ||||||
| MINIO_PORT=${MINIO_PORT} | MINIO_PORT=${MINIO_PORT} | ||||||
| 
 | 
 | ||||||
| @ -133,19 +140,11 @@ MINIO_PORT=${MINIO_PORT} | |||||||
| MINIO_SECRET_KEY=${MINIO_SECRET_KEY} | MINIO_SECRET_KEY=${MINIO_SECRET_KEY} | ||||||
| 
 | 
 | ||||||
| # ----- Prometheus Configuration ----- | # ----- Prometheus Configuration ----- | ||||||
| # Address or hostname for the Prometheus service. |  | ||||||
| # Default: PROMETHEUS_ADDRESS=172.28.0.1 |  | ||||||
| PROMETHEUS_ADDRESS=${PROMETHEUS_NETWORK_ADDRESS} |  | ||||||
| 
 |  | ||||||
| # Port on which Prometheus service is running. | # Port on which Prometheus service is running. | ||||||
| # Default: PROMETHEUS_PORT=19090 | # Default: PROMETHEUS_PORT=19090 | ||||||
| PROMETHEUS_PORT=${PROMETHEUS_PORT} | PROMETHEUS_PORT=${PROMETHEUS_PORT} | ||||||
| 
 | 
 | ||||||
| # ----- Grafana Configuration ----- | # ----- Grafana Configuration ----- | ||||||
| # Address or hostname for the Grafana service. |  | ||||||
| # Default: GRAFANA_ADDRESS=172.28.0.1 |  | ||||||
| GRAFANA_ADDRESS=${GRAFANA_NETWORK_ADDRESS} |  | ||||||
| 
 |  | ||||||
| # Port on which Grafana service is running. | # Port on which Grafana service is running. | ||||||
| # Default: GRAFANA_PORT=13000 | # Default: GRAFANA_PORT=13000 | ||||||
| GRAFANA_PORT=${GRAFANA_PORT} | GRAFANA_PORT=${GRAFANA_PORT} | ||||||
| @ -162,23 +161,19 @@ OPENIM_WEB_DIST_PATH=${OPENIM_WEB_DIST_PATH} | |||||||
| # Default: OPENIM_WEB_PORT=11001 | # Default: OPENIM_WEB_PORT=11001 | ||||||
| OPENIM_WEB_PORT=${OPENIM_WEB_PORT} | OPENIM_WEB_PORT=${OPENIM_WEB_PORT} | ||||||
| 
 | 
 | ||||||
| # Address or hostname for the OpenIM web service. |  | ||||||
| # Default: OPENIM_WEB_ADDRESS=172.28.0.1 |  | ||||||
| OPENIM_WEB_ADDRESS=${OPENIM_WEB_NETWORK_ADDRESS} |  | ||||||
| 
 |  | ||||||
| # ====================================== | # ====================================== | ||||||
| # ========= OpenIM Server ============== | # ========= OpenIM Server ============== | ||||||
| # ====================================== | # ====================================== | ||||||
| 
 |  | ||||||
| # Address or hostname for the OpenIM server. |  | ||||||
| # Default: OPENIM_SERVER_ADDRESS=172.28.0.1 |  | ||||||
| OPENIM_SERVER_ADDRESS=${OPENIM_SERVER_NETWORK_ADDRESS} |  | ||||||
| 
 |  | ||||||
| # Port for the OpenIM WebSockets. | # Port for the OpenIM WebSockets. | ||||||
| # Default: OPENIM_WS_PORT=10001 | # Default: OPENIM_WS_PORT=10001 | ||||||
| OPENIM_WS_PORT=${OPENIM_WS_PORT} | OPENIM_WS_PORT=${OPENIM_WS_PORT} | ||||||
| 
 | 
 | ||||||
| # Port for the OpenIM API. | # API_OPENIM_PORT | ||||||
|  | # --------------- | ||||||
|  | # This variable defines the port on which the OpenIM API service will listen. | ||||||
|  | # When changing this port, it's essential to update the apiURL in the config.yaml file | ||||||
|  | # to ensure the API service is accessible at the new port. | ||||||
|  | # | ||||||
| # Default: API_OPENIM_PORT=10002 | # Default: API_OPENIM_PORT=10002 | ||||||
| API_OPENIM_PORT=${API_OPENIM_PORT} | API_OPENIM_PORT=${API_OPENIM_PORT} | ||||||
| 
 | 
 | ||||||
| @ -191,10 +186,6 @@ API_OPENIM_PORT=${API_OPENIM_PORT} | |||||||
| # Default: CHAT_IMAGE_VERSION=main | # Default: CHAT_IMAGE_VERSION=main | ||||||
| CHAT_IMAGE_VERSION=${CHAT_IMAGE_VERSION} | CHAT_IMAGE_VERSION=${CHAT_IMAGE_VERSION} | ||||||
| 
 | 
 | ||||||
| # Address or hostname for the OpenIM chat service. |  | ||||||
| # Default: OPENIM_CHAT_ADDRESS=172.28.0.1 |  | ||||||
| OPENIM_CHAT_ADDRESS=${OPENIM_CHAT_NETWORK_ADDRESS} |  | ||||||
| 
 |  | ||||||
| # Port for the OpenIM chat API. | # Port for the OpenIM chat API. | ||||||
| # Default: OPENIM_CHAT_API_PORT=10008 | # Default: OPENIM_CHAT_API_PORT=10008 | ||||||
| OPENIM_CHAT_API_PORT=${OPENIM_CHAT_API_PORT} | OPENIM_CHAT_API_PORT=${OPENIM_CHAT_API_PORT} | ||||||
| @ -203,7 +194,6 @@ OPENIM_CHAT_API_PORT=${OPENIM_CHAT_API_PORT} | |||||||
| # Default: OPENIM_CHAT_DATA_DIR=./openim-chat/main | # Default: OPENIM_CHAT_DATA_DIR=./openim-chat/main | ||||||
| OPENIM_CHAT_DATA_DIR=${OPENIM_CHAT_DATA_DIR} | OPENIM_CHAT_DATA_DIR=${OPENIM_CHAT_DATA_DIR} | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| # ====================================== | # ====================================== | ||||||
| # ========== OpenIM Admin ============== | # ========== OpenIM Admin ============== | ||||||
| # ====================================== | # ====================================== | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user