mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-05 20:11:14 +08:00
test: version quest
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
parent
378221f903
commit
51ab6a6156
@ -1,39 +0,0 @@
|
||||
FROM golang as build
|
||||
|
||||
# go mod Installation source, container environment variable addition will override the default variable value
|
||||
ENV GO111MODULE=on
|
||||
ENV GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
# Set up the working directory
|
||||
WORKDIR /Open-IM-Server
|
||||
# add all files to the container
|
||||
COPY . .
|
||||
|
||||
WORKDIR /Open-IM-Server/scripts
|
||||
RUN chmod +x *.sh
|
||||
|
||||
RUN /bin/sh -c ./build_all_service.sh
|
||||
|
||||
#Blank image Multi-Stage Build
|
||||
FROM ubuntu
|
||||
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install apt-transport-https && apt-get install procps\
|
||||
&&apt-get install net-tools
|
||||
#Non-interactive operation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get install -y vim curl tzdata gawk
|
||||
#Time zone adjusted to East eighth District
|
||||
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
|
||||
|
||||
|
||||
#set directory to map logs,config file,scripts file.
|
||||
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/scripts","/Open-IM-Server/db/sdk"]
|
||||
|
||||
#Copy scripts files and binary files to the blank image
|
||||
COPY --from=build /Open-IM-Server/scripts /Open-IM-Server/scripts
|
||||
COPY --from=build /Open-IM-Server/bin /Open-IM-Server/bin
|
||||
|
||||
WORKDIR /Open-IM-Server/scripts
|
||||
|
||||
CMD ["./docker_start_all.sh"]
|
@ -1,173 +0,0 @@
|
||||
#fixme Clone openIM Server project before using docker-compose,project address:https://github.com/OpenIMSDK/Open-IM-Server.git
|
||||
version: "3"
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
ports:
|
||||
- 13306:3306
|
||||
- 23306:33060
|
||||
container_name: mysql
|
||||
volumes:
|
||||
- ${DATA_DIR}/components/mysql/data:/var/lib/mysql
|
||||
- /etc/localtime:/etc/localtime
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${PASSWORD}
|
||||
restart: always
|
||||
|
||||
mongodb:
|
||||
image: mongo:6.0
|
||||
ports:
|
||||
- 37017: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
|
||||
# cache
|
||||
- wiredTigerCacheSizeGB=1
|
||||
- MONGO_INITDB_ROOT_USERNAME=${USER}
|
||||
- MONGO_INITDB_ROOT_PASSWORD=${PASSWORD}
|
||||
- MONGO_INITDB_DATABASE=openIM
|
||||
- MONGO_USERNAME=${USER}
|
||||
- MONGO_PASSWORD=${PASSWORD}
|
||||
restart: always
|
||||
|
||||
redis:
|
||||
image: redis:6.2.5
|
||||
ports:
|
||||
- 16379:6379
|
||||
container_name: redis
|
||||
volumes:
|
||||
- ${DATA_DIR}/components/redis/data:/data
|
||||
#redis config file
|
||||
- ${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 ${PASSWORD} --appendonly yes
|
||||
|
||||
zookeeper:
|
||||
image: zookeeper
|
||||
ports:
|
||||
- 2181:2181
|
||||
container_name: zookeeper
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
restart: always
|
||||
|
||||
kafka:
|
||||
image: wurstmeister/kafka
|
||||
container_name: kafka
|
||||
restart: always
|
||||
ports:
|
||||
- 9092:9092
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
KAFKA_BROKER_ID: 0
|
||||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
||||
KAFKA_CREATE_TOPICS: "latestMsgToRedis:8:1,msgToPush:8:1,offlineMsgToMongoMysql:8:1"
|
||||
KAFKA_ADVERTISED_LISTENERS: INSIDE://127.0.0.1:9092,OUTSIDE://103.116.45.174:9092
|
||||
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9093
|
||||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT"
|
||||
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
|
||||
depends_on:
|
||||
- zookeeper
|
||||
|
||||
minio:
|
||||
image: minio/minio
|
||||
ports:
|
||||
- 10005:9000
|
||||
- 9090:9090
|
||||
container_name: minio
|
||||
volumes:
|
||||
- /mnt/data:/data
|
||||
- /mnt/config:/root/.minio
|
||||
environment:
|
||||
MINIO_ROOT_USER: ${USER}
|
||||
MINIO_ROOT_PASSWORD: ${PASSWORD}
|
||||
restart: always
|
||||
command: minio server /data --console-address ':9090'
|
||||
|
||||
|
||||
open_im_server:
|
||||
image: openim/open_im_server:v3.0.0
|
||||
container_name: open_im_server
|
||||
volumes:
|
||||
- ./logs:/Open-IM-Server/logs
|
||||
- ./config/config.yaml:/Open-IM-Server/config/config.yaml
|
||||
- ./config/notification.yaml:/Open-IM-Server/config/notification.yaml
|
||||
- ${DATA_DIR}/db/sdk:/Open-IM-Server/db/sdk
|
||||
- ./scripts:/Open-IM-Server/scripts
|
||||
restart: always
|
||||
depends_on:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- minio
|
||||
network_mode: "host"
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "1g"
|
||||
max-file: "2"
|
||||
|
||||
openim_chat:
|
||||
image: openim/openim_chat:v1.0
|
||||
container_name: openim_chat
|
||||
volumes:
|
||||
- ./logs:/openim-chat/logs
|
||||
- ./openim-chat/config/config.yaml:/openim-chat/config/config.yaml
|
||||
restart: always
|
||||
depends_on:
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- minio
|
||||
- open_im_server
|
||||
network_mode: "host"
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "1g"
|
||||
max-file: "2"
|
||||
environment:
|
||||
CONFIG_NAME: "/openim-chat"
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
volumes:
|
||||
- ./.docker-compose_cfg/prometheus-compose.yml:/etc/prometheus/prometheus.yml
|
||||
container_name: prometheus
|
||||
# ports:
|
||||
# - 9091:9091
|
||||
depends_on:
|
||||
- open_im_server
|
||||
command: --web.listen-address=:9091 --config.file="/etc/prometheus/prometheus.yml"
|
||||
network_mode: "host"
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana
|
||||
volumes:
|
||||
- ./.docker-compose_cfg/datasource-compose.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
|
||||
- ./.docker-compose_cfg/grafana.ini:/etc/grafana/grafana.ini
|
||||
- ./.docker-compose_cfg/node-exporter-full_rev1.json:/var/lib/grafana/dashboards/node-exporter-full_rev1.json
|
||||
container_name: grafana
|
||||
depends_on:
|
||||
- prometheus
|
||||
network_mode: "host"
|
||||
|
||||
# node-exporter:
|
||||
# image: quay.io/prometheus/node-exporter
|
||||
# container_name: node-exporter
|
||||
# restart: always
|
||||
# ports:
|
||||
# - "9100:9100"
|
@ -100,7 +100,7 @@ services:
|
||||
|
||||
|
||||
open_im_server:
|
||||
image: openim/open_im_server:v3.0.0
|
||||
image: openim/open_im_server:v3.0.1
|
||||
container_name: open_im_server
|
||||
volumes:
|
||||
- ./logs:/Open-IM-Server/logs
|
||||
@ -123,7 +123,7 @@ services:
|
||||
max-file: "2"
|
||||
|
||||
openim_chat:
|
||||
image: openim/openim_chat:v1.0
|
||||
image: openim/openim_chat:v1.1
|
||||
container_name: openim_chat
|
||||
volumes:
|
||||
- ./logs:/openim-chat/logs
|
||||
|
Loading…
x
Reference in New Issue
Block a user