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 ...@@ -16,6 +16,27 @@ sudo ln -s ${sc_dir}/.env ${sc_dir}/install.ini 2>/dev/null
cd ${sc_dir} cd ${sc_dir}
compose_files="-f docker-compose-base.yaml" 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 case ${INSTALL_MODE} in
all_install) all_install)
...@@ -31,6 +52,7 @@ server_controller_install) ...@@ -31,6 +52,7 @@ server_controller_install)
echo "错误模式-请重新输入" echo "错误模式-请重新输入"
exit 127 exit 127
esac esac
#是否使用外部组件 #是否使用外部组件
if [ ${INSTALL_MODE} == "all_install" ];then if [ ${INSTALL_MODE} == "all_install" ];then
sudo docker-compose ${compose_files} up sudo docker-compose ${compose_files} up
...@@ -62,26 +84,6 @@ elif [ ${INSTALL_MODE} == "server_controller_install" ];then ...@@ -62,26 +84,6 @@ elif [ ${INSTALL_MODE} == "server_controller_install" ];then
fi 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} echo ${MQ_ISUSE_STATUS}
...@@ -13,8 +13,8 @@ services: ...@@ -13,8 +13,8 @@ services:
tty: true tty: true
ports: ports:
- "8004:9001" - "8004:9001"
depends_on: #depends_on:
- elasticsearch #- elasticsearch
- rabbitmq #- rabbitmq
networks: networks:
- sc_net - 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