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>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
||||
<!-- <addClasspath>true</addClasspath>-->
|
||||
<!-- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>-->
|
||||
<mainClass>ru.spcex.clearing.backendapi.BackendApiApplication</mainClass>
|
||||
</manifest>
|
||||
<manifestEntries>
|
||||
<Built-By>Maven</Built-By>
|
||||
</manifestEntries>
|
||||
</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>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
|
@ -86,23 +75,6 @@
|
|||
</goals>
|
||||
</execution>
|
||||
</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>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
</encoder>
|
||||
</appender>
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>../logs/backend-api.log</file>
|
||||
<file>./logs/backend-api.log</file>
|
||||
<encoder>
|
||||
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
|
||||
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n</Pattern>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
</encoder>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
../logs/backend-api.%i.log
|
||||
./logs/backend-api.%i.log
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue