diff --git a/.github/workflows/build_base.yml b/.github/workflows/build_base.yml deleted file mode 100644 index 1ee30b15..00000000 --- a/.github/workflows/build_base.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Build QL BASE - -on: - schedule: - - cron: '00 18 * * *' # GMT 14:00 => 北京时间 2:00 - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - permissions: - packages: write - contents: read - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: '14' - - - name: Set time zone - uses: szenius/set-timezone@v1.0 - with: - timezoneLinux: "Asia/Shanghai" - timezoneMacos: "Asia/Shanghai" - timezoneWindows: "China Standard Time" - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Login to GHCR - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - build-args: | - MAINTAINER=${{ github.repository_owner }} - QL_BRANCH=${{ github.ref_name }} - platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 - context: . - file: docker/base/Dockerfile - push: true - tags: whyour/ql:base diff --git a/docker/Dockerfile b/docker/Dockerfile index 2cbc1f05..2af17b8d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,5 @@ -FROM whyour/ql:base +FROM node:alpine + ARG QL_MAINTAINER="whyour" LABEL maintainer="${QL_MAINTAINER}" ARG QL_URL=https://github.com/${QL_MAINTAINER}/qinglong.git @@ -13,18 +14,45 @@ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ WORKDIR ${QL_DIR} -RUN git clone -b ${QL_BRANCH} ${QL_URL} ${QL_DIR} \ +RUN set -x \ + && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \ + && apk update -f \ + && apk upgrade \ + && apk --no-cache add -f bash \ + coreutils \ + moreutils \ + git \ + curl \ + wget \ + tzdata \ + perl \ + openssl \ + nginx \ + python3 \ + jq \ + openssh \ + py3-pip \ + && rm -rf /var/cache/apk/* \ + && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ + && echo "Asia/Shanghai" > /etc/timezone \ + && touch ~/.bashrc \ + && git config --global user.email "qinglong@@users.noreply.github.com" \ + && git config --global user.name "qinglong" \ + && npm install -g pnpm \ + && pnpm install -g pm2 \ + && pnpm install -g ts-node typescript tslib \ + && git clone -b ${QL_BRANCH} ${QL_URL} ${QL_DIR} \ && cd ${QL_DIR} \ && cp -f .env.example .env \ && chmod 777 ${QL_DIR}/shell/*.sh \ && chmod 777 ${QL_DIR}/docker/*.sh \ - && cp -rf /node_modules ./ \ - && rm -rf /node_modules \ && pnpm install --prod \ && rm -rf /root/.pnpm-store \ && rm -rf /root/.cache \ + && rm -rf /root/.npm \ && git clone -b ${QL_BRANCH} https://github.com/${QL_MAINTAINER}/qinglong-static.git /static \ && mkdir -p ${QL_DIR}/static \ && cp -rf /static/* ${QL_DIR}/static \ && rm -rf /static + ENTRYPOINT ["./docker/docker-entrypoint.sh"] diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile deleted file mode 100644 index d50387f9..00000000 --- a/docker/base/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -FROM node:alpine -ARG QL_MAINTAINER="whyour" -LABEL maintainer="${QL_MAINTAINER}" - -ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ - LANG=zh_CN.UTF-8 \ - SHELL=/bin/bash \ - PS1="\u@\h:\w \$ " - -COPY package.json / - -RUN set -x \ - && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \ - && apk update -f \ - && apk upgrade \ - && apk --no-cache add -f bash \ - coreutils \ - moreutils \ - git \ - curl \ - wget \ - tzdata \ - perl \ - openssl \ - nginx \ - python3 \ - jq \ - openssh \ - py3-pip \ - python2 \ - g++ \ - make \ - && rm -rf /var/cache/apk/* \ - && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && touch ~/.bashrc \ - && git config --global user.email "qinglong@@users.noreply.github.com" \ - && git config --global user.name "qinglong" \ - && npm install -g pnpm \ - && pnpm install -g pm2 \ - && pnpm install -g ts-node typescript tslib \ - && cd / && pnpm install --prod \ - && apk --purge del python2 g++ make \ - && rm -rf /root/.npm \ - && rm -rf /root/.pnpm-store \ - && rm -rf /root/.cache \ - && rm -f /package.json - -CMD [ "node" ] diff --git a/src/pages/crontab/detail.tsx b/src/pages/crontab/detail.tsx index e739e8b1..fdaa178c 100644 --- a/src/pages/crontab/detail.tsx +++ b/src/pages/crontab/detail.tsx @@ -50,11 +50,13 @@ const CronDetailModal = ({ handleCancel, visible, theme, + isPhone, }: { cron?: any; visible: boolean; handleCancel: (needUpdate?: boolean) => void; theme: string; + isPhone: boolean; }) => { const [activeTabKey, setActiveTabKey] = useState('log'); const [loading, setLoading] = useState(true); @@ -213,11 +215,11 @@ const CronDetailModal = ({ forceRender footer={false} onCancel={() => handleCancel()} - width={'80vw'} - bodyStyle={{ background: '#eee', padding: 12 }} + wrapClassName="crontab-detail" + width={!isPhone ? '80vw' : ''} >