rebuild命令添加pm2服务无法自动启动时,自动启动

This commit is contained in:
whyour 2021-03-28 21:13:23 +08:00
parent 44addb6ff3
commit b8e3a451c3
3 changed files with 10 additions and 4 deletions

2
docker/docker-entrypoint.sh Normal file → Executable file
View File

@ -16,7 +16,7 @@ crontab ${QL_DIR}/config/crontab.list
echo -e "成功添加定时任务...\n"
if [ ! -s ${QL_DIR}/config/cookie.sh ]; then
echo -e "检测到config配置目录下不存在config.sh从示例文件复制一份用于初始化...\n"
echo -e "检测到config配置目录下不存在cookie.sh从示例文件复制一份用于初始化...\n"
touch ${QL_DIR}/config/cookie.sh
echo
fi

9
shell/rebuild.sh Normal file → Executable file
View File

@ -12,14 +12,19 @@ git reset --mixed
echo -e "更新shell完成...\n"
echo -e "重新build...\n"
yarn install --registry=https://registry.npm.taobao.org
yarn build
yarn build-back
echo -e "重新build完成...\n"
echo -e "重启服务...\n"
pm2 restart panel
PIDS=`ps -ef|grep "app.js"|grep -v grep`
if [ "$PIDS" != "" ]; then
pm2 restart panel
else
pm2 start ${QL_DIR}/build/app.js -n panel
fi
nginx -s reload
echo -e "重启服务完成...\n"

View File

@ -69,8 +69,9 @@ const CookieModal = ({
});
}}
onCancel={() => handleCancel()}
destroyOnClose
>
<Form form={form} layout="vertical" name="form_in_modal">
<Form form={form} layout="vertical" name="form_in_modal" preserve={false}>
<Form.Item
name="cookie"
rules={[