|
|
@ -1,6 +1,5 @@
|
|
|
|
version: "3"
|
|
|
|
|
|
|
|
#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"
|
|
|
|
services:
|
|
|
|
services:
|
|
|
|
mysql:
|
|
|
|
mysql:
|
|
|
|
image: mysql:5.7
|
|
|
|
image: mysql:5.7
|
|
|
@ -9,10 +8,10 @@ services:
|
|
|
|
- 23306:33060
|
|
|
|
- 23306:33060
|
|
|
|
container_name: mysql
|
|
|
|
container_name: mysql
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- ./components/mysql/data:/var/lib/mysql
|
|
|
|
- ${DATA_DIR}/components/mysql/data:/var/lib/mysql
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
environment:
|
|
|
|
environment:
|
|
|
|
MYSQL_ROOT_PASSWORD: openIM
|
|
|
|
MYSQL_ROOT_PASSWORD: ${PASSWORD}
|
|
|
|
restart: always
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
|
|
|
|
mongodb:
|
|
|
|
mongodb:
|
|
|
@ -22,19 +21,17 @@ services:
|
|
|
|
container_name: mongo
|
|
|
|
container_name: mongo
|
|
|
|
command: --wiredTigerCacheSizeGB 1
|
|
|
|
command: --wiredTigerCacheSizeGB 1
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- ./components/mongodb/data/db:/data/db
|
|
|
|
- ${DATA_DIR}/components/mongodb/data/db:/data/db
|
|
|
|
- ./components/mongodb/data/logs:/data/logs
|
|
|
|
- ${DATA_DIR}/components/mongodb/data/logs:/data/logs
|
|
|
|
- ./components/mongodb/data/conf:/etc/mongo
|
|
|
|
- ${DATA_DIR}/components/mongodb/data/conf:/etc/mongo
|
|
|
|
# - ./script/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh
|
|
|
|
- ./script/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro
|
|
|
|
environment:
|
|
|
|
environment:
|
|
|
|
- TZ=Asia/Shanghai
|
|
|
|
- TZ=Asia/Shanghai
|
|
|
|
# cache
|
|
|
|
# cache
|
|
|
|
- wiredTigerCacheSizeGB=1
|
|
|
|
- wiredTigerCacheSizeGB=1
|
|
|
|
# - MONGO_USERNAME=openIM
|
|
|
|
- MONGO_INITDB_ROOT_USERNAME=${USER}
|
|
|
|
# - MONGO_PASSWORD=openIM
|
|
|
|
- MONGO_INITDB_ROOT_PASSWORD=${PASSWORD}
|
|
|
|
# - MONGO_INITDB_ROOT_USERNAME=root
|
|
|
|
- MONGO_INITDB_DATABASE=openIM
|
|
|
|
# - MONGO_INITDB_ROOT_PASSWORD=root
|
|
|
|
|
|
|
|
# - MONGO_INITDB_DATABASE=openIM
|
|
|
|
|
|
|
|
restart: always
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
|
|
|
|
redis:
|
|
|
|
redis:
|
|
|
@ -43,15 +40,15 @@ services:
|
|
|
|
- 16379:6379
|
|
|
|
- 16379:6379
|
|
|
|
container_name: redis
|
|
|
|
container_name: redis
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- ./components/redis/data:/data
|
|
|
|
- ${DATA_DIR}/components/redis/data:/data
|
|
|
|
#redis config file
|
|
|
|
#redis config file
|
|
|
|
- ./components/redis/config/redis.conf:/usr/local/redis/config/redis.conf
|
|
|
|
- ${DATA_DIR}/components/redis/config/redis.conf:/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 openIM --appendonly yes
|
|
|
|
command: redis-server --requirepass ${PASSWORD} --appendonly yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
zookeeper:
|
|
|
|
zookeeper:
|
|
|
@ -108,19 +105,19 @@ services:
|
|
|
|
- /mnt/data:/data
|
|
|
|
- /mnt/data:/data
|
|
|
|
- /mnt/config:/root/.minio
|
|
|
|
- /mnt/config:/root/.minio
|
|
|
|
environment:
|
|
|
|
environment:
|
|
|
|
MINIO_ROOT_USER: user12345
|
|
|
|
MINIO_ROOT_USER: ${USER}
|
|
|
|
MINIO_ROOT_PASSWORD: key12345
|
|
|
|
MINIO_ROOT_PASSWORD: ${PASSWORD}
|
|
|
|
restart: always
|
|
|
|
restart: always
|
|
|
|
command: minio server /data --console-address ':9090'
|
|
|
|
command: minio server /data --console-address ':9090'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
open_im_server:
|
|
|
|
open_im_server:
|
|
|
|
image: openim/open_im_server:v2.3.3
|
|
|
|
image: openim/open_im_server:v2.3.2
|
|
|
|
container_name: open_im_server
|
|
|
|
container_name: open_im_server
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- ./logs:/Open-IM-Server/logs
|
|
|
|
- ./logs:/Open-IM-Server/logs
|
|
|
|
- ./config/config.yaml:/Open-IM-Server/config/config.yaml
|
|
|
|
- ./config/config.yaml:/Open-IM-Server/config/config.yaml
|
|
|
|
- ./db/sdk:/Open-IM-Server/db/sdk
|
|
|
|
- ${DATA_DIR}/db/sdk:/Open-IM-Server/db/sdk
|
|
|
|
- ./script:/Open-IM-Server/script
|
|
|
|
- ./script:/Open-IM-Server/script
|
|
|
|
restart: always
|
|
|
|
restart: always
|
|
|
|
depends_on:
|
|
|
|
depends_on:
|
|
|
@ -140,8 +137,8 @@ services:
|
|
|
|
prometheus:
|
|
|
|
prometheus:
|
|
|
|
image: prom/prometheus
|
|
|
|
image: prom/prometheus
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- ./docker-compose_cfg/prometheus-compose.yml:/etc/prometheus/prometheus.yml
|
|
|
|
- ${DATA_DIR}/docker-compose_cfg/prometheus-compose.yml:/etc/prometheus/prometheus.yml
|
|
|
|
# - ./components/prometheus_data:/prometheus
|
|
|
|
# - ${DATA_DIR}/components/prometheus_data:/prometheus
|
|
|
|
container_name: prometheus
|
|
|
|
container_name: prometheus
|
|
|
|
ports:
|
|
|
|
ports:
|
|
|
|
- 9091:9091
|
|
|
|
- 9091:9091
|
|
|
@ -153,20 +150,17 @@ services:
|
|
|
|
grafana:
|
|
|
|
grafana:
|
|
|
|
image: grafana/grafana
|
|
|
|
image: grafana/grafana
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- ./docker-compose_cfg/datasource-compose.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
|
|
|
|
# - ./grafana/dashboards/dashboard.json:/var/lib/grafana/dashboards/dashboard.json
|
|
|
|
- ./docker-compose_cfg/grafana.ini:/etc/grafana/grafana.ini
|
|
|
|
# - ./grafana/provisioning/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
|
|
|
|
# - ./docker-compose_cfg/node-exporter-full_rev1.json:/var/lib/grafana/dashboards/node-exporter-full_rev1.json
|
|
|
|
- ${DATA_DIR}/docker-compose_cfg/datasource-compose.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
|
|
|
|
# - ./components/grafana:/var/lib/grafana
|
|
|
|
- ${DATA_DIR}/docker-compose_cfg/grafana.ini:/etc/grafana/grafana.ini
|
|
|
|
- ./docker-compose_cfg/grafana.db:/var/lib/grafana/grafana.db
|
|
|
|
- ${DATA_DIR}/docker-compose_cfg/node-exporter-full_rev1.json:/var/lib/grafana/dashboards/node-exporter-full_rev1.json
|
|
|
|
container_name: grafana
|
|
|
|
container_name: grafana
|
|
|
|
ports:
|
|
|
|
ports:
|
|
|
|
- 10007:10007
|
|
|
|
- 10007:10007
|
|
|
|
depends_on:
|
|
|
|
depends_on:
|
|
|
|
- prometheus
|
|
|
|
- prometheus
|
|
|
|
network_mode: "host"
|
|
|
|
network_mode: "host"
|
|
|
|
privileged: true
|
|
|
|
|
|
|
|
user: root
|
|
|
|
|
|
|
|
# -rw-r-----
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node-exporter:
|
|
|
|
node-exporter:
|
|
|
|
image: quay.io/prometheus/node-exporter
|
|
|
|
image: quay.io/prometheus/node-exporter
|
|
|
|