diff --git a/docker/Dockerfile b/docker/Dockerfile index ab61085d..951ca658 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -29,14 +29,11 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && echo "Asia/Shanghai" > /etc/timezone \ && touch ~/.bashrc \ && mkdir /run/nginx \ - && git clone -b ${QL_BRANCH} https://github.com/whyour/qinglong-static.git /static \ && git clone -b ${QL_BRANCH} ${QL_URL} ${QL_DIR} \ && git config --global user.email "qinglong@@users.noreply.github.com" \ && git config --global user.name "qinglong" \ && git config --global pull.rebase true \ && cd ${QL_DIR} \ - && cp -rf /static/* ./ \ - && rm -rf /static \ && cp -f .env.example .env \ && chmod 777 ${QL_DIR}/shell/*.sh \ && chmod 777 ${QL_DIR}/docker/*.sh \ @@ -44,5 +41,8 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && npm install -g pnpm \ && rm -rf /root/.npm \ && pnpm install --prod \ - && rm -rf /root/.pnpm-store + && rm -rf /root/.pnpm-store \ + && git clone -b ${QL_BRANCH} https://github.com/whyour/qinglong-static.git /static \ + && cp -rf /static/* ${QL_DIR} \ + && rm -rf /static ENTRYPOINT ["./docker/docker-entrypoint.sh"] \ No newline at end of file diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 478b71bf..2e10c422 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -10,11 +10,15 @@ cp -fv $dir_root/docker/front.conf /etc/nginx/conf.d/front.conf pm2 l >/dev/null 2>&1 echo -echo -e "======================2. 启动nginx========================\n" +echo -e "======================2. 安装依赖========================\n" +update_depend +echo + +echo -e "======================3. 启动nginx========================\n" nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf echo -e "nginx启动成功...\n" -echo -e "======================3. 启动控制面板========================\n" +echo -e "======================4. 启动控制面板========================\n" if [[ $(pm2 info panel 2>/dev/null) ]]; then pm2 reload panel --source-map-support --time else @@ -22,7 +26,7 @@ else fi echo -e "控制面板启动成功...\n" -echo -e "======================4. 启动定时任务========================\n" +echo -e "======================5. 启动定时任务========================\n" if [[ $(pm2 info schedule 2>/dev/null) ]]; then pm2 reload schedule --source-map-support --time else @@ -31,12 +35,12 @@ fi echo -e "定时任务启动成功...\n" if [[ $AutoStartBot == true ]]; then - echo -e "======================5. 启动bot========================\n" + echo -e "======================6. 启动bot========================\n" ql bot fi if [[ $EnableExtraShell == true ]]; then - echo -e "======================6. 执行自定义脚本========================\n" + echo -e "======================7. 执行自定义脚本========================\n" ql extra fi