From 988e24eb96217b6e59c2ce9bbf325764c9aa3854 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 5 Nov 2020 10:35:51 -0800 Subject: [PATCH] Make logrotate a background process Closes #22 This runs logrotate as a background process rather than in the foreground. Degradation was caused by a delay in container startup when catalina.out gets rotated. If the file is big enough, the delay can be significant to cause degradation. --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 34260ad..489448a 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -23,7 +23,7 @@ if [ "$1" = 'bin/catalina.sh' ]; then echo "Logrotating catalina.out" echo '**************************************' echo - /usr/sbin/logrotate -s /usr/local/tomcat/logs/logrotate-status.log /etc/logrotate.d/metacat.conf + /usr/sbin/logrotate -s /usr/local/tomcat/logs/logrotate-status.log /etc/logrotate.d/metacat.conf & METACAT_DEFAULT_WAR=/usr/local/tomcat/webapps/metacat.war METACAT_DIR=/usr/local/tomcat/webapps/${METACAT_APP_CONTEXT}