diy支持任意仓库地址,修复添加ck报错,移除monk仓库内置

This commit is contained in:
whyour
2021-04-16 17:30:22 +08:00
parent 5de67b9679
commit 0563555a6a
7 changed files with 54 additions and 66 deletions
-7
View File
@@ -2,7 +2,6 @@ FROM node:lts-alpine
LABEL maintainer="whyour"
ARG QL_BASE_URL=https://github.com.cnpmjs.org/whyour/qinglong
ARG QL_BASE_BRANCH=master
ARG SSH_PRIVATE_KEY
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
LANG=zh_CN.UTF-8 \
SHELL=/bin/bash \
@@ -23,15 +22,9 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
nginx \
python3 \
jq \
openssh \
&& rm -rf /var/cache/apk/* \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& mkdir -p /root/.ssh \
&& chmod 700 /root/.ssh \
&& echo -e $SSH_PRIVATE_KEY > /root/.ssh/id_rsa \
&& chmod 600 /root/.ssh/id_rsa \
&& ssh-keyscan github.com > /root/.ssh/known_hosts \
&& touch ~/.bashrc \
&& mkdir /run/nginx \
&& git clone -b ${QL_BASE_BRANCH} ${QL_BASE_URL} ${QL_DIR} \
+3 -16
View File
@@ -49,23 +49,10 @@ echo -e "======================3. 启动控制面板========================\n"
pm2 start ${QL_DIR}/build/app.js -n panel
echo -e "控制面板启动成功...\n"
echo -e "======================4. 启动挂机程序========================\n"
CookieConf=${QL_DIR}/config/cookie.sh
. ${QL_DIR}/config/config.sh
. ${CookieConf}
if [[ ${ENABLE_HANGUP} == true ]]; then
if [ -s ${CookieConf} ]; then
js hangup 2>/dev/null
echo -e "挂机程序启动成功...\n"
else
echo -e "尚未在Cookie管理中添加一条Cookie,可能是首次部署容器,因此不启动挂机程序...\n"
fi
else
echo -e "默认不自动启动挂机程序,跳过...\n"
fi
echo -e "\n容器启动成功...\n"
echo -e "\n请先访问5700端口,登录面板成功之后手动执行一次git_pull命令...\n"
echo -e "\n请先访问5700端口,登录面板成功之后手动执行一次git_pull命令...\n"
echo -e "\n如果需要启动挂机程序手动执行docker exec -it qinglong js hangup...\n"
echo -e "\n或者去cron管理搜索hangup手动执行挂机任务...\n"
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then
set -- node "$@"