Files
open-im-server/docker-compose.yaml
T

133 lines
3.3 KiB
YAML
Raw Normal View History

2022-02-25 15:36:29 +08:00
version: "3"
2021-07-15 11:02:54 +08:00
#fixme Clone openIM Server project before using docker-compose,project addresshttps://github.com/OpenIMSDK/Open-IM-Server.git
2021-06-28 15:43:00 +08:00
services:
mysql:
image: mysql:5.7
ports:
2021-11-23 09:57:58 +08:00
- 13306:3306
- 23306:33060
2021-06-28 15:43:00 +08:00
container_name: mysql
volumes:
2021-09-11 21:00:18 +08:00
- ./components/mysql/data:/var/lib/mysql
2021-07-15 11:02:54 +08:00
- /etc/localtime:/etc/localtime
2021-06-28 15:43:00 +08:00
environment:
2021-07-15 12:33:24 +08:00
MYSQL_ROOT_PASSWORD: openIM
2021-06-28 15:43:00 +08:00
restart: always
mongodb:
image: mongo:4.0
2021-06-28 15:43:00 +08:00
ports:
2021-11-23 09:57:58 +08:00
- 37017:27017
2021-06-28 15:43:00 +08:00
container_name: mongo
volumes:
2021-11-29 16:43:22 +08:00
- ./components/mongodb/data/db:/data/db
- ./components/mongodb/data/logs:/data/logs
- ./components/mongodb/data/conf:/etc/mongo
2022-03-02 09:45:12 +08:00
environment:
- TZ=Asia/Shanghai
# cache
- wiredTigerCacheSizeGB=1
2021-11-29 16:43:22 +08:00
# environment:
# - MONGO_INITDB_ROOT_USERNAME=openIM
# - MONGO_INITDB_ROOT_PASSWORD=openIM
2021-11-23 09:57:58 +08:00
2021-11-23 09:57:58 +08:00
#TZ: Asia/Shanghai
2021-06-28 15:43:00 +08:00
restart: always
redis:
image: redis
ports:
2021-11-23 09:57:58 +08:00
- 16379:6379
2021-06-28 15:43:00 +08:00
container_name: redis
volumes:
2021-09-11 21:00:18 +08:00
- ./components/redis/data:/data
2021-09-11 23:33:26 +08:00
#redis config file
#- ./components/redis/config/redis.conf:/usr/local/redis/config/redis.conf
2021-07-15 11:02:54 +08:00
environment:
TZ: Asia/Shanghai
2021-06-28 15:43:00 +08:00
restart: always
2021-07-15 11:02:54 +08:00
sysctls:
net.core.somaxconn: 1024
2021-09-11 23:33:26 +08:00
command: redis-server --requirepass openIM --appendonly yes
2021-07-15 11:02:54 +08:00
2021-06-28 15:43:00 +08:00
zookeeper:
image: wurstmeister/zookeeper
ports:
- 2181:2181
container_name: zookeeper
volumes:
- /etc/localtime:/etc/localtime
2021-07-15 11:02:54 +08:00
environment:
TZ: Asia/Shanghai
2021-06-28 15:43:00 +08:00
restart: always
2022-05-13 10:06:56 +08:00
2021-06-28 15:43:00 +08:00
kafka:
image: wurstmeister/kafka
container_name: kafka
restart: always
environment:
2021-07-15 11:02:54 +08:00
TZ: Asia/Shanghai
KAFKA_BROKER_ID: 0
2021-09-11 23:01:13 +08:00
KAFKA_ZOOKEEPER_CONNECT: 127.0.0.1:2181
2021-07-15 11:02:54 +08:00
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
2021-09-13 15:27:59 +08:00
network_mode: "host"
2021-06-28 15:43:00 +08:00
depends_on:
- zookeeper
2022-07-15 16:53:19 +08:00
minio:
image: minio/minio
ports:
- 10005:9000
- 9090:9090
container_name: minio
volumes:
- /mnt/data:/data
- /mnt/config:/root/.minio
environment:
MINIO_ROOT_USER: user12345
MINIO_ROOT_PASSWORD: key12345
restart: always
command: minio server /data --console-address ':9090'
2021-06-28 15:43:00 +08:00
etcd:
2021-07-15 11:02:54 +08:00
image: quay.io/coreos/etcd
2021-06-28 15:43:00 +08:00
ports:
- 2379:2379
- 2380:2380
2021-07-15 11:02:54 +08:00
container_name: etcd
volumes:
2021-07-15 12:33:24 +08:00
- /etc/timezone:/etc/timezone
2021-07-15 11:02:54 +08:00
- /etc/localtime:/etc/localtime
environment:
ETCDCTL_API: 3
2021-06-28 15:43:00 +08:00
restart: always
2021-07-15 11:02:54 +08:00
command: /usr/local/bin/etcd --name etcd0 --data-dir /etcd-data --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379 --listen-peer-urls http://0.0.0.0:2380 --initial-advertise-peer-urls http://0.0.0.0:2380 --initial-cluster etcd0=http://0.0.0.0:2380 --initial-cluster-token tkn --initial-cluster-state new
2021-11-23 09:57:58 +08:00
open_im_server:
2022-07-15 15:21:42 +08:00
image: openim/open_im_server:v2.3.0-rc0
2021-11-23 09:57:58 +08:00
container_name: open_im_server
2021-06-28 15:43:00 +08:00
volumes:
2021-09-11 21:00:18 +08:00
- ./logs:/Open-IM-Server/logs
- ./config/config.yaml:/Open-IM-Server/config/config.yaml
2021-11-23 09:57:58 +08:00
- ./db/sdk:/Open-IM-Server/db/sdk
2021-11-24 10:19:12 +08:00
- ./script:/Open-IM-Server/script
2021-06-28 15:43:00 +08:00
restart: always
depends_on:
2021-07-15 11:02:54 +08:00
- kafka
2021-06-28 15:43:00 +08:00
- mysql
- mongodb
- redis
2021-09-11 21:00:18 +08:00
- etcd
2022-07-15 16:53:19 +08:00
- minio
2021-09-11 21:00:18 +08:00
network_mode: "host"
logging:
driver: json-file
options:
max-size: "1g"
max-file: "2"