update 优化xxl-job-admin相关pr代码 增加格式化日志输出与docker镜像

feature/model
疯狂的狮子li 3 years ago
parent 2b0452207e
commit 82f1f5d0cf

@ -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

@ -37,6 +37,7 @@
<lock4j.version>2.2.1</lock4j.version>
<dynamic-ds.version>3.4.1</dynamic-ds.version>
<tlog.version>1.3.2</tlog.version>
<xxl-job-core-version>2.3.0</xxl-job-core-version>
<!-- jdk11 缺失依赖 jaxb-->
<jaxb.version>3.0.1</jaxb.version>
@ -53,17 +54,6 @@
<docker.namespace>ruoyi</docker.namespace>
<docker.plugin.version>1.2.2</docker.plugin.version>
<!-- xxl job-->
<netty-all.version>4.1.58.Final</netty-all.version>
<gson.version>2.8.6</gson.version>
<groovy.version>3.0.7</groovy.version>
<spring.version>5.3.3</spring.version>
<slf4j-api.version>1.7.30</slf4j-api.version>
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
<mybatis-spring-boot-starter.version>2.1.4</mybatis-spring-boot-starter.version>
<mysql-connector-java.version>8.0.23</mysql-connector-java.version>
<xxl-job-core-version>2.3.0</xxl-job-core-version>
</properties>
<!-- 依赖声明 -->

@ -0,0 +1,8 @@
Application Version: ${ruoyi-vue-plus.version}
Spring Boot Version: ${spring-boot.version}
__ __ _ _ _ _
| \/ | (_) | /\ | | (_)
| \ / | ___ _ __ _| |_ ___ _ __ ______ / \ __| |_ __ ___ _ _ __
| |\/| |/ _ \| '_ \| | __/ _ \| '__|______/ /\ \ / _` | '_ ` _ \| | '_ \
| | | | (_) | | | | | || (_) | | / ____ \ (_| | | | | | | | | | |
|_| |_|\___/|_| |_|_|\__\___/|_| /_/ \_\__,_|_| |_| |_|_|_| |_|

@ -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"]
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]

@ -9,6 +9,11 @@
<artifactId>ruoyi-xxl-job-admin</artifactId>
<packaging>jar</packaging>
<properties>
<mybatis-spring-boot-starter.version>2.1.4</mybatis-spring-boot-starter.version>
<mysql-connector-java.version>8.0.23</mysql-connector-java.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
@ -93,11 +98,14 @@
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<version>${docker.plugin.version}</version>
<configuration>
<!-- made of '[a-z0-9-_.]' -->
<imageName>${project.artifactId}:${project.version}</imageName>
<imageName>${docker.namespace}/${project.artifactId}:${project.version}</imageName>
<dockerDirectory>${project.basedir}</dockerDirectory>
<dockerHost>${docker.registry.host}</dockerHost>
<registryUrl>${docker.registry.url}</registryUrl>
<serverId>${docker.registry.url}</serverId>
<resources>
<resource>
<targetPath>/</targetPath>

@ -2,22 +2,27 @@
<configuration debug="false" scan="true" scanPeriod="1 seconds">
<contextName>logback</contextName>
<property name="log.path" value="/data/applogs/xxl-job/xxl-job-admin.log"/>
<property name="log.path" value="./logs/ruoyi-xxl-job-admin"/>
<property name="console.log.pattern"
value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"/>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n</pattern>
<pattern>${console.log.pattern}</pattern>
<charset>utf-8</charset>
</encoder>
</appender>
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}</file>
<file>${log.path}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}.%d{yyyy-MM-dd}.zip</fileNamePattern>
<fileNamePattern>${log.path}.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>

@ -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` (

Loading…
Cancel
Save