BAEL-1614 - additions for docker (#4455)
This commit is contained in:
parent
40d3b96820
commit
ea37ada296
|
@ -0,0 +1,16 @@
|
|||
# Alpine Linux with OpenJDK JRE
|
||||
FROM openjdk:8-jre-alpine
|
||||
RUN apk add --no-cache bash
|
||||
|
||||
# copy fat WAR
|
||||
COPY spring-boot-ops.war /app.war
|
||||
|
||||
# copy fat WAR
|
||||
COPY logback.xml /logback.xml
|
||||
|
||||
COPY run.sh /run.sh
|
||||
|
||||
# runs application
|
||||
#CMD ["/usr/bin/java", "-jar", "-Dspring.profiles.active=default", "-Dlogging.config=/logback.xml", "/app.war"]
|
||||
|
||||
ENTRYPOINT ["/run.sh"]
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
|
||||
<file>/var/log/WebjarsdemoApplication/application.log</file>
|
||||
<append>true</append>
|
||||
<encoder>
|
||||
<pattern>%-7d{yyyy-MM-dd HH:mm:ss:SSS} %m%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="FILE" />
|
||||
</root>
|
||||
</configuration>
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
java -Dspring.profiles.active=$1 -Dlogging.config=/logback.xml -jar /app.war
|
||||
|
|
@ -137,7 +137,8 @@
|
|||
<goal>repackage</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<mainClass>org.baeldung.boot.Application</mainClass>
|
||||
<mainClass>com.baeldung.webjar.WebjarsdemoApplication</mainClass>
|
||||
<outputDirectory>${project.basedir}/docker</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
Loading…
Reference in New Issue