Merge pull request #2361 from OpenBankProject/github-action-wip

Set log level in OC image
This commit is contained in:
Simon Redfern 2024-01-09 12:43:03 +01:00 committed by GitHub
commit af0f7d3c08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -2,7 +2,10 @@ FROM jetty:9.4-jdk11-alpine
# Copy build artifact (.war file) into jetty from 'maven' stage.
COPY /obp-api/target/obp-api-1.*.war /var/lib/jetty/webapps/ROOT.war
USER root
RUN mkdir -p /WEB-INF/classes
COPY .github/logback.xml /WEB-INF/classes/
RUN cd / && jar uvf /var/lib/jetty/webapps/ROOT.war WEB-INF/classes/logback.xml
RUN chgrp -R 0 /tmp/jetty && chmod -R g+rwX /tmp/jetty
RUN chgrp -R 0 /var/lib/jetty && chmod -R g+rwX /var/lib/jetty
RUN chgrp -R 0 /usr/local/jetty && chmod -R g+rwX /usr/local/jetty
USER jetty
USER jetty

13
.github/logback.xml vendored Normal file
View File

@ -0,0 +1,13 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss} %t %c{0} [%p] %m%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>
</configuration>