Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update Camunda Tomcat version to 7.12.0 #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Patterns for enabling JSON Logging on the Tomcat distribution of Camunda BPM Pla
| Version | Description |
| ------- | ----------- |
| [7.9.0](./tomcat/7.9.0/docker) | Docker base image for pulling into other projects or use as a `docker run` command. Modifies Tomcat logging for usage with Logback, SLFJ4, and JSON logging using logstash-logback-encoder.
| [7.12.0](./tomcat/7.12.0/docker) | Docker base image for pulling into other projects or use as a `docker run` command. Modifies Tomcat logging for usage with Logback, SLFJ4, and JSON logging using logstash-logback-encoder.
21 changes: 21 additions & 0 deletions tomcat/7.12.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM camunda/camunda-bpm-platform:tomcat-7.12.0

RUN rm -rf /camunda/webapps/camunda-invoice

ENV PRETTY_JSON_LOG=false

# Remove the slf4j-jdj14 bridge library that is packaged with CamundaBPM tomcat distribution
RUN rm -rf /camunda/lib/slf4j-jdk14-1.7.26.jar

# Add logback configuration
RUN mkdir /camunda/conf/logback
COPY docker/conf/logback/logback.xml /camunda/conf/logback/logback.xml

# Overwrite global logging configuration for tomcat
COPY docker/conf/logging.properties /camunda/conf/logging.properties

# Copy Jar for logging
COPY docker/lib/ /camunda/lib/

# Overwrite setenv.sh with additional CLASSPATH config that exposes the libraries at tomcat startup
COPY docker/bin/setenv.sh /camunda/bin/setenv.sh
9 changes: 9 additions & 0 deletions tomcat/7.12.0/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "3"

services:
camunda:
environment:
- PRETTY_JSON_LOG=true
build: .
ports:
- "18180:8080"
4 changes: 4 additions & 0 deletions tomcat/7.12.0/docker/bin/setenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#export CATALINA_OPTS="-Xmx512m -XX:MaxPermSize=256m -XX:PermSize=256m"

# Sets the initial classpath to have the needed JUL->SLF4J jars + the logstash/Logback libraries
CLASSPATH=$CATALINA_HOME/lib/camunda-json-logging-tomcat-${CAMUNDA_VERSION}.jar:$CATALINA_HOME/conf/logback/
71 changes: 71 additions & 0 deletions tomcat/7.12.0/docker/conf/logback/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<configuration debug="false" scan="true" scanPeriod="30 seconds" >

<!-- For java.util.logging bridging; important for Camunda! -->
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
</contextListener>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} -- [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<appender name="json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
<if condition='${PRETTY_JSON_LOG}'>
<then>
<jsonGeneratorDecorator class="net.logstash.logback.decorate.PrettyPrintingJsonGeneratorDecorator"/>
</then>
</if>
</encoder>
</appender>

<!-- camunda -->
<!-- <logger name="org.camunda" level="info"/> -->

<!-- common dependencies -->
<!-- <logger name="org.apache.ibatis" level="info" /> -->
<!-- <logger name="javax.activation" level="info" /> -->
<!-- <logger name="org.springframework" level="info" /> -->
<!-- <logger name="org.apache.catalina" level="info" /> -->


<!-- <logger name="org.apache.jasper.servlet.TldScanner" level="debug"/> -->

<!-- avoid many log entries from failing jobs -->
<!-- <logger name="org.camunda.bpm.engine.jobexecutor" level="off" /> -->
<!-- <logger name="org.camunda.bpm.engine.context" level="off" /> -->


<!--
<logger name="org.camunda.bpm.engine.impl.persistence.entity" level="debug" />
<logger name="org.camunda.bpm.engine.history" level="debug" />
<logger name="org.camunda.bpm.engine.bpmn.parser" level="debug" />
<logger name="org.camunda.bpm.engine.bpmn.behavior" level="debug" />
<logger name="org.camunda.bpm.engine.cmmn.transformer" level="debug" />
<logger name="org.camunda.bpm.engine.cmmn.behavior" level="debug" />
<logger name="org.camunda.bpm.engine.cmmn.operation" level="debug" />
<logger name="org.camunda.bpm.engine.cmd" level="debug" />
<logger name="org.camunda.bpm.engine.persistence" level="debug" />
<logger name="org.camunda.bpm.engine.tx" level="debug" />
<logger name="org.camunda.bpm.engine.cfg" level="debug" />
<logger name="org.camunda.bpm.engine.jobexecutor" level="debug" />
<logger name="org.camunda.bpm.engine.context" level="debug" />
<logger name="org.camunda.bpm.engine.core" level="debug" />
<logger name="org.camunda.bpm.engine.pvm" level="debug" />
<logger name="org.camunda.bpm.engine.metrics" level="debug" />
<logger name="org.camunda.bpm.engine.util" level="debug" />
<logger name="org.camunda.bpm.application" level="debug" />
<logger name="org.camunda.bpm.container" level="debug" />
-->


<root level="info">
<!-- <appender-ref ref="STDOUT" /> -->
<appender-ref ref="json" />
</root>

</configuration>
1 change: 1 addition & 0 deletions tomcat/7.12.0/docker/conf/logging.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#handlers = org.slf4j.bridge.SLF4JBridgeHandler
Binary file not shown.