head: fix: 优化自动安装脚本
This commit is contained in:
parent
d9e0c96f6a
commit
111de91b1a
@ -78,6 +78,14 @@
|
||||
<!-- wp:list -->
|
||||
<ul><li>用户、角色、岗位的增删查改,批量删除,多条件搜索</li><li>角色、岗位数据导出Excel</li><li>重置用户密码</li><li>维护个人信息,上传管理头像,修改当前账户密码</li><li>部门的增删查改</li><li>菜单目录、跳转、按钮及API接口的增删查改</li><li>登陆日志管理</li><li>左菜单权限控制</li><li>页面按钮权限控制</li><li>API接口权限控制</li></ul>
|
||||
<!-- /wp:list -->
|
||||
<p>快速安装部署:</p>
|
||||
```shell
|
||||
bash build.sh install
|
||||
```
|
||||
<p>启动服务:</p>
|
||||
```shell
|
||||
bash build.sh start
|
||||
```
|
||||
|
||||
## 交流
|
||||
|
||||
|
9
build.sh
9
build.sh
@ -129,6 +129,7 @@ function test_mysql_connect() {
|
||||
password=$4
|
||||
db=$5
|
||||
command="CREATE TABLE IF NOT EXISTS test(id INT); DROP TABLE test;"
|
||||
echo_green "\n>>> $(gettext '拉取mysql docker 镜像如果是首次需要耗时,请稍等...')"
|
||||
docker run -it --rm mysql:5 mysql -h${host} -P${port} -u${user} -p${password} ${db} -e "${command}" 2>/dev/null
|
||||
}
|
||||
|
||||
@ -186,7 +187,7 @@ function set_external_mysql() {
|
||||
|
||||
function config_mysql {
|
||||
echo_green "\n>>> $(gettext '需注意: 邮件服务器信息若是暂时没有,可暂时不修改,但是MySQL和Redis是必须配置正确的')"
|
||||
read_from_input confirm "$(gettext 'Do you have been installed MySQL')?" "y/n" "n"
|
||||
read_from_input confirm "$(gettext 'Do you have been installed MySQL')?" "y/n" "y"
|
||||
|
||||
if [[ "${confirm}" == "y" ]]; then
|
||||
set_external_mysql
|
||||
@ -239,7 +240,8 @@ function install_front {
|
||||
fi
|
||||
|
||||
echo_green "\n>>> $(gettext '开始安装前端依赖...')"
|
||||
npm install -g cnpm --registry=https://registry.npm.taobao.org
|
||||
cnpm_base_dir=$(dirname $(dirname $(which npm)))
|
||||
npm install -g cnpm --registry=https://registry.npm.taobao.org --prefix ${cnpm_base_dir}
|
||||
cd ferry_web && cnpm install && npm run build:prod && cp -r web ../build/template
|
||||
|
||||
}
|
||||
@ -251,7 +253,7 @@ function config_front {
|
||||
ENV = 'production'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '$url'
|
||||
VUE_APP_BASE_API = '$front_url'
|
||||
EOF
|
||||
|
||||
}
|
||||
@ -291,7 +293,6 @@ function install_app() {
|
||||
install_front
|
||||
config_front
|
||||
install_backend
|
||||
|
||||
}
|
||||
|
||||
function start_backend {
|
||||
|
Loading…
x
Reference in New Issue
Block a user