Hi All,
How do you rotate/collect tomcat access logs in jira docker container ? Each log size 500 Mb. If i dont remove access logs my /var/lib/docker overflowing.
Here i found a solution, but share your expirience for this problem )
https://github.com/nginxinc/docker-nginx/blob/48a4c531fc4bfa80d4270f20a67e2e958856860c/stable/stretch/Dockerfile#L91-L93
Hi there,
I want my container will be stateless, without any utilities from host station.
When i build container i use sed utility, add maxdays tomcat parameter and edit server.xml
RUN sed -i -r 's#className=\"org.apache.catalina.valves.AccessLogValve\"#className=\"org.apache.catalina.valves.AccessLogValve\" maxDays=\"7\"#' ${JIRA_INSTALL_DIR}/conf/server.xml \ && sed -i -e 's/= catalina./= catalina.\n1catalina.org.apache.juli.AsyncFileHandler.maxDays = 14/' ${JIRA_INSTALL_DIR}/conf/logging.properties \ && sed -i -e 's/= localhost./= localhost.\n2localhost.org.apache.juli.AsyncFileHandler.maxDays = 14/' ${JIRA_INSTALL_DIR}/conf/logging.properties \ && sed -i -e 's/= manager./= manager.\n3manager.org.apache.juli.AsyncFileHandler.maxDays = 14/' ${JIRA_INSTALL_DIR}/conf/logging.properties \ && sed -i -e 's/= host-manager./= host-manager.\n4host-manager.org.apache.juli.AsyncFileHandler.maxDays = 14/' ${JIRA_INSTALL_DIR}/conf/logging.properties
After that i can pull and start my container on any station.
Hi there,
You can use logrotate to do what you are looking for. You can use this article as a reference.
Best Regards,
Mogavenasan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.