diff --git a/Dockerfile b/Dockerfile index 83402f36103ae625f993ff0b0ddc16187c50c4d3..b64a74dd9820f157ec067e7113a323c8ff996018 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN useradd -rms /bin/bash eccs RUN apt-get update \ && apt-get install -y apt-utils net-tools vim cron wget gpg gpg-agent unzip ca-certificates \ - build-essential python3-dev libxml2-dev libxml2-dev libxslt1-dev \ + build-essential python3-dev libxml2-dev libxml2-dev libxslt1-dev logrotate \ apache2 php supervisor uwsgi uwsgi-plugin-python3 libapache2-mod-proxy-uwsgi libxml2-utils \ python3 python3-pip python3-click python3-flask python3-flask-restful \ python3-requests python3-selenium python3-urllib3 --no-install-recommends \ @@ -48,8 +48,9 @@ COPY --chown=eccs:eccs web/ web/ USER root -COPY eccs_cron /etc/cron.d/eccs_cron -COPY pyff_cron /etc/cron.d/pyff_cron +COPY eccs-logrotate.conf /etc/logrotate.d/eccs +COPY eccs_cron /etc/cron.d/eccs +COPY pyff_cron /etc/cron.d/pyff # Install ECCS API COPY eccs.conf /etc/apache2/conf-available/eccs.conf diff --git a/eccs-logrotate.conf b/eccs-logrotate.conf new file mode 100644 index 0000000000000000000000000000000000000000..2244e9f738bb1a53f0874b04f4bfd2911a77ecae --- /dev/null +++ b/eccs-logrotate.conf @@ -0,0 +1,9 @@ +/home/eccs/logs/eccs-uwsgi.log { + su root root + create 664 eccs eccs + rotate 30 + daily + nocompress + dateext + ifempty +} diff --git a/eccs_cron b/eccs_cron index de497c5e0cd6131b8d92dbe30233093ed4f1bbbe..cf674b457752af30aa6e89c4b3931de540db17e4 100644 --- a/eccs_cron +++ b/eccs_cron @@ -1,3 +1,4 @@ +0 0 * * * /usr/sbin/logrotate /etc/logrotate.d/eccs 0 3 * * * /usr/bin/touch /home/eccs/eccs.ini 0 4 * * * /bin/bash /home/eccs/cleanAndRunEccs.sh > /home/eccs/logs/eccs-cron.log 2>&1 0 10 * * * /bin/bash /home/eccs/clean7daysOldFiles.sh > /home/eccs/logs/eccs-clean.log 2>&1 diff --git a/supervisord.conf b/supervisord.conf index d1deab0c806e09e77db6ad89a98263501aefe736..c14b15973e2832b4dd13c65eb8b4435b72637e4a 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -29,9 +29,9 @@ autorestart=true [program:uwsgi] #command=uwsgi --ini /root/eccs/eccs.ini --die-on-term command=uwsgi --ini /home/eccs/eccs.ini -stdout_logfile=/dev/stdout +stdout_logfile=/home/eccs/logs/eccs-uwsgi.log stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr +stderr_logfile=/home/eccs/logs/eccs-uwsgi.log stderr_logfile_maxbytes=0 autostart=true autorestart=true diff --git a/web/eccs.js b/web/eccs.js index 1bf3d294c648f07ac2d7750b72a2e933abd92a99..93911338aaca9651662f8ee4810c93574a18aa24 100644 --- a/web/eccs.js +++ b/web/eccs.js @@ -312,7 +312,11 @@ $(document).ready(function() { "data": "displayName", "defaultContent": '' }, - { "data": "entityID" }, + { "data": "entityID", + "render": function(data, type, row, meta) { + return '<a target="_blank" href="https://technical.edugain.org/api.php?action=show_entity_details&format=html&opt=standalone&e_id=' + data + '">' + data + '</a>'; + } + }, { "data": "registrationAuthority" }, { "data": "date",