diff --git a/.env b/.env index 7fdf0e3b3..d2348a239 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ USER=root PASSWORD=openIM123 -MINIO_ENDPOINT=http://127.0.0.1:10005 +MINIO_ENDPOINT=http://113.90.81.237:10005 DATA_DIR=./ \ No newline at end of file diff --git a/config/usualConfig.yaml b/config/usualConfig.yaml index 8558f4bf0..ebe86ee59 100644 --- a/config/usualConfig.yaml +++ b/config/usualConfig.yaml @@ -1,19 +1,19 @@ etcd: userName: password: - secret: openIM123 # etcd 配置密钥 + secret: mysql: - dbMysqlUserName: root #mysql用户名 - dbMysqlPassword: openIM123 # mysql密码 + dbMysqlUserName: root + dbMysqlPassword: mongo: - dbUserName: root #mongo用户名 - dbPassword: openIM123 #mongo密码 + dbUserName: root + dbPassword: redis: dbUserName: - dbPassWord: openIM123 #redis密码 + dbPassWord: kafka: SASLUserName: @@ -21,11 +21,11 @@ kafka: credential: minio: - endpoint: http://127.0.0.1:10005 #发图片视频文件需要填写 + endpoint: accessKeyID: root - secretAccessKey: openIM123 + secretAccessKey: -secret: tuoyun #建议修改 +secret: tokenpolicy: accessSecret: "open_im_server" #token生成相关 建议修改 diff --git a/docker-compose_cfg/config.yaml b/docker-compose_cfg/config.yaml index 4ea03d854..96590aab0 100644 --- a/docker-compose_cfg/config.yaml +++ b/docker-compose_cfg/config.yaml @@ -4,7 +4,7 @@ etcd: etcdAddr: [ 127.0.0.1:2379 ] #单机部署时,默认即可 userName: password: - secret: openIM123 + secret: mysql: dbMysqlDatabaseName: admin_chat # 数据库名字 默认即可 diff --git a/install_im_server.sh b/install_im_server.sh index ea641d0f8..78bdd7058 100644 --- a/install_im_server.sh +++ b/install_im_server.sh @@ -1,19 +1,43 @@ #!/usr/bin/env bash -internet_ip=`curl ifconfig.me -s` -echo $internet_ip +# Get the external IP address +internet_ip=$(curl -s ifconfig.me) + +# Print the IP address +echo "Internet IP address: ${internet_ip}" + +# Read environment variables source .env -echo $MINIO_ENDPOINT -if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then - sed -i "s/127.0.0.1/${internet_ip}/" .env +# Check if MINIO_ENDPOINT variable is set correctly +if [[ -z "${MINIO_ENDPOINT}" || "${MINIO_ENDPOINT}" != "http://127.0.0.1:10005" ]]; then + echo "Error: MINIO_ENDPOINT is not set or is not equal to http://127.0.0.1:10005." + exit 1 fi - -cd script ; -chmod +x *.sh ; + +# Replace the IP address in the .env file +sed -i "s/127.0.0.1/${internet_ip}/" .env + +# Enter the script directory +cd script || exit 1 + +# Add execute permission to scripts +chmod +x *.sh + +# Initialize password ./init_pwd.sh -./env_check.sh; -cd .. ; -docker-compose up -d; -cd script ; + +# Check environment variables +./env_check.sh + +# Return to the parent directory +cd .. + +# Start docker containers +docker-compose up -d + +# Enter the script directory +cd script || exit 1 + +# Check if docker services are running properly ./docker_check_service.sh diff --git a/script/enterprise/check_all.sh b/script/enterprise/check_all.sh old mode 100644 new mode 100755 diff --git a/script/enterprise/function.sh b/script/enterprise/function.sh old mode 100644 new mode 100755 diff --git a/script/release.sh b/script/release.sh old mode 100644 new mode 100755