Added logrotate package and config

Rev'd to 1.3
This commit is contained in:
Evan Richardson
2019-01-03 12:59:01 -08:00
parent b25a782a87
commit b8f3552791
2 changed files with 14 additions and 3 deletions

View File

@@ -1,13 +1,15 @@
FROM python:3.7.2-alpine3.8
LABEL maintainer="Evan Richardson"
LABEL version="1.2"
LABEL version="1.3"
WORKDIR /app
COPY . /app
COPY ./src/conf/logrotate/tHome /etc/logrotate.d/
ENV PYTHONPATH=/app/src/python
RUN pip3 install --no-cache-dir --upgrade pip
RUN pip3 install --no-cache-dir -r requirements.txt
RUN apk --update add --no-cache logrotate \
&& pip3 install --no-cache-dir --upgrade pip \
&& pip3 install --no-cache-dir -r requirements.txt
#RUN rm -rf /var/cache/apk
CMD ["/app/src/bin/tHome-eagle.py", "-c", "/app/src/conf"]

View File

@@ -0,0 +1,9 @@
/var/log/tHome/*.log {
weekly
size 5M
missingok
rotate 8
compress
delaycompress
create 644 root root
}