Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

3720/bug/manage solr logs #4066

Merged
merged 5 commits into from
Nov 20, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions conf/solr/rmlog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
find /var/log/tomcat7/* -mtime 7 -exec rm {} \;
cdrini marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion conf/solr/start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# Start cron for log management
cron start
# Default to dev env
ENV=${ENV:-dev}
# How much memory to use
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ services:
- solr-data:/var/lib/solr/data
networks:
- webnet
logging:
options:
max-size: "512m"
max-file: "4"
memcached:
image: memcached
networks:
Expand Down
6 changes: 5 additions & 1 deletion docker/Dockerfile.olsolr
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
FROM ubuntu:xenial

RUN apt-get -qq update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y solr-tomcat haproxy && \
DEBIAN_FRONTEND=noninteractive apt-get install -y solr-tomcat haproxy cron && \
ln -s /var/log/tomcat7/ /usr/share/tomcat7/logs && \
ln -s /etc/tomcat7/ /usr/share/tomcat7/conf

COPY conf/solr/conf/* /etc/solr/conf/
COPY conf/solr/haproxy.cfg /etc/haproxy/
COPY conf/solr/start.sh /start.sh

# Log management:
COPY conf/solr/rmlog.sh /etc/cron.daily/rmlog
RUN crontab /etc/crontab

EXPOSE 8983
CMD /start.sh