Commit 5428de7b authored by tianye's avatar tianye

修改部署脚本

parent 844cdd49
......@@ -16,6 +16,27 @@ sudo ln -s ${sc_dir}/.env ${sc_dir}/install.ini 2>/dev/null
cd ${sc_dir}
compose_files="-f docker-compose-base.yaml"
INSTALL_MODE=$1
#修改es连接信息为外部
edit_es_info(){
echo -e " 使用外部ES\n即将修改配置...."
grep -A 10 -w "es:" ${APP_CONF_DIR}/application.yml | \
sed -e "s#host: .*#host: ${ES_HOST}#g"\
-e "s#username: .*#username: ${ES_USERNAME}#g"\
-e "s#password: .*#password: ${ES_PASSWORD}#g"\
-e "s#httpPort: .*#httpPort: ${ES_HTTP_PORT}#g"\
-e "s#tcpPort: .*#tcpPort: ${ES_TCP_PORT}#g"
}
#修改mq信息为外部
edit_mq_info(){
echo -e " 使用外部MQ\n即将修改配置...."
grep -A 6 -w "rabbitmq:" ${APP_CONF_DIR}/application.yml | \
sed -e "s#host: .*#host: ${MQ_HOST}#g"\
-e "s#username: .*#username: ${MQ_USERNAME}#g"\
-e "s#password: .*#password: ${MQ_PASSWORD}#g"\
-e "s#virtual-host: .*#virtual-host: ${MQ_VHOST}#g"
}
case ${INSTALL_MODE} in
all_install)
......@@ -31,6 +52,7 @@ server_controller_install)
echo "错误模式-请重新输入"
exit 127
esac
#是否使用外部组件
if [ ${INSTALL_MODE} == "all_install" ];then
sudo docker-compose ${compose_files} up
......@@ -62,26 +84,6 @@ elif [ ${INSTALL_MODE} == "server_controller_install" ];then
fi
#修改es连接信息为外部
edit_es_info()
{
echo -e " 使用外部ES\n即将修改配置...."
grep -A 10 -w "es:" ${APP_CONF_DIR}/application.yml | \
sed -e "s#host: .*#host: ${ES_HOST}#g"\
-e "s#username: .*#username: ${ES_USERNAME}#g"\
-e "s#password: .*#password: ${ES_PASSWORD}#g"\
-e "s#httpPort: .*#httpPort: ${ES_HTTP_PORT}#g"\
-e "s#tcpPort: .*#tcpPort: ${ES_TCP_PORT}#g"
}
#修改mq信息为外部
edit_mq_info()
{
echo -e " 使用外部MQ\n即将修改配置...."
grep -A 6 -w "rabbitmq:" ${APP_CONF_DIR}/application.yml | \
sed -e "s#host: .*#host: ${MQ_HOST}#g"\
-e "s#username: .*#username: ${MQ_USERNAME}#g"\
-e "s#password: .*#password: ${MQ_PASSWORD}#g"\
-e "s#virtual-host: .*#virtual-host: ${MQ_VHOST}#g"
}
echo ${MQ_ISUSE_STATUS}
......@@ -13,8 +13,8 @@ services:
tty: true
ports:
- "8004:9001"
depends_on:
- elasticsearch
- rabbitmq
#depends_on:
#- elasticsearch
#- rabbitmq
networks:
- sc_net
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment