mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修改容器启动流程
This commit is contained in:
+2
-1
@@ -5,7 +5,7 @@ RUN set -x \
|
||||
&& apk add nodejs npm git \
|
||||
&& npm i -g pnpm \
|
||||
&& cd /tmp/build \
|
||||
&& pnpm install --prod
|
||||
&& pnpm --registry https://registry.npmmirror.com install --prod
|
||||
|
||||
FROM python:3.10-alpine
|
||||
|
||||
@@ -50,6 +50,7 @@ RUN set -x \
|
||||
&& git config --global user.name "qinglong" \
|
||||
&& git config --global http.postBuffer 524288000 \
|
||||
&& npm install -g pnpm \
|
||||
&& cd && pnpm config set registry https://registry.npmmirror.com \
|
||||
&& pnpm add -g pm2 tsx \
|
||||
&& rm -rf /root/.pnpm-store \
|
||||
&& rm -rf /root/.local/share/pnpm/store \
|
||||
|
||||
@@ -16,6 +16,14 @@ pm2 flush &>/dev/null
|
||||
|
||||
echo -e "======================2. 安装依赖========================\n"
|
||||
patch_version
|
||||
if [[ $PipMirror ]]; then
|
||||
pip3 config set global.index-url $PipMirror
|
||||
fi
|
||||
current_npm_registry=$(cd && pnpm config get registry)
|
||||
if [[ $current_npm_registry != $NpmMirror ]]; then
|
||||
cd && pnpm config set registry $NpmMirror
|
||||
pnpm install -g --force
|
||||
fi
|
||||
update_depend
|
||||
echo
|
||||
|
||||
@@ -23,21 +31,21 @@ echo -e "======================3. 启动nginx========================\n"
|
||||
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
|
||||
echo -e "nginx启动成功...\n"
|
||||
|
||||
echo -e "======================4. 启动面板监控========================\n"
|
||||
echo -e "======================4. 启动定时服务========================\n"
|
||||
pm2 delete schedule &>/dev/null
|
||||
pm2 start $dir_static/build/schedule/index.js -n schedule --source-map-support --time
|
||||
echo -e "定时任务启动成功...\n"
|
||||
|
||||
echo -e "======================5. 启动面板监控========================\n"
|
||||
pm2 delete public &>/dev/null
|
||||
pm2 start $dir_static/build/public.js -n public --source-map-support --time
|
||||
echo -e "监控服务启动成功...\n"
|
||||
|
||||
echo -e "======================5. 启动主服务========================\n"
|
||||
echo -e "======================6. 启动主服务========================\n"
|
||||
pm2 delete panel &>/dev/null
|
||||
pm2 start $dir_static/build/app.js -n panel --source-map-support --time
|
||||
echo -e "主服务启动成功...\n"
|
||||
|
||||
echo -e "======================6. 启动定时服务========================\n"
|
||||
pm2 delete schedule &>/dev/null
|
||||
pm2 start $dir_static/build/schedule/index.js -n schedule --source-map-support --time
|
||||
echo -e "定时任务启动成功...\n"
|
||||
|
||||
if [[ $AutoStartBot == true ]]; then
|
||||
echo -e "======================7. 启动bot========================\n"
|
||||
nohup ql -l bot >$dir_log/bot.log 2>&1 &
|
||||
|
||||
Reference in New Issue
Block a user