|
|
@ -3,38 +3,37 @@ version: "3"
|
|
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
services:
|
|
|
|
mysql:
|
|
|
|
mysql:
|
|
|
|
image: mysql:5.7
|
|
|
|
image: mysql:${MYSQL_VERSION}
|
|
|
|
ports:
|
|
|
|
ports:
|
|
|
|
- 13306:3306
|
|
|
|
- ${MYSQL_3306_PORT}:3306
|
|
|
|
- 23306:33060
|
|
|
|
|
|
|
|
container_name: mysql
|
|
|
|
container_name: mysql
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- ./components/mysql/data:/var/lib/mysql
|
|
|
|
- ./components/mysql/data:/var/lib/mysql
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
environment:
|
|
|
|
environment:
|
|
|
|
MYSQL_ROOT_PASSWORD: openIM
|
|
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_PWD}
|
|
|
|
restart: always
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
|
|
|
|
mongodb:
|
|
|
|
mongodb:
|
|
|
|
image: mongo:4.0
|
|
|
|
image: mongo:${MONGO_VERSION}
|
|
|
|
ports:
|
|
|
|
ports:
|
|
|
|
- 37017:27017
|
|
|
|
- ${MONGO_PORT}:27017
|
|
|
|
container_name: mongo
|
|
|
|
container_name: mongo
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- ./components/mongodb/data/db:/data/db
|
|
|
|
- ./components/mongodb/data/db:/data/db
|
|
|
|
- ./components/mongodb/data/logs:/data/logs
|
|
|
|
- ./components/mongodb/data/logs:/data/logs
|
|
|
|
- ./components/mongodb/data/conf:/etc/mongo
|
|
|
|
- ./components/mongodb/data/conf:/etc/mongo
|
|
|
|
environment:
|
|
|
|
environment:
|
|
|
|
- MONGO_INITDB_ROOT_USERNAME=openIM
|
|
|
|
- MONGO_INITDB_ROOT_USERNAME=${MONGO_ROOT_USERNAME}
|
|
|
|
- MONGO_INITDB_ROOT_PASSWORD=openIM
|
|
|
|
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PWD}
|
|
|
|
|
|
|
|
|
|
|
|
#TZ: Asia/Shanghai
|
|
|
|
#TZ: Asia/Shanghai
|
|
|
|
restart: always
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
|
|
|
|
redis:
|
|
|
|
redis:
|
|
|
|
image: redis
|
|
|
|
image: redis:${REDIS_VERSION}
|
|
|
|
ports:
|
|
|
|
ports:
|
|
|
|
- 16379:6379
|
|
|
|
- ${REDIS_PORT}:6379
|
|
|
|
container_name: redis
|
|
|
|
container_name: redis
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- ./components/redis/data:/data
|
|
|
|
- ./components/redis/data:/data
|
|
|
@ -51,7 +50,7 @@ services:
|
|
|
|
zookeeper:
|
|
|
|
zookeeper:
|
|
|
|
image: wurstmeister/zookeeper
|
|
|
|
image: wurstmeister/zookeeper
|
|
|
|
ports:
|
|
|
|
ports:
|
|
|
|
- 2181:2181
|
|
|
|
- ${ZOOKEEPER_PORT}:2181
|
|
|
|
container_name: zookeeper
|
|
|
|
container_name: zookeeper
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
@ -67,18 +66,17 @@ services:
|
|
|
|
environment:
|
|
|
|
environment:
|
|
|
|
TZ: Asia/Shanghai
|
|
|
|
TZ: Asia/Shanghai
|
|
|
|
KAFKA_BROKER_ID: 0
|
|
|
|
KAFKA_BROKER_ID: 0
|
|
|
|
KAFKA_ZOOKEEPER_CONNECT: 127.0.0.1:2181
|
|
|
|
KAFKA_ZOOKEEPER_CONNECT: ${KAFKA_ZOOKEEPER_CONNECT}
|
|
|
|
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092
|
|
|
|
KAFKA_ADVERTISED_LISTENERS: ${KAFKA_ADVERTISED_LISTENERS}
|
|
|
|
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
|
|
|
|
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
|
|
|
|
network_mode: "host"
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
depends_on:
|
|
|
|
- zookeeper
|
|
|
|
- zookeeper
|
|
|
|
|
|
|
|
|
|
|
|
etcd:
|
|
|
|
etcd:
|
|
|
|
image: quay.io/coreos/etcd
|
|
|
|
image: quay.io/coreos/etcd
|
|
|
|
ports:
|
|
|
|
ports:
|
|
|
|
- 2379:2379
|
|
|
|
- ${ETCD_2379_PORT}:2379
|
|
|
|
- 2380:2380
|
|
|
|
- ${ETCD_2380_PORT}:2380
|
|
|
|
container_name: etcd
|
|
|
|
container_name: etcd
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- /etc/timezone:/etc/timezone
|
|
|
|
- /etc/timezone:/etc/timezone
|
|
|
@ -89,8 +87,11 @@ services:
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
open_im_server:
|
|
|
|
open_im_server:
|
|
|
|
image: openim/open_im_server
|
|
|
|
image: openim/open_im_server:${OPEN_IM_SERVER_VERSION}
|
|
|
|
container_name: open_im_server
|
|
|
|
container_name: open_im_server
|
|
|
|
|
|
|
|
ports:
|
|
|
|
|
|
|
|
- ${OPEN_IM_API_PORT}:10000
|
|
|
|
|
|
|
|
- ${OPEN_IM_SDK_WS_PORT}:30000
|
|
|
|
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
|
|
|
@ -104,7 +105,6 @@ services:
|
|
|
|
- mongodb
|
|
|
|
- mongodb
|
|
|
|
- redis
|
|
|
|
- redis
|
|
|
|
- etcd
|
|
|
|
- etcd
|
|
|
|
network_mode: "host"
|
|
|
|
|
|
|
|
logging:
|
|
|
|
logging:
|
|
|
|
driver: json-file
|
|
|
|
driver: json-file
|
|
|
|
options:
|
|
|
|
options:
|
|
|
|