mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-05 20:11:14 +08:00
* Code adaptation k8s: service discovery and registration adaptation, configuration adaptation * Initial submission of the help charts script for openim API * change the help charts script * change the help charts script * change helm chart codes * change dockerfiles script * change chart script:add configmap mounts * change chart script:change repository * change chart script:msggateway add one service * change config.yaml * roll back some config values * change chart script:change Ingress rule with a rewrite annotation * add mysql charts scrible * change chart script:add mysql.config.yaml * add nfs provisioner charts * change chart script:add nfs.config.yaml * add ingress-nginx charts * change chart script:add ingress-nginx.config.yaml * add redis &mongodb charts * add kafka&minio charts * change chart script:change redis.values.yaml * change chart script:add redis.config.yaml * change chart script:change redis.config.yaml * change chart script:change mongodb.value.yaml * change chart script:change mongodb.value.yaml * change chart script:add mongodb.config.yaml * change chart script:change minio.values.yaml * change chart script:add minio.config.yaml * change chart script:change kafka.values.yaml * change chart script:add kafka.config.yaml * change chart script:change services.config.yaml * bug fix:Delete websocket's Port restrictions * bug fix:change port value * change chart script:Submit a stable version script * fix bug:Implement option interface * fix bug:change K8sDR.Register * change config.yaml * change chats script:minio service add ingress * change chats script:minio service add ingress * change chats script:kafka.replicaCount=3& change minio.api ingress * delete change chats script * change config.yaml * change openim.yaml * merge go.sum * Add monitoring function and struct for Prometheus on gin and GRPC * Add GRPC and gin server monitoring logic * Add GRPC and gin server monitoring logic2 * Add GRPC and gin server monitoring logic3 * Add GRPC and gin server monitoring logic4 * Add GRPC and gin server monitoring logic5 * Add GRPC and gin server monitoring logic6 * Add GRPC and gin server monitoring logic7 * delete:old monitoring code * add for test * fix bug:change packname * fix bug:delete getPromPort funciton * fix bug:delete getPromPort funciton * fix bug:change logs * fix bug:change registerName logic in GetGrpcCusMetrics function * add getPrometheus url api * fix:config path logic * fix:prometheus enable function * fix:prometheus enable function * fix:transfer Multi process monitoring logic * del:del not using manifest * fix:openim-msgtransfer.sh * fix:openim-msgtransfer.sh * cicd: robot automated Change * delete not using files * add prometheus docker-compose for monitor * fix prometheus.yaml * fix environment.sh * fix init-config.sh * fix init-config.sh * fix env_template.yaml * fix docker-compose.yml * fix docker-compose.yml * add openim_admin_front service * change openim-admin-front * del not using files * add node-exporter-dashaboard.yaml * cicd: robot automated Change * cicd: robot automated Change * feature: add alertmanager function * feature: add alertmanager function * feature: add alertmanager function * feature: add alertmanager function * feature: add alertmanager function * del:delete not using files * del:delete not using files * change:change to personal email info * fix:alertmanager.yml * fix:fix docker-compose.yml * del:not using files --------- Co-authored-by: lin.huang <lin.huang@apulis.com> Co-authored-by: Xinwei Xiong <3293172751@qq.com> Co-authored-by: xuexihuang <xuexihuang@users.noreply.github.com> Co-authored-by: cubxxw <cubxxw@users.noreply.github.com>
210 lines
6.0 KiB
YAML
210 lines
6.0 KiB
YAML
#fixme Clone openIM Server project before using docker-compose,project address:https://github.com/OpenIMSDK/Open-IM-Server.git
|
||
version: '3'
|
||
|
||
networks:
|
||
server:
|
||
driver: bridge
|
||
ipam:
|
||
driver: default
|
||
config:
|
||
- subnet: '${DOCKER_BRIDGE_SUBNET}'
|
||
gateway: '${DOCKER_BRIDGE_GATEWAY}'
|
||
|
||
services:
|
||
mysql:
|
||
image: mysql:5.7
|
||
ports:
|
||
- "${MYSQL_PORT}:3306"
|
||
container_name: mysql
|
||
volumes:
|
||
- "${DATA_DIR}/components/mysql/data:/var/lib/mysql"
|
||
- "/etc/localtime:/etc/localtime"
|
||
environment:
|
||
MYSQL_ROOT_PASSWORD: "${MYSQL_PASSWORD}"
|
||
restart: always
|
||
networks:
|
||
server:
|
||
ipv4_address: ${MYSQL_NETWORK_ADDRESS}
|
||
|
||
mongodb:
|
||
image: mongo:6.0.2
|
||
ports:
|
||
- "${MONGO_PORT}:27017"
|
||
container_name: mongo
|
||
command: --wiredTigerCacheSizeGB 1 --auth
|
||
volumes:
|
||
- "${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
|
||
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USERNAME}
|
||
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD}
|
||
- MONGO_INITDB_DATABASE=${MONGO_DATABASE}
|
||
restart: always
|
||
networks:
|
||
server:
|
||
ipv4_address: ${MONGO_NETWORK_ADDRESS}
|
||
|
||
redis:
|
||
image: redis:7.0.0
|
||
container_name: redis
|
||
ports:
|
||
- "${REDIS_PORT}:6379"
|
||
volumes:
|
||
- "${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
|
||
sysctls:
|
||
net.core.somaxconn: 1024
|
||
command: redis-server --requirepass ${REDIS_PASSWORD} --appendonly yes
|
||
networks:
|
||
server:
|
||
ipv4_address: ${REDIS_NETWORK_ADDRESS}
|
||
|
||
zookeeper:
|
||
image: bitnami/zookeeper:3.8
|
||
container_name: zookeeper
|
||
ports:
|
||
- "${ZOOKEEPER_PORT}:2181"
|
||
volumes:
|
||
- "/etc/localtime:/etc/localtime"
|
||
environment:
|
||
- ALLOW_ANONYMOUS_LOGIN=yes
|
||
- TZ="Asia/Shanghai"
|
||
restart: always
|
||
networks:
|
||
server:
|
||
ipv4_address: ${ZOOKEEPER_NETWORK_ADDRESS}
|
||
|
||
kafka:
|
||
image: 'bitnami/kafka:3.5.1'
|
||
container_name: kafka
|
||
user: root
|
||
restart: always
|
||
ports:
|
||
- "${KAFKA_PORT}:9094"
|
||
volumes:
|
||
- ./scripts/create-topic.sh:/opt/bitnami/kafka/create-topic.sh
|
||
- ${DATA_DIR}/components/kafka:/bitnami/kafka
|
||
command: >
|
||
bash -c "
|
||
/opt/bitnami/scripts/kafka/run.sh & sleep 5; /opt/bitnami/kafka/create-topic.sh; wait
|
||
"
|
||
environment:
|
||
- TZ=Asia/Shanghai
|
||
- KAFKA_CFG_NODE_ID=0
|
||
- KAFKA_CFG_PROCESS_ROLES=controller,broker
|
||
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@<your_host>:9093
|
||
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
|
||
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://${DOCKER_BRIDGE_GATEWAY}:${KAFKA_PORT}
|
||
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
|
||
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
|
||
networks:
|
||
server:
|
||
ipv4_address: ${KAFKA_NETWORK_ADDRESS}
|
||
|
||
minio:
|
||
image: minio/minio
|
||
ports:
|
||
- "${MINIO_PORT}:9000"
|
||
- "9090:9090"
|
||
container_name: minio
|
||
volumes:
|
||
- "${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}"
|
||
restart: always
|
||
command: minio server /data --console-address ':9090'
|
||
networks:
|
||
server:
|
||
ipv4_address: ${MINIO_NETWORK_ADDRESS}
|
||
|
||
openim-web:
|
||
# image: ghcr.io/openimsdk/openim-web:latest
|
||
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web:latest
|
||
# image: openim/openim-web:latest
|
||
image: ${IMAGE_REGISTRY}/openim-web:latest
|
||
container_name: openim-web
|
||
environment:
|
||
- OPENIM_WEB_DIST_PATH=${OPENIM_WEB_DIST_PATH}
|
||
- OPENIM_WEB_PORT=${OPENIM_WEB_PORT}
|
||
restart: always
|
||
ports:
|
||
- "${OPENIM_WEB_PORT}:11001"
|
||
networks:
|
||
server:
|
||
ipv4_address: ${OPENIM_WEB_NETWORK_ADDRESS}
|
||
|
||
openim-admin:
|
||
image: ${IMAGE_REGISTRY}/openim-admin-front:v3.4.0
|
||
# image: ghcr.io/openimsdk/openim-admin-front:v3.4.0
|
||
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-admin-front:v3.4.0
|
||
# image: openim/openim-admin-front:v3.4.0
|
||
container_name: openim-admin
|
||
restart: always
|
||
ports:
|
||
- "${OPENIM_ADMIN_FRONT_PORT}:80"
|
||
networks:
|
||
server:
|
||
ipv4_address: ${OPENIM_ADMIN_FRONT_NETWORK_ADDRESS}
|
||
|
||
prometheus:
|
||
image: prom/prometheus
|
||
container_name: prometheus
|
||
hostname: prometheus
|
||
restart: always
|
||
volumes:
|
||
- ./config/prometheus.yml:/etc/prometheus/prometheus.yml
|
||
- ./config/instance-down-rules.yml:/etc/prometheus/instance-down-rules.yml
|
||
ports:
|
||
- "${PROMETHEUS_PORT}:9090"
|
||
networks:
|
||
server:
|
||
ipv4_address: ${PROMETHEUS_NETWORK_ADDRESS}
|
||
|
||
alertmanager:
|
||
image: prom/alertmanager
|
||
container_name: alertmanager
|
||
hostname: alertmanager
|
||
restart: always
|
||
volumes:
|
||
- ./config/alertmanager.yml:/etc/alertmanager/alertmanager.yml
|
||
- ./config/email.tmpl:/etc/alertmanager/email.tmpl
|
||
ports:
|
||
- "${ALERT_MANAGER_PORT}:9093"
|
||
networks:
|
||
server:
|
||
ipv4_address: ${ALERT_MANAGER_NETWORK_ADDRESS}
|
||
|
||
grafana:
|
||
image: grafana/grafana
|
||
container_name: grafana
|
||
hostname: grafana
|
||
user: root
|
||
restart: always
|
||
ports:
|
||
- "${GRAFANA_PORT}:3000"
|
||
volumes:
|
||
- ${DATA_DIR}/components/grafana:/var/lib/grafana
|
||
networks:
|
||
server:
|
||
ipv4_address: ${GRAFANA_NETWORK_ADDRESS}
|
||
|
||
node-exporter:
|
||
image: quay.io/prometheus/node-exporter
|
||
container_name: node-exporter
|
||
hostname: node-exporter
|
||
restart: always
|
||
ports:
|
||
- "${NODE_EXPORTER_PORT}:9100"
|
||
networks:
|
||
server:
|
||
ipv4_address: ${NODE_EXPORTER_NETWORK_ADDRESS}
|