simple docker image
This commit is contained in:
parent
f968c21992
commit
ea20e5f8b7
3 changed files with 16 additions and 33 deletions
11
clearing-parent/backend-api/Dockerfile
Normal file
11
clearing-parent/backend-api/Dockerfile
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
FROM fabric8/java-centos-openjdk11-jdk
|
||||||
|
ADD target/backend-api.jar /deployments/backend-api.jar
|
||||||
|
USER root
|
||||||
|
RUN mkdir ./logs
|
||||||
|
ENV JAVA_APP_JAR=backend-api.jar
|
||||||
|
|
||||||
|
#spring boot maven plugin
|
||||||
|
#RUN mkdir ./logs
|
||||||
|
#VOLUME . ./logs
|
||||||
|
#ARG JAR_FILE=target/backend-api.jar
|
||||||
|
#ENV JAVA_APP_JAR=backend-api.jar
|
||||||
|
|
@ -51,29 +51,18 @@
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifest>
|
<manifest>
|
||||||
<addClasspath>true</addClasspath>
|
<!-- <addClasspath>true</addClasspath>-->
|
||||||
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
<!-- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>-->
|
||||||
<mainClass>ru.spcex.clearing.backendapi.BackendApiApplication</mainClass>
|
<mainClass>ru.spcex.clearing.backendapi.BackendApiApplication</mainClass>
|
||||||
</manifest>
|
</manifest>
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Built-By>Maven</Built-By>
|
<Built-By>Maven</Built-By>
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
</archive>
|
</archive>
|
||||||
<webResources>
|
|
||||||
<resource>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
<directory>src/main/web</directory>
|
|
||||||
<includes>
|
|
||||||
<include>**/web.xml</include>
|
|
||||||
</includes>
|
|
||||||
</resource>
|
|
||||||
</webResources>
|
|
||||||
<packagingExcludes>WEB-INF/classes/static/protected/tools/</packagingExcludes>
|
|
||||||
<attachClasses>true</attachClasses>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
@ -86,23 +75,6 @@
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>repackage</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<!-- <execution>-->
|
|
||||||
<!-- <id>gather-build-info-web</id>-->
|
|
||||||
<!-- <goals>-->
|
|
||||||
<!-- <goal>build-info</goal>-->
|
|
||||||
<!-- </goals>-->
|
|
||||||
<!-- </execution>-->
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>../logs/backend-api.log</file>
|
<file>./logs/backend-api.log</file>
|
||||||
<encoder>
|
<encoder>
|
||||||
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
|
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
|
||||||
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n</Pattern>
|
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n</Pattern>
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
</encoder>
|
</encoder>
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||||
<fileNamePattern>
|
<fileNamePattern>
|
||||||
../logs/backend-api.%i.log
|
./logs/backend-api.%i.log
|
||||||
</fileNamePattern>
|
</fileNamePattern>
|
||||||
<minIndex>1</minIndex>
|
<minIndex>1</minIndex>
|
||||||
<maxIndex>10</maxIndex>
|
<maxIndex>10</maxIndex>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue