修改镜像打包流程

This commit is contained in:
hanhh
2021-06-30 23:38:46 +08:00
parent 2a1adb2e0e
commit 2fe8c38293
4 changed files with 16 additions and 11 deletions
+5
View File
@@ -37,6 +37,11 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
&& cp -f .env.example .env \
&& chmod 777 ${QL_DIR}/shell/*.sh \
&& chmod 777 ${QL_DIR}/docker/*.sh \
&& yarn install \
&& yarn build \
&& yarn build-back \
&& yarn cache clean \
&& rm -rf node_modules \
&& npm install -g pm2 \
&& npm install -g pnpm \
&& rm -rf /root/.npm \
+9 -8
View File
@@ -7,18 +7,14 @@ link_shell
echo -e "======================1. 检测配置文件========================\n"
fix_config
cp -fv $dir_root/docker/front.conf /etc/nginx/conf.d/front.conf
echo
echo -e "======================2. 更新源代码========================\n"
ql update "no-restart"
pm2 l >/dev/null 2>&1
echo
echo -e "======================3. 启动nginx========================\n"
echo -e "======================2. 启动nginx========================\n"
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
echo -e "nginx启动成功...\n"
echo -e "======================4. 启动控制面板========================\n"
echo -e "======================3. 启动控制面板========================\n"
if [[ $(pm2 info panel 2>/dev/null) ]]; then
pm2 reload panel --source-map-support --time
else
@@ -26,7 +22,7 @@ else
fi
echo -e "控制面板启动成功...\n"
echo -e "======================5. 启动定时任务========================\n"
echo -e "======================4. 启动定时任务========================\n"
if [[ $(pm2 info schedule 2>/dev/null) ]]; then
pm2 reload schedule --source-map-support --time
else
@@ -35,10 +31,15 @@ fi
echo -e "定时任务启动成功...\n"
if [[ $AutoStartBot == true ]]; then
echo -e "======================6. 启动bot========================\n"
echo -e "======================5. 启动bot========================\n"
ql bot
fi
if [[ $EnableExtraShell == true ]]; then
echo -e "======================6. 执行自定义脚本========================\n"
ql extra
fi
echo -e "############################################################\n"
echo -e "容器启动成功..."
echo -e "\n请先访问5700端口,登录成功面板之后再执行添加定时任务..."