Skip to content

Commit

Permalink
fix: update slack link
Browse files Browse the repository at this point in the history
Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>
  • Loading branch information
cubxxw committed Sep 3, 2023
1 parent fda2958 commit 7b07257
Show file tree
Hide file tree
Showing 5 changed files with 257 additions and 156 deletions.
78 changes: 62 additions & 16 deletions .env
Original file line number Diff line number Diff line change
@@ -1,19 +1,65 @@
# Copyright © 2023 OpenIM. All rights reserved.
# The following is automatically generated
# Use `make init` OR `./scripts/init-config.sh`
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

USER=root
PASSWORD=openIM123
# ================= Basic Configuration ===================
# Endpoint for the MinIO object storage service
MINIO_ENDPOINT=http://127.0.0.1:10005

# Base URL for the application programming interface (API)
API_URL=http://127.0.0.1:10002
DATA_DIR=./

# Directory path for storing data files or related information
DATA_DIR=./


# ============ Component Extension Configuration ==========
# Address or hostname for the ZooKeeper service (often used in distributed systems for maintaining configuration information)
ZOOKEEPER_ADDRESS=127.0.0.1

# Port on which MySQL database service is running
MYSQL_PORT=13306

# Password to authenticate with the MySQL database service
MYSQL_PASSWORD=openIM123

# Port on which MongoDB service is running
MONGO_PORT=37017

# Username to authenticate with the MongoDB service
MONGO_USERNAME=root

# Password to authenticate with the MongoDB service
MONGO_PASSWORD=openIM123

# Name of the database in MongoDB to be used
MONGO_DATABASE=openIM_v3

# Port on which Redis in-memory data structure store is running
REDIS_PORT=16379

# Password to authenticate with the Redis service
REDIS_PASSWORD=openIM123

# Port on which Kafka distributed streaming platform is running
KAFKA_PORT=9092

# Address or hostname for the Kafka service
KAFKA_ADDR=127.0.0.1

# Topic in Kafka for storing the latest messages in Redis
KAFKA_LATESTMSG_REDIS_TOPIC=latestMsgToRedis

# Topic in Kafka for pushing messages (e.g. notifications or updates)
KAFKA_MSG_PUSH_TOPIC=msgToPush

# Topic in Kafka for storing offline messages in MongoDB
KAFKA_OFFLINEMSG_MONGO_TOPIC=offlineMsgToMongoMysql

# Port on which MinIO object storage service is running
MINIO_PORT=10005

# Access key to authenticate with the MinIO service
MINIO_ACCESS_KEY=root

# Secret key corresponding to the access key for MinIO authentication
MINIO_SECRET_KEY=openIM123
18 changes: 13 additions & 5 deletions build/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ builds:
- "6"
- "7"

# TODO:Need a script, such as the init - release to help binary to find the right directory
# ,which can be compiled binary
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
Expand All @@ -375,18 +377,24 @@ archives:
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
files:
- LICENSE
- README.md
- README-zh_CN.md
- CODE_OF_CONDUCT.md
- CHANGELOG/*
- deployment/*
- config/*
- build/*
- scripts/*
- Makefile
- CONTRIBUTING.md
- install.sh
- docs/*
- src: "*.md"
dst: docs

# Set this to true if you want all files in the archive to be in a single directory.
# If set to true and you extract the archive 'goreleaser_Linux_arm64.tar.gz',
# you'll get a folder 'goreleaser_Linux_arm64'.
# If set to false, all files are extracted separately.
# You can also set it to a custom folder name (templating is supported).
wrap_in_directory: true

# Strip parent folders when adding files to the archive.
strip_parent: true

Expand Down
79 changes: 64 additions & 15 deletions deployments/templates/env_template.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,68 @@
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# ================= Basic Configuration ===================
# User for authentication or system operations
USER=${USER}

# Password associated with the specified user for authentication
PASSWORD=${PASSWORD}

# Endpoint for the MinIO object storage service
MINIO_ENDPOINT=${MINIO_ENDPOINT}

# Base URL for the application programming interface (API)
API_URL=${API_URL}
DATA_DIR=${DATA_DIR}

# Directory path for storing data files or related information
DATA_DIR=${DATA_DIR}


# ============ Component Extension Configuration ==========
# Address or hostname for the ZooKeeper service (often used in distributed systems for maintaining configuration information)
ZOOKEEPER_ADDRESS=${ZOOKEEPER_ADDRESS}

# Port on which MySQL database service is running
MYSQL_PORT=${MYSQL_PORT}

# Password to authenticate with the MySQL database service
MYSQL_PASSWORD=${MYSQL_PASSWORD}

# Port on which MongoDB service is running
MONGO_PORT=${MONGO_PORT}

# Username to authenticate with the MongoDB service
MONGO_USERNAME=${MONGO_USERNAME}

# Password to authenticate with the MongoDB service
MONGO_PASSWORD=${MONGO_PASSWORD}

# Name of the database in MongoDB to be used
MONGO_DATABASE=${MONGO_DATABASE}

# Port on which Redis in-memory data structure store is running
REDIS_PORT=${REDIS_PORT}

# Password to authenticate with the Redis service
REDIS_PASSWORD=${REDIS_PASSWORD}

# Port on which Kafka distributed streaming platform is running
KAFKA_PORT=${KAFKA_PORT}

# Address or hostname for the Kafka service
KAFKA_ADDR=${KAFKA_ADDR}

# Topic in Kafka for storing the latest messages in Redis
KAFKA_LATESTMSG_REDIS_TOPIC=${KAFKA_LATESTMSG_REDIS_TOPIC}

# Topic in Kafka for pushing messages (e.g. notifications or updates)
KAFKA_MSG_PUSH_TOPIC=${KAFKA_MSG_PUSH_TOPIC}

# Topic in Kafka for storing offline messages in MongoDB
KAFKA_OFFLINEMSG_MONGO_TOPIC=${KAFKA_OFFLINEMSG_MONGO_TOPIC}

# Port on which MinIO object storage service is running
MINIO_PORT=${MINIO_PORT}

# Access key to authenticate with the MinIO service
MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}

# Secret key corresponding to the access key for MinIO authentication
MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
64 changes: 30 additions & 34 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,60 @@
#fixme Clone openIM Server project before using docker-compose,project address:https://github.com/OpenIMSDK/Open-IM-Server.git
version: "3"
version: '3'

services:
mysql:
image: mysql:5.7
ports:
- 13306:3306
- 23306:33060
- "${MYSQL_PORT}:3306"
container_name: mysql
volumes:
- ${DATA_DIR}/components/mysql/data:/var/lib/mysql
- /etc/localtime:/etc/localtime
- "${DATA_DIR}/components/mysql/data:/var/lib/mysql"
- "/etc/localtime:/etc/localtime"
environment:
MYSQL_ROOT_PASSWORD: ${PASSWORD}
MYSQL_ROOT_PASSWORD: "${MYSQL_PASSWORD}"
restart: always

mongodb:
image: mongo:6.0.2
ports:
- 37017:27017
- "${MONGO_PORT}: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
- "${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}
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD}
- MONGO_INITDB_DATABASE=${MONGO_DATABASE}
restart: always

redis:
image: redis:7.0.0
ports:
- 16379:6379
- "${REDIS_PORT}: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
- "${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 --requirepass ${PASSWORD} --appendonly yes
command: redis-server --requirepass ${REDIS_PASSWORD} --appendonly yes

zookeeper:
image: wurstmeister/zookeeper
ports:
- 2181:2181
- "${ZOOKEEPER_PORT}:2181"
container_name: zookeeper
volumes:
- /etc/localtime:/etc/localtime
- "/etc/localtime:/etc/localtime"
environment:
TZ: Asia/Shanghai
restart: always
Expand All @@ -69,13 +65,13 @@ services:
container_name: kafka
restart: always
ports:
- 9092:9092
- "${KAFKA_PORT}:9092"
environment:
TZ: Asia/Shanghai
KAFKA_BROKER_ID: 0
KAFKA_ZOOKEEPER_CONNECT: 127.0.0.1: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_ZOOKEEPER_CONNECT: "${ZOOKEEPER_ADDRESS}:${ZOOKEEPER_PORT}"
KAFKA_CREATE_TOPICS: "${KAFKA_LATESTMSG_REDIS_TOPIC}:8:1,${KAFKA_MSG_PUSH_TOPIC}:8:1,${KAFKA_OFFLINEMSG_MONGO_TOPIC}:8:1"
KAFKA_ADVERTISED_LISTENERS: INSIDE://${KAFKA_ADDR}:${KAFKA_PORT},OUTSIDE://CHANGE_TO_YOUR_EXTERNAL_IP:${KAFKA_PORT}
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
Expand All @@ -86,15 +82,15 @@ services:
minio:
image: minio/minio
ports:
- 10005:9000
- 9090:9090
- "${MINIO_PORT}:9000"
- "9090:9090"
container_name: minio
volumes:
- ${DATA_DIR}/components/mnt/data:/data
- ${DATA_DIR}/components/mnt/config:/root/.minio
- "${DATA_DIR}/components/mnt/data:/data"
- "${DATA_DIR}/components/mnt/config:/root/.minio"
environment:
MINIO_ROOT_USER: ${USER}
MINIO_ROOT_PASSWORD: ${PASSWORD}
MINIO_ROOT_USER: "${MINIO_ACCESS_KEY}"
MINIO_ROOT_PASSWORD: "${MINIO_SECRET_KEY}"
restart: always
command: minio server /data --console-address ':9090'

Expand Down
Loading

0 comments on commit 7b07257

Please sign in to comment.