Skip to content

Commit

Permalink
Merge pull request #37 from demarches-simplifiees/logrotate
Browse files Browse the repository at this point in the history
add logrotate conf
  • Loading branch information
LeSim authored Aug 30, 2024
2 parents 1f3cbdd + 8c662fe commit 9c924a1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package_scripts/Dockerfile_vanilla
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ FROM ubuntu:jammy
USER root

RUN apt-get update \
&& apt-get install -yqq pango1.0-tools curl
&& apt-get install -yqq pango1.0-tools logrotate curl
2 changes: 1 addition & 1 deletion package_scripts/deb/DEBIAN/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Architecture: amd64
Essential: no
Section: web
Priority: optional
Depends: pango1.0-tools
Depends: pango1.0-tools, logrotate
Maintainer: [email protected]
Description: a flask wrapper around weasyprint
This package contains a flask wrapper around weasyprint
Expand Down
3 changes: 3 additions & 0 deletions package_scripts/deb/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ case "$1" in
# install weasyprint service
cp opt/weasyprint/default_conf/systemd/weasyprint.service /lib/systemd/system

# install logrotate conf
cp opt/weasyprint/default_conf/logrotate/weasyprint /etc/logrotate.d

# setup log dir
mkdir -p /var/log/weasyprint
chown weasyprint:weasyprint /var/log/weasyprint
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/var/log/weasyprint/*.log {
daily
missingok
rotate 14
compress
delaycompress
notifempty
copytruncate
}

0 comments on commit 9c924a1

Please sign in to comment.