mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-29 23:38:11 +08:00
feat: set config file path
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
parent
e4eb8ffd6e
commit
108c4b1a50
52
.env
52
.env
@ -12,7 +12,7 @@ PASSWORD=openIM123
|
|||||||
|
|
||||||
# Endpoint for the MinIO object storage service.
|
# Endpoint for the MinIO object storage service.
|
||||||
# Default: MINIO_ENDPOINT=http://172.28.0.1:10005
|
# Default: MINIO_ENDPOINT=http://172.28.0.1:10005
|
||||||
MINIO_ENDPOINT=http://172.28.0.1:10005
|
MINIO_ENDPOINT=http://172.29.0.1:10005
|
||||||
|
|
||||||
# Base URL for the application programming interface (API).
|
# Base URL for the application programming interface (API).
|
||||||
# Default: API_URL=http://172.28.0.1:10002
|
# Default: API_URL=http://172.28.0.1:10002
|
||||||
@ -20,7 +20,7 @@ API_URL=http://14.153.6.114:10002
|
|||||||
|
|
||||||
# Directory path for storing data files or related information.
|
# Directory path for storing data files or related information.
|
||||||
# Default: DATA_DIR=./
|
# Default: DATA_DIR=./
|
||||||
DATA_DIR=/root/workspaces/openim/openim-docker/openim-server/main
|
DATA_DIR=/root/workspaces/openim/openim-server
|
||||||
|
|
||||||
# ======================================
|
# ======================================
|
||||||
# ========= Network Configuration ======
|
# ========= Network Configuration ======
|
||||||
@ -28,55 +28,55 @@ DATA_DIR=/root/workspaces/openim/openim-docker/openim-server/main
|
|||||||
|
|
||||||
# Subnet for the Docker network.
|
# Subnet for the Docker network.
|
||||||
# Default: DOCKER_BRIDGE_SUBNET=172.28.0.0/16
|
# Default: DOCKER_BRIDGE_SUBNET=172.28.0.0/16
|
||||||
DOCKER_BRIDGE_SUBNET=172.28.0.0/16
|
DOCKER_BRIDGE_SUBNET=172.29.0.0/16
|
||||||
|
|
||||||
# Gateway for the Docker network.
|
# Gateway for the Docker network.
|
||||||
# Default: DOCKER_BRIDGE_GATEWAY=172.28.0.1
|
# Default: DOCKER_BRIDGE_GATEWAY=172.28.0.1
|
||||||
DOCKER_BRIDGE_GATEWAY=172.28.0.1
|
DOCKER_BRIDGE_GATEWAY=172.29.0.1
|
||||||
|
|
||||||
# Address or hostname for the MySQL network.
|
# Address or hostname for the MySQL network.
|
||||||
# Default: MYSQL_NETWORK_ADDRESS=172.28.0.2
|
# Default: MYSQL_NETWORK_ADDRESS=172.28.0.2
|
||||||
MYSQL_NETWORK_ADDRESS=172.28.0.2
|
MYSQL_NETWORK_ADDRESS=172.29.0.2
|
||||||
|
|
||||||
# Address or hostname for the MongoDB network.
|
# Address or hostname for the MongoDB network.
|
||||||
# Default: MONGO_NETWORK_ADDRESS=172.28.0.3
|
# Default: MONGO_NETWORK_ADDRESS=172.28.0.3
|
||||||
MONGO_NETWORK_ADDRESS=172.28.0.3
|
MONGO_NETWORK_ADDRESS=172.29.0.3
|
||||||
|
|
||||||
# Address or hostname for the Redis network.
|
# Address or hostname for the Redis network.
|
||||||
# Default: REDIS_NETWORK_ADDRESS=172.28.0.4
|
# Default: REDIS_NETWORK_ADDRESS=172.28.0.4
|
||||||
REDIS_NETWORK_ADDRESS=172.28.0.4
|
REDIS_NETWORK_ADDRESS=172.29.0.4
|
||||||
|
|
||||||
# Address or hostname for the Kafka network.
|
# Address or hostname for the Kafka network.
|
||||||
# Default: KAFKA_NETWORK_ADDRESS=172.28.0.5
|
# Default: KAFKA_NETWORK_ADDRESS=172.28.0.5
|
||||||
KAFKA_NETWORK_ADDRESS=172.28.0.5
|
KAFKA_NETWORK_ADDRESS=172.29.0.5
|
||||||
|
|
||||||
# Address or hostname for the ZooKeeper network.
|
# Address or hostname for the ZooKeeper network.
|
||||||
# Default: ZOOKEEPER_NETWORK_ADDRESS=172.28.0.6
|
# Default: ZOOKEEPER_NETWORK_ADDRESS=172.28.0.6
|
||||||
ZOOKEEPER_NETWORK_ADDRESS=172.28.0.6
|
ZOOKEEPER_NETWORK_ADDRESS=172.29.0.6
|
||||||
|
|
||||||
# Address or hostname for the MinIO network.
|
# Address or hostname for the MinIO network.
|
||||||
# Default: MINIO_NETWORK_ADDRESS=172.28.0.7
|
# Default: MINIO_NETWORK_ADDRESS=172.28.0.7
|
||||||
MINIO_NETWORK_ADDRESS=172.28.0.7
|
MINIO_NETWORK_ADDRESS=172.29.0.7
|
||||||
|
|
||||||
# Address or hostname for the OpenIM web network.
|
# Address or hostname for the OpenIM web network.
|
||||||
# Default: OPENIM_WEB_NETWORK_ADDRESS=172.28.0.8
|
# Default: OPENIM_WEB_NETWORK_ADDRESS=172.28.0.8
|
||||||
OPENIM_WEB_NETWORK_ADDRESS=172.28.0.8
|
OPENIM_WEB_NETWORK_ADDRESS=172.29.0.8
|
||||||
|
|
||||||
# Address or hostname for the OpenIM server network.
|
# Address or hostname for the OpenIM server network.
|
||||||
# Default: OPENIM_SERVER_NETWORK_ADDRESS=172.28.0.9
|
# Default: OPENIM_SERVER_NETWORK_ADDRESS=172.28.0.9
|
||||||
OPENIM_SERVER_NETWORK_ADDRESS=172.28.0.9
|
OPENIM_SERVER_NETWORK_ADDRESS=172.29.0.9
|
||||||
|
|
||||||
# Address or hostname for the OpenIM chat network.
|
# Address or hostname for the OpenIM chat network.
|
||||||
# Default: OPENIM_CHAT_NETWORK_ADDRESS=172.28.0.10
|
# Default: OPENIM_CHAT_NETWORK_ADDRESS=172.28.0.10
|
||||||
OPENIM_CHAT_NETWORK_ADDRESS=172.28.0.10
|
OPENIM_CHAT_NETWORK_ADDRESS=172.29.0.10
|
||||||
|
|
||||||
# Address or hostname for the Prometheus network.
|
# Address or hostname for the Prometheus network.
|
||||||
# Default: PROMETHEUS_NETWORK_ADDRESS=172.28.0.11
|
# Default: PROMETHEUS_NETWORK_ADDRESS=172.28.0.11
|
||||||
PROMETHEUS_NETWORK_ADDRESS=172.28.0.11
|
PROMETHEUS_NETWORK_ADDRESS=172.29.0.11
|
||||||
|
|
||||||
# Address or hostname for the Grafana network.
|
# Address or hostname for the Grafana network.
|
||||||
# Default: GRAFANA_NETWORK_ADDRESS=172.28.0.12
|
# Default: GRAFANA_NETWORK_ADDRESS=172.28.0.12
|
||||||
GRAFANA_NETWORK_ADDRESS=172.28.0.12
|
GRAFANA_NETWORK_ADDRESS=172.29.0.12
|
||||||
|
|
||||||
|
|
||||||
# ===============================================
|
# ===============================================
|
||||||
@ -87,7 +87,7 @@ GRAFANA_NETWORK_ADDRESS=172.28.0.12
|
|||||||
# ----- ZooKeeper Configuration -----
|
# ----- ZooKeeper Configuration -----
|
||||||
# Address or hostname for the ZooKeeper service.
|
# Address or hostname for the ZooKeeper service.
|
||||||
# Default: ZOOKEEPER_ADDRESS=172.28.0.1
|
# Default: ZOOKEEPER_ADDRESS=172.28.0.1
|
||||||
ZOOKEEPER_ADDRESS=172.28.0.6
|
ZOOKEEPER_ADDRESS=172.29.0.6
|
||||||
|
|
||||||
# Port for ZooKeeper service.
|
# Port for ZooKeeper service.
|
||||||
# Default: ZOOKEEPER_PORT=12181
|
# Default: ZOOKEEPER_PORT=12181
|
||||||
@ -97,7 +97,7 @@ ZOOKEEPER_PORT=12181
|
|||||||
|
|
||||||
# Address or hostname for the MySQL service.
|
# Address or hostname for the MySQL service.
|
||||||
# Default: MYSQL_ADDRESS=172.28.0.1
|
# Default: MYSQL_ADDRESS=172.28.0.1
|
||||||
MYSQL_ADDRESS=172.28.0.2
|
MYSQL_ADDRESS=172.29.0.2
|
||||||
|
|
||||||
# Port on which MySQL database service is running.
|
# Port on which MySQL database service is running.
|
||||||
# Default: MYSQL_PORT=13306
|
# Default: MYSQL_PORT=13306
|
||||||
@ -110,7 +110,7 @@ MYSQL_PASSWORD=openIM123
|
|||||||
# ----- MongoDB Configuration -----
|
# ----- MongoDB Configuration -----
|
||||||
# Address or hostname for the MongoDB service.
|
# Address or hostname for the MongoDB service.
|
||||||
# Default: MONGO_ADDRESS=172.28.0.1
|
# Default: MONGO_ADDRESS=172.28.0.1
|
||||||
MONGO_ADDRESS=172.28.0.3
|
MONGO_ADDRESS=172.29.0.3
|
||||||
|
|
||||||
# Port on which MongoDB service is running.
|
# Port on which MongoDB service is running.
|
||||||
# Default: MONGO_PORT=37017
|
# Default: MONGO_PORT=37017
|
||||||
@ -131,7 +131,7 @@ MONGO_DATABASE=openIM_v3
|
|||||||
# ----- Redis Configuration -----
|
# ----- Redis Configuration -----
|
||||||
# Address or hostname for the Redis service.
|
# Address or hostname for the Redis service.
|
||||||
# Default: REDIS_ADDRESS=172.28.0.1
|
# Default: REDIS_ADDRESS=172.28.0.1
|
||||||
REDIS_ADDRESS=172.28.0.4
|
REDIS_ADDRESS=172.29.0.4
|
||||||
|
|
||||||
# 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
|
||||||
@ -144,7 +144,7 @@ REDIS_PASSWORD=openIM123
|
|||||||
# ----- Kafka Configuration -----
|
# ----- Kafka Configuration -----
|
||||||
# Address or hostname for the Kafka service.
|
# Address or hostname for the Kafka service.
|
||||||
# Default: KAFKA_ADDRESS=172.28.0.1
|
# Default: KAFKA_ADDRESS=172.28.0.1
|
||||||
KAFKA_ADDRESS=172.28.0.5
|
KAFKA_ADDRESS=172.29.0.5
|
||||||
|
|
||||||
# Port on which Kafka distributed streaming platform is running.
|
# Port on which Kafka distributed streaming platform is running.
|
||||||
# Default: KAFKA_PORT=19092
|
# Default: KAFKA_PORT=19092
|
||||||
@ -165,7 +165,7 @@ KAFKA_OFFLINEMSG_MONGO_TOPIC=offlineMsgToMongoMysql
|
|||||||
# ----- MinIO Configuration ----
|
# ----- MinIO Configuration ----
|
||||||
# Address or hostname for the MinIO object storage service.
|
# Address or hostname for the MinIO object storage service.
|
||||||
# Default: MINIO_ADDRESS=172.28.0.1
|
# Default: MINIO_ADDRESS=172.28.0.1
|
||||||
MINIO_ADDRESS=172.28.0.7
|
MINIO_ADDRESS=172.29.0.7
|
||||||
|
|
||||||
# Port on which MinIO object storage service is running.
|
# Port on which MinIO object storage service is running.
|
||||||
# Default: MINIO_PORT=10005
|
# Default: MINIO_PORT=10005
|
||||||
@ -182,7 +182,7 @@ MINIO_SECRET_KEY=openIM123
|
|||||||
# ----- Prometheus Configuration -----
|
# ----- Prometheus Configuration -----
|
||||||
# Address or hostname for the Prometheus service.
|
# Address or hostname for the Prometheus service.
|
||||||
# Default: PROMETHEUS_ADDRESS=172.28.0.1
|
# Default: PROMETHEUS_ADDRESS=172.28.0.1
|
||||||
PROMETHEUS_ADDRESS=172.28.0.11
|
PROMETHEUS_ADDRESS=172.29.0.11
|
||||||
|
|
||||||
# Port on which Prometheus service is running.
|
# Port on which Prometheus service is running.
|
||||||
# Default: PROMETHEUS_PORT=19090
|
# Default: PROMETHEUS_PORT=19090
|
||||||
@ -191,7 +191,7 @@ PROMETHEUS_PORT=19090
|
|||||||
# ----- Grafana Configuration -----
|
# ----- Grafana Configuration -----
|
||||||
# Address or hostname for the Grafana service.
|
# Address or hostname for the Grafana service.
|
||||||
# Default: GRAFANA_ADDRESS=172.28.0.1
|
# Default: GRAFANA_ADDRESS=172.28.0.1
|
||||||
GRAFANA_ADDRESS=172.28.0.12
|
GRAFANA_ADDRESS=172.29.0.12
|
||||||
|
|
||||||
# Port on which Grafana service is running.
|
# Port on which Grafana service is running.
|
||||||
# Default: GRAFANA_PORT=3000
|
# Default: GRAFANA_PORT=3000
|
||||||
@ -211,7 +211,7 @@ OPENIM_WEB_PORT=11001
|
|||||||
|
|
||||||
# Address or hostname for the OpenIM web service.
|
# Address or hostname for the OpenIM web service.
|
||||||
# Default: OPENIM_WEB_ADDRESS=172.28.0.1
|
# Default: OPENIM_WEB_ADDRESS=172.28.0.1
|
||||||
OPENIM_WEB_ADDRESS=172.28.0.8
|
OPENIM_WEB_ADDRESS=172.29.0.8
|
||||||
|
|
||||||
|
|
||||||
# ======================================
|
# ======================================
|
||||||
@ -220,7 +220,7 @@ OPENIM_WEB_ADDRESS=172.28.0.8
|
|||||||
|
|
||||||
# Address or hostname for the OpenIM server.
|
# Address or hostname for the OpenIM server.
|
||||||
# Default: OPENIM_SERVER_ADDRESS=172.28.0.1
|
# Default: OPENIM_SERVER_ADDRESS=172.28.0.1
|
||||||
OPENIM_SERVER_ADDRESS=172.28.0.9
|
OPENIM_SERVER_ADDRESS=172.29.0.9
|
||||||
|
|
||||||
# Port for the OpenIM WebSockets.
|
# Port for the OpenIM WebSockets.
|
||||||
# Default: OPENIM_WS_PORT=10001
|
# Default: OPENIM_WS_PORT=10001
|
||||||
@ -241,7 +241,7 @@ CHAT_BRANCH=main
|
|||||||
|
|
||||||
# Address or hostname for the OpenIM chat service.
|
# Address or hostname for the OpenIM chat service.
|
||||||
# Default: OPENIM_CHAT_ADDRESS=172.28.0.1
|
# Default: OPENIM_CHAT_ADDRESS=172.28.0.1
|
||||||
OPENIM_CHAT_ADDRESS=172.28.0.10
|
OPENIM_CHAT_ADDRESS=172.29.0.10
|
||||||
|
|
||||||
# Port for the OpenIM chat API.
|
# Port for the OpenIM chat API.
|
||||||
# Default: OPENIM_CHAT_API_PORT=10008
|
# Default: OPENIM_CHAT_API_PORT=10008
|
||||||
|
|||||||
@ -28,9 +28,9 @@
|
|||||||
# Zookeeper password
|
# Zookeeper password
|
||||||
zookeeper:
|
zookeeper:
|
||||||
schema: openim
|
schema: openim
|
||||||
address: [ 127.0.0.1:2181 ]
|
address: [ 172.29.0.1:12181 ]
|
||||||
username:
|
username: ''
|
||||||
password:
|
password: ''
|
||||||
|
|
||||||
###################### Mysql ######################
|
###################### Mysql ######################
|
||||||
# MySQL configuration
|
# MySQL configuration
|
||||||
@ -42,7 +42,7 @@ zookeeper:
|
|||||||
# Log level: 1=slient, 2=error, 3=warn, 4=info
|
# Log level: 1=slient, 2=error, 3=warn, 4=info
|
||||||
# Slow query threshold in milliseconds
|
# Slow query threshold in milliseconds
|
||||||
mysql:
|
mysql:
|
||||||
address: [ 127.0.0.1:13306 ]
|
address: [ 172.29.0.1:13306 ]
|
||||||
username: root
|
username: root
|
||||||
password: openIM123
|
password: openIM123
|
||||||
database: openIM_v3
|
database: openIM_v3
|
||||||
@ -60,8 +60,8 @@ mysql:
|
|||||||
# Default MongoDB database name
|
# Default MongoDB database name
|
||||||
# Maximum connection pool size
|
# Maximum connection pool size
|
||||||
mongo:
|
mongo:
|
||||||
uri:
|
uri: ''
|
||||||
address: [ 127.0.0.1:37017 ]
|
address: [ 172.29.0.1:37017 ]
|
||||||
database: openIM_v3
|
database: openIM_v3
|
||||||
username: root
|
username: root
|
||||||
password: openIM123
|
password: openIM123
|
||||||
@ -72,8 +72,8 @@ mongo:
|
|||||||
#
|
#
|
||||||
# Username is required only for Redis version 6.0+
|
# Username is required only for Redis version 6.0+
|
||||||
redis:
|
redis:
|
||||||
address: [ 127.0.0.1:16379 ]
|
address: [ 172.29.0.1:16379 ]
|
||||||
username:
|
username: ''
|
||||||
password: openIM123
|
password: openIM123
|
||||||
|
|
||||||
###################### Kafka configuration information ######################
|
###################### Kafka configuration information ######################
|
||||||
@ -84,9 +84,9 @@ redis:
|
|||||||
# It's not recommended to modify this topic name
|
# It's not recommended to modify this topic name
|
||||||
# Consumer group ID, it's not recommended to modify
|
# Consumer group ID, it's not recommended to modify
|
||||||
kafka:
|
kafka:
|
||||||
username:
|
username: ''
|
||||||
password:
|
password: ''
|
||||||
addr: [ 127.0.0.1:9092 ]
|
addr: [ 172.29.0.1:19092 ]
|
||||||
latestMsgToRedis:
|
latestMsgToRedis:
|
||||||
topic: "latestMsgToRedis"
|
topic: "latestMsgToRedis"
|
||||||
offlineMsgToMongo:
|
offlineMsgToMongo:
|
||||||
@ -105,7 +105,7 @@ kafka:
|
|||||||
# IP address to register with zookeeper when starting RPC, the IP and corresponding rpcPort should be accessible by api/gateway
|
# IP address to register with zookeeper when starting RPC, the IP and corresponding rpcPort should be accessible by api/gateway
|
||||||
# Default listen IP is 0.0.0.0
|
# Default listen IP is 0.0.0.0
|
||||||
rpc:
|
rpc:
|
||||||
registerIP:
|
registerIP: ''
|
||||||
listenIP: 0.0.0.0
|
listenIP: 0.0.0.0
|
||||||
|
|
||||||
###################### API configuration information ######################
|
###################### API configuration information ######################
|
||||||
@ -132,26 +132,27 @@ api:
|
|||||||
# minio.signEndpoint is minio public network address
|
# minio.signEndpoint is minio public network address
|
||||||
object:
|
object:
|
||||||
enable: "minio"
|
enable: "minio"
|
||||||
apiURL: "http://127.0.0.1:10002"
|
apiURL: "http://14.153.6.114:10002"
|
||||||
minio:
|
minio:
|
||||||
bucket: "openim"
|
bucket: "openim"
|
||||||
endpoint: "http://127.0.0.1:10005"
|
endpoint: "http://172.29.0.1:10005"
|
||||||
accessKeyID: "root"
|
accessKeyID: "root"
|
||||||
secretAccessKey: "openIM123"
|
secretAccessKey: "openIM123"
|
||||||
sessionToken: ""
|
sessionToken: ''
|
||||||
signEndpoint: "http://127.0.0.1:10005"
|
signEndpoint: "http://14.153.6.114:10005"
|
||||||
cos:
|
cos:
|
||||||
bucketURL: "https://temp-1252357374.cos.ap-chengdu.myqcloud.com"
|
bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com
|
||||||
secretID: ""
|
secretID: ''
|
||||||
secretKey: ""
|
secretKey: ''
|
||||||
sessionToken: ""
|
sessionToken: ''
|
||||||
oss:
|
oss:
|
||||||
endpoint: "https://oss-cn-chengdu.aliyuncs.com"
|
endpoint: "https://oss-cn-chengdu.aliyuncs.com"
|
||||||
bucket: "demo-9999999"
|
bucket: "demo-9999999"
|
||||||
bucketURL: "https://demo-9999999.oss-cn-chengdu.aliyuncs.com"
|
bucketURL: "https://demo-9999999.oss-cn-chengdu.aliyuncs.com"
|
||||||
accessKeyID: ""
|
accessKeyID: ''
|
||||||
accessKeySecret: ""
|
accessKeySecret: ''
|
||||||
sessionToken: ""
|
sessionToken: ''
|
||||||
|
|
||||||
|
|
||||||
###################### RPC Port Configuration ######################
|
###################### RPC Port Configuration ######################
|
||||||
# RPC service ports
|
# RPC service ports
|
||||||
@ -193,7 +194,7 @@ rpcRegisterName:
|
|||||||
# Whether to output in json format
|
# Whether to output in json format
|
||||||
# Whether to include stack trace in logs
|
# Whether to include stack trace in logs
|
||||||
log:
|
log:
|
||||||
storageLocation: ../../../../../logs/
|
storageLocation: /root/workspaces/openim/openim-server/logs/
|
||||||
rotationTime: 24
|
rotationTime: 24
|
||||||
remainRotationCount: 2
|
remainRotationCount: 2
|
||||||
remainLogLevel: 6
|
remainLogLevel: 6
|
||||||
|
|||||||
@ -89,7 +89,6 @@ verifyCode:
|
|||||||
#proxyHeader: "X-Forwarded-For"
|
#proxyHeader: "X-Forwarded-For"
|
||||||
|
|
||||||
###################### Admin List ######################
|
###################### Admin List ######################
|
||||||
adminList:
|
|
||||||
adminList:
|
adminList:
|
||||||
- adminID: admin1
|
- adminID: admin1
|
||||||
nickname: chat1
|
nickname: chat1
|
||||||
|
|||||||
@ -1,6 +1,38 @@
|
|||||||
#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'
|
version: '3'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
server:
|
||||||
|
driver: bridge
|
||||||
|
ipam:
|
||||||
|
driver: default
|
||||||
|
config:
|
||||||
|
- 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:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:5.7
|
image: mysql:5.7
|
||||||
@ -8,11 +40,14 @@ services:
|
|||||||
- "${MYSQL_PORT}:3306"
|
- "${MYSQL_PORT}:3306"
|
||||||
container_name: mysql
|
container_name: mysql
|
||||||
volumes:
|
volumes:
|
||||||
- "${DATA_DIR}/components/mysql/data:/var/lib/mysql"
|
- mysql_data:/var/lib/mysql
|
||||||
- "/etc/localtime:/etc/localtime"
|
- "/etc/localtime:/etc/localtime"
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: "${MYSQL_PASSWORD}"
|
MYSQL_ROOT_PASSWORD: "${MYSQL_PASSWORD}"
|
||||||
restart: always
|
restart: always
|
||||||
|
networks:
|
||||||
|
server:
|
||||||
|
ipv4_address: ${MYSQL_NETWORK_ADDRESS}
|
||||||
|
|
||||||
mongodb:
|
mongodb:
|
||||||
image: mongo:6.0.2
|
image: mongo:6.0.2
|
||||||
@ -21,9 +56,9 @@ services:
|
|||||||
container_name: mongo
|
container_name: mongo
|
||||||
command: --wiredTigerCacheSizeGB 1 --auth
|
command: --wiredTigerCacheSizeGB 1 --auth
|
||||||
volumes:
|
volumes:
|
||||||
- "${DATA_DIR}/components/mongodb/data/db:/data/db"
|
- mongodb_data:/data/db
|
||||||
- "${DATA_DIR}/components/mongodb/data/logs:/data/logs"
|
- mongodb_logs:/data/logs
|
||||||
- "${DATA_DIR}/components/mongodb/data/conf:/etc/mongo"
|
- mongodb_config:/etc/mongo
|
||||||
- "./scripts/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro"
|
- "./scripts/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro"
|
||||||
environment:
|
environment:
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
@ -32,52 +67,68 @@ services:
|
|||||||
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD}
|
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD}
|
||||||
- MONGO_INITDB_DATABASE=${MONGO_DATABASE}
|
- MONGO_INITDB_DATABASE=${MONGO_DATABASE}
|
||||||
restart: always
|
restart: always
|
||||||
|
networks:
|
||||||
|
server:
|
||||||
|
ipv4_address: ${MONGO_NETWORK_ADDRESS}
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:7.0.0
|
image: redis:7.0.0
|
||||||
|
container_name: redis
|
||||||
ports:
|
ports:
|
||||||
- "${REDIS_PORT}:6379"
|
- "${REDIS_PORT}:6379"
|
||||||
container_name: redis
|
|
||||||
volumes:
|
volumes:
|
||||||
- "${DATA_DIR}/components/redis/data:/data"
|
- redis_data:/data
|
||||||
- "${DATA_DIR}/components/redis/config/redis.conf:/usr/local/redis/config/redis.conf"
|
- redis_config:/usr/local/redis/config/redis.conf
|
||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
restart: always
|
restart: always
|
||||||
sysctls:
|
sysctls:
|
||||||
net.core.somaxconn: 1024
|
net.core.somaxconn: 1024
|
||||||
command: redis-server --requirepass ${REDIS_PASSWORD} --appendonly yes
|
command: redis-server --requirepass ${REDIS_PASSWORD} --appendonly yes
|
||||||
|
networks:
|
||||||
|
server:
|
||||||
|
ipv4_address: ${REDIS_NETWORK_ADDRESS}
|
||||||
|
|
||||||
zookeeper:
|
zookeeper:
|
||||||
image: wurstmeister/zookeeper
|
image: bitnami/zookeeper:3.8
|
||||||
ports:
|
container_name: zookeeper
|
||||||
- "${ZOOKEEPER_PORT}:2181"
|
ports:
|
||||||
container_name: zookeeper
|
- "${ZOOKEEPER_PORT}:2181"
|
||||||
volumes:
|
volumes:
|
||||||
- "/etc/localtime:/etc/localtime"
|
- "/etc/localtime:/etc/localtime"
|
||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
- ALLOW_ANONYMOUS_LOGIN=yes
|
||||||
restart: always
|
- TZ="Asia/Shanghai"
|
||||||
network_mode: "host"
|
restart: always
|
||||||
|
networks:
|
||||||
|
server:
|
||||||
|
ipv4_address: ${ZOOKEEPER_NETWORK_ADDRESS}
|
||||||
|
|
||||||
kafka:
|
kafka:
|
||||||
image: wurstmeister/kafka
|
image: 'bitnami/kafka:latest'
|
||||||
container_name: kafka
|
container_name: kafka
|
||||||
|
user: root
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "${KAFKA_PORT}:9092"
|
- "${KAFKA_PORT}:9092"
|
||||||
|
volumes:
|
||||||
|
- ./scripts/create_topic.sh:/opt/bitnami/kafka/create_topic.sh
|
||||||
|
- kafka_data:/bitnami/kafka
|
||||||
|
command: >
|
||||||
|
bash -c "
|
||||||
|
/opt/bitnami/scripts/kafka/run.sh & sleep 5; /opt/bitnami/kafka/create_topic.sh; wait
|
||||||
|
"
|
||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
- KAFKA_CFG_NODE_ID=0
|
||||||
KAFKA_BROKER_ID: 0
|
- TZ=Asia/Shanghai
|
||||||
KAFKA_ZOOKEEPER_CONNECT: "${ZOOKEEPER_ADDRESS}:${ZOOKEEPER_PORT}"
|
- KAFKA_CFG_PROCESS_ROLES=controller,broker
|
||||||
KAFKA_CREATE_TOPICS: "${KAFKA_LATESTMSG_REDIS_TOPIC}:8:1,${KAFKA_MSG_PUSH_TOPIC}:8:1,${KAFKA_OFFLINEMSG_MONGO_TOPIC}:8:1"
|
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
|
||||||
KAFKA_ADVERTISED_LISTENERS: INSIDE://${KAFKA_ADDR}:${KAFKA_PORT},OUTSIDE://CHANGE_TO_YOUR_EXTERNAL_IP:${KAFKA_PORT}
|
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
|
||||||
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9093
|
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093
|
||||||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT"
|
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
|
||||||
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
|
networks:
|
||||||
depends_on:
|
server:
|
||||||
- zookeeper
|
ipv4_address: ${KAFKA_NETWORK_ADDRESS}
|
||||||
network_mode: "host"
|
|
||||||
|
|
||||||
minio:
|
minio:
|
||||||
image: minio/minio
|
image: minio/minio
|
||||||
@ -86,76 +137,124 @@ services:
|
|||||||
- "9090:9090"
|
- "9090:9090"
|
||||||
container_name: minio
|
container_name: minio
|
||||||
volumes:
|
volumes:
|
||||||
- "${DATA_DIR}/components/mnt/data:/data"
|
- minio_data:/data
|
||||||
- "${DATA_DIR}/components/mnt/config:/root/.minio"
|
- minio_config:/root/.minio
|
||||||
environment:
|
environment:
|
||||||
MINIO_ROOT_USER: "${MINIO_ACCESS_KEY}"
|
MINIO_ROOT_USER: "${MINIO_ACCESS_KEY}"
|
||||||
MINIO_ROOT_PASSWORD: "${MINIO_SECRET_KEY}"
|
MINIO_ROOT_PASSWORD: "${MINIO_SECRET_KEY}"
|
||||||
restart: always
|
restart: always
|
||||||
command: minio server /data --console-address ':9090'
|
command: minio server /data --console-address ':9090'
|
||||||
|
networks:
|
||||||
|
server:
|
||||||
|
ipv4_address: ${MINIO_NETWORK_ADDRESS}
|
||||||
|
|
||||||
# openim-web:
|
openim-web:
|
||||||
# image: ghcr.io/openimsdk/openim-web:main
|
image: ghcr.io/openimsdk/openim-web:latest
|
||||||
# container_name: openim-web
|
container_name: openim-web
|
||||||
# environment:
|
environment:
|
||||||
# - OPENIM_WEB_DIST_PATH=${OPENIM_WEB_DIST_PATH}
|
- OPENIM_WEB_DIST_PATH=${OPENIM_WEB_DIST_PATH}
|
||||||
# - OPENIM_WEB_PPRT=${OPENIM_WEB_PPRT}
|
- OPENIM_WEB_PORT=${OPENIM_WEB_PORT}
|
||||||
# restart: always
|
restart: always
|
||||||
# ports:
|
ports:
|
||||||
# - "${OPENIM_WEB_PPRT}:11001"
|
- "${OPENIM_WEB_PORT}:11001"
|
||||||
|
networks:
|
||||||
|
server:
|
||||||
|
ipv4_address: ${OPENIM_WEB_NETWORK_ADDRESS}
|
||||||
|
|
||||||
openim-server:
|
openim-server:
|
||||||
# image: ghcr.io/openimsdk/openim-server:main
|
# image: ghcr.io/openimsdk/openim-server:main
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main
|
image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main
|
||||||
# image: openim/openim-server:main
|
# image: openim/openim-server:main
|
||||||
|
# build: .
|
||||||
container_name: openim-server
|
container_name: openim-server
|
||||||
|
ports:
|
||||||
|
- ${OPENIM_WS_PORT}:10001
|
||||||
|
- ${API_OPENIM_PORT}:10002
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "./scripts/check-all.sh"]
|
test: ["CMD", "/openim/openim-server/scripts/check-all.sh"]
|
||||||
interval: 30s
|
interval: 300s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 5
|
retries: 5
|
||||||
volumes:
|
volumes:
|
||||||
- ./logs:/openim/openim-server/logs
|
- openim_server_logs:/openim/openim-server/logs
|
||||||
- ./config:/openim/openim-server/config
|
- openim_server_output:/openim/openim-server/_output
|
||||||
- ./scripts:/openim/openim-server/scripts
|
- openim_server_config:/openim/openim-server/config
|
||||||
|
- openim_server_scripts:/openim/openim-server/scripts
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- zookeeper
|
|
||||||
- kafka
|
- kafka
|
||||||
- mysql
|
- mysql
|
||||||
- mongodb
|
- mongodb
|
||||||
- redis
|
- redis
|
||||||
- minio
|
- minio
|
||||||
network_mode: "host"
|
|
||||||
logging:
|
logging:
|
||||||
driver: json-file
|
driver: json-file
|
||||||
options:
|
options:
|
||||||
max-size: "1g"
|
max-size: "1g"
|
||||||
max-file: "2"
|
max-file: "2"
|
||||||
|
networks:
|
||||||
|
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:
|
prometheus:
|
||||||
image: prom/prometheus
|
image: prom/prometheus
|
||||||
volumes:
|
volumes:
|
||||||
- ./.docker-compose_cfg/prometheus-compose.yml:/etc/prometheus/prometheus.yml
|
- openim_server_prometheus_config:/etc/prometheus
|
||||||
container_name: prometheus
|
container_name: prometheus
|
||||||
# ports:
|
ports:
|
||||||
# - 9091:9091
|
- ${PROMETHEUS_PORT}:9091
|
||||||
depends_on:
|
command: --web.listen-address=:9091 --config.file="/etc/prometheus"
|
||||||
- openim-server
|
networks:
|
||||||
command: --web.listen-address=:9091 --config.file="/etc/prometheus/prometheus.yml"
|
server:
|
||||||
network_mode: "host"
|
ipv4_address: ${PROMETHEUS_NETWORK_ADDRESS}
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana
|
image: grafana/grafana
|
||||||
volumes:
|
volumes:
|
||||||
- ./.docker-compose_cfg/datasource-compose.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
|
- openim_server_grafana_datasource:/etc/grafana/provisioning/datasources
|
||||||
- ./.docker-compose_cfg/grafana.ini:/etc/grafana/grafana.ini
|
- openim_server_grafana_config:/etc/grafana
|
||||||
- ./.docker-compose_cfg/node-exporter-full_rev1.json:/var/lib/grafana/dashboards/node-exporter-full_rev1.json
|
- openim_server_grafana_dashboard:/var/lib/grafana/dashboards
|
||||||
container_name: grafana
|
container_name: grafana
|
||||||
depends_on:
|
ports:
|
||||||
- prometheus
|
- ${GRAFANA_PORT}:3000
|
||||||
network_mode: "host"
|
networks:
|
||||||
|
server:
|
||||||
|
ipv4_address: ${GRAFANA_NETWORK_ADDRESS}
|
||||||
|
|
||||||
# node-exporter:
|
# node-exporter:
|
||||||
# image: quay.io/prometheus/node-exporter
|
# image: quay.io/prometheus/node-exporter
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user