mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 11:52:10 +08:00
175 lines
4.8 KiB
YAML
175 lines
4.8 KiB
YAML
version: '3'
|
|
|
|
networks:
|
|
openim:
|
|
driver: bridge
|
|
|
|
services:
|
|
mongodb:
|
|
image: "${MONGO_IMAGE}"
|
|
ports:
|
|
- "37017:27017"
|
|
container_name: mongo
|
|
command: ["/bin/bash", "-c", "/docker-entrypoint-initdb.d/mongo-init.sh; docker-entrypoint.sh mongod --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=root
|
|
- MONGO_INITDB_ROOT_PASSWORD=openIM123
|
|
- MONGO_INITDB_DATABASE=openim_v3
|
|
- MONGO_OPENIM_USERNAME=openIM
|
|
- MONGO_OPENIM_PASSWORD=openIM123
|
|
restart: always
|
|
networks:
|
|
- openim
|
|
|
|
redis:
|
|
image: "${REDIS_IMAGE}"
|
|
container_name: redis
|
|
ports:
|
|
- "16379: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 /usr/local/redis/config/redis.conf --requirepass openIM123 --appendonly yes
|
|
networks:
|
|
- openim
|
|
|
|
zookeeper:
|
|
image: "${ZOOKEEPER_IMAGE}"
|
|
container_name: zookeeper
|
|
ports:
|
|
- "12181:2181"
|
|
environment:
|
|
TZ: "Asia/Shanghai"
|
|
ALLOW_ANONYMOUS_LOGIN: "yes"
|
|
restart: always
|
|
networks:
|
|
- openim
|
|
|
|
kafka:
|
|
image: "${KAFKA_IMAGE}"
|
|
container_name: kafka
|
|
restart: always
|
|
user: root
|
|
ports:
|
|
- "19094: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 & /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@kafka:9093
|
|
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
|
|
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,EXTERNAL://localhost:19094
|
|
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
|
|
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
|
|
networks:
|
|
- openim
|
|
|
|
|
|
minio:
|
|
image: "${MINIO_IMAGE}"
|
|
ports:
|
|
- "10005:9000"
|
|
- "19090:9090"
|
|
container_name: minio
|
|
volumes:
|
|
- "${DATA_DIR}/components/mnt/data:/data"
|
|
- "${DATA_DIR}/components/mnt/config:/root/.minio"
|
|
environment:
|
|
TZ: Asia/Shanghai
|
|
MINIO_ROOT_USER: root
|
|
MINIO_ROOT_PASSWORD: openIM123
|
|
restart: always
|
|
command: minio server /data --console-address ':9090'
|
|
networks:
|
|
- openim
|
|
|
|
openim-web:
|
|
image: ${OPENIM_WEB_IMAGE}
|
|
container_name: openim-web
|
|
restart: always
|
|
ports:
|
|
- "11001:80"
|
|
networks:
|
|
- openim
|
|
|
|
openim-admin:
|
|
image: ${OPENIM_ADMIN_FRONT_IMAGE}
|
|
container_name: openim-admin
|
|
restart: always
|
|
ports:
|
|
- "11002:80"
|
|
networks:
|
|
- openim
|
|
|
|
|
|
|
|
# prometheus:
|
|
# image: prom/prometheus
|
|
# container_name: prometheus
|
|
# hostname: prometheus
|
|
# restart: always
|
|
# volumes:
|
|
# - "${DATA_DIR:-./}/config/instance-down-rules.yml:/etc/prometheus/instance-down-rules.yml"
|
|
# - "${DATA_DIR:-./}/config/prometheus.yml:/etc/prometheus/prometheus.yml"
|
|
# ports:
|
|
# - "${PROMETHEUS_PORT:-19090}:9090"
|
|
# networks:
|
|
# server:
|
|
# ipv4_address: ${PROMETHEUS_NETWORK_ADDRESS:-172.28.0.10}
|
|
|
|
# alertmanager:
|
|
# image: prom/alertmanager
|
|
# container_name: alertmanager
|
|
# hostname: alertmanager
|
|
# restart: always
|
|
# volumes:
|
|
# - ${DATA_DIR:-./}/config/alertmanager.yml:/etc/alertmanager/alertmanager.yml
|
|
# - ${DATA_DIR:-./}/config/email.tmpl:/etc/alertmanager/email.tmpl
|
|
# ports:
|
|
# - "${ALERT_MANAGER_PORT:-19093}:9093"
|
|
# networks:
|
|
# server:
|
|
# ipv4_address: ${ALERT_MANAGER_NETWORK_ADDRESS:-172.28.0.14}
|
|
|
|
# grafana:
|
|
# image: grafana/grafana
|
|
# container_name: grafana
|
|
# hostname: grafana
|
|
# user: root
|
|
# restart: always
|
|
# ports:
|
|
# - "${GRAFANA_PORT:-13000}:3000"
|
|
# volumes:
|
|
# - "${DATA_DIR:-./}/components/grafana:/var/lib/grafana"
|
|
# networks:
|
|
# server:
|
|
# ipv4_address: ${GRAFANA_NETWORK_ADDRESS:-172.28.0.11}
|
|
|
|
# node-exporter:
|
|
# image: quay.io/prometheus/node-exporter
|
|
# container_name: node-exporter
|
|
# hostname: node-exporter
|
|
# restart: always
|
|
# ports:
|
|
# - "${NODE_EXPORTER_PORT:-19100}:9100"
|
|
# networks:
|
|
# server:
|
|
# ipv4_address: ${NODE_EXPORTER_NETWORK_ADDRESS:-172.28.0.12}
|