diff --git a/pica-openldap/Dockerfile b/pica-openldap/Dockerfile index 60b7426aab4c3c9aae4cdb8e7aca836017bfa64d..37cbe7cd6f136d204f0b932be5f181c5d02ade90 100644 --- a/pica-openldap/Dockerfile +++ b/pica-openldap/Dockerfile @@ -1,5 +1,13 @@ FROM osixia/openldap:1.4.0 LABEL maintainer="quentinduchemin@tuta.io,bonnest@utc.fr" +RUN apt-get update && \ + apt-get install rsyslog logrotate + +# TODO ajouter un cron +COPY ./logrotate/openldap /etc/logrotate.d/openldap + +RUN update-rc.d rsyslog defaults + ADD bootstrap /container/service/slapd/assets/config/bootstrap ADD environment /container/environment/01-custom diff --git a/pica-openldap/logrotate/openldap b/pica-openldap/logrotate/openldap new file mode 100644 index 0000000000000000000000000000000000000000..2585c768962d0ceb4f65cb59b9f594dc546d5255 --- /dev/null +++ b/pica-openldap/logrotate/openldap @@ -0,0 +1,13 @@ +/var/log/*.log { + missingok + notifempty + compress + weekly + rotate 10 + size=50M + sharedscripts + postrotate + # OpenLDAP logs via syslog, restart syslog if running + /etc/init.d/rsyslog restart + endscript +}