From 82f1f5d0cf1b51a5d81915e842e01760f404fa74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 20 Oct 2021 13:07:16 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96xxl-job-admin?= =?UTF-8?q?=E7=9B=B8=E5=85=B3pr=E4=BB=A3=E7=A0=81=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E4=B8=8Edocker=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/docker-compose.yml | 18 ++++++++++++++++++ pom.xml | 12 +----------- .../src/main/resources/banner.txt | 8 ++++++++ ruoyi-extend/ruoyi-xxl-job-admin/Dockerfile | 16 +++++++++++----- ruoyi-extend/ruoyi-xxl-job-admin/pom.xml | 12 ++++++++++-- .../src/main/resources/logback.xml | 17 +++++++++++------ sql/tables_xxl_job.sql | 3 --- 7 files changed, 59 insertions(+), 27 deletions(-) create mode 100644 ruoyi-extend/ruoyi-monitor-admin/src/main/resources/banner.txt diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index e676d560..7e5f32fc 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -138,12 +138,30 @@ services: environment: # 时区上海 TZ: Asia/Shanghai + volumes: + # 配置文件 + - /docker/monitor/logs/:/ruoyi/monitor/logs privileged: true restart: always networks: ruoyi_net: ipv4_address: 172.30.0.90 + ruoyi-xxl-job-admin: + image: "ruoyi/ruoyi-xxl-job-admin:3.2.0" + container_name: ruoyi-xxl-job-admin + environment: + # 时区上海 + TZ: Asia/Shanghai + volumes: + # 配置文件 + - /docker/xxljob/logs/:/ruoyi/xxljob/logs + privileged: true + restart: always + networks: + ruoyi_net: + ipv4_address: 172.30.0.92 + networks: ruoyi_net: driver: bridge diff --git a/pom.xml b/pom.xml index 9c3b5dfb..be718ebd 100644 --- a/pom.xml +++ b/pom.xml @@ -37,6 +37,7 @@ 2.2.1 3.4.1 1.3.2 + 2.3.0 3.0.1 @@ -53,17 +54,6 @@ ruoyi 1.2.2 - - 4.1.58.Final - 2.8.6 - 3.0.7 - 5.3.3 - 1.7.30 - 1.3.2 - 2.1.4 - 8.0.23 - 2.3.0 - diff --git a/ruoyi-extend/ruoyi-monitor-admin/src/main/resources/banner.txt b/ruoyi-extend/ruoyi-monitor-admin/src/main/resources/banner.txt new file mode 100644 index 00000000..abb124d8 --- /dev/null +++ b/ruoyi-extend/ruoyi-monitor-admin/src/main/resources/banner.txt @@ -0,0 +1,8 @@ +Application Version: ${ruoyi-vue-plus.version} +Spring Boot Version: ${spring-boot.version} + __ __ _ _ _ _ +| \/ | (_) | /\ | | (_) +| \ / | ___ _ __ _| |_ ___ _ __ ______ / \ __| |_ __ ___ _ _ __ +| |\/| |/ _ \| '_ \| | __/ _ \| '__|______/ /\ \ / _` | '_ ` _ \| | '_ \ +| | | | (_) | | | | | || (_) | | / ____ \ (_| | | | | | | | | | | +|_| |_|\___/|_| |_|_|\__\___/|_| /_/ \_\__,_|_| |_| |_|_|_| |_| diff --git a/ruoyi-extend/ruoyi-xxl-job-admin/Dockerfile b/ruoyi-extend/ruoyi-xxl-job-admin/Dockerfile index dc195371..f7221bdf 100644 --- a/ruoyi-extend/ruoyi-xxl-job-admin/Dockerfile +++ b/ruoyi-extend/ruoyi-xxl-job-admin/Dockerfile @@ -1,11 +1,17 @@ -FROM openjdk:8-jre-slim -MAINTAINER xuxueli +FROM anapsix/alpine-java:8_server-jre_unlimited -ENV PARAMS="" +MAINTAINER Lion Li + +RUN mkdir -p /ruoyi/xxljob +RUN mkdir -p /ruoyi/xxljob/logs + +WORKDIR /ruoyi/xxljob ENV TZ=PRC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -ADD target/xxl-job-admin-*.jar /app.jar +EXPOSE 9100 + +ADD ./target/ruoyi-xxl-job-admin.jar ./app.jar -ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /app.jar $PARAMS"] \ No newline at end of file +ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] \ No newline at end of file diff --git a/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml b/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml index c0ff2fab..f71190d3 100644 --- a/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml +++ b/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml @@ -9,6 +9,11 @@ ruoyi-xxl-job-admin jar + + 2.1.4 + 8.0.23 + + @@ -93,11 +98,14 @@ com.spotify docker-maven-plugin - 0.4.13 + ${docker.plugin.version} - ${project.artifactId}:${project.version} + ${docker.namespace}/${project.artifactId}:${project.version} ${project.basedir} + ${docker.registry.host} + ${docker.registry.url} + ${docker.registry.url} / diff --git a/ruoyi-extend/ruoyi-xxl-job-admin/src/main/resources/logback.xml b/ruoyi-extend/ruoyi-xxl-job-admin/src/main/resources/logback.xml index d4b08c24..9c2e7723 100644 --- a/ruoyi-extend/ruoyi-xxl-job-admin/src/main/resources/logback.xml +++ b/ruoyi-extend/ruoyi-xxl-job-admin/src/main/resources/logback.xml @@ -2,22 +2,27 @@ logback - + + + - %d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n + ${console.log.pattern} + utf-8 - ${log.path} + ${log.path}.log - ${log.path}.%d{yyyy-MM-dd}.zip + ${log.path}.%d{yyyy-MM-dd}.log + + 60 - %date %level [%thread] %logger{36} [%file : %line] %msg%n - + ${log.pattern} diff --git a/sql/tables_xxl_job.sql b/sql/tables_xxl_job.sql index 02e4442a..3cd585a0 100644 --- a/sql/tables_xxl_job.sql +++ b/sql/tables_xxl_job.sql @@ -2,9 +2,6 @@ # XXL-JOB v2.3.0 # Copyright (c) 2015-present, xuxueli. -CREATE database if NOT EXISTS `xxl_job` default character set utf8mb4 collate utf8mb4_unicode_ci; -use `xxl_job`; - SET NAMES utf8mb4; CREATE TABLE `xxl_job_info` (