Skip to content

Commit

Permalink
Added logrotate package and config
Browse files Browse the repository at this point in the history
Rev'd to 1.3
  • Loading branch information
Evan Richardson committed Jan 3, 2019
1 parent b25a782 commit b8f3552
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
9 changes: 9 additions & 0 deletions Docker/src/conf/logrotate/tHome
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/var/log/tHome/*.log {
weekly
size 5M
missingok
rotate 8
compress
delaycompress
create 644 root root
}

0 comments on commit b8f3552

Please sign in to comment.