diff --git a/Dockerfile b/Dockerfile index b783793eb..7e93b2af3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -163,6 +163,7 @@ RUN apk add --no-cache --virtual \ krb5-server-ldap \ linux-headers && \ apk add \ + logrotate \ postfix \ postgresql-client \ postgresql-libs \ @@ -180,7 +181,8 @@ RUN apk add --no-cache --virtual \ COPY --from=pg13-builder /usr/local/lib/libpq.so.5.13 /usr/lib/ RUN ln -sf /usr/lib/libpq.so.5.13 /usr/lib/libpq.so.5 -# Copy the runner script +# Copy the various scripts +COPY pkg/docker/logrotate.conf /etc/logrotate.d/pgadmin COPY pkg/docker/run_pgadmin.py /pgadmin4 COPY pkg/docker/gunicorn_config.py /pgadmin4 COPY pkg/docker/entrypoint.sh /entrypoint.sh diff --git a/docs/en_US/release_notes_5_0.rst b/docs/en_US/release_notes_5_0.rst index f8bc02e0c..052f20a6b 100644 --- a/docs/en_US/release_notes_5_0.rst +++ b/docs/en_US/release_notes_5_0.rst @@ -11,6 +11,7 @@ New features | `Issue #5912 `_ - Added support for Logical Replication. | `Issue #5967 `_ - Implemented runtime using NWjs to open pgAdmin4 in a standalone window instead of the system tray and web browser. +| `Issue #6170 `_ - Rotate the logfile in the container distribution. Housekeeping ************ diff --git a/pkg/docker/logrotate.conf b/pkg/docker/logrotate.conf new file mode 100644 index 000000000..5236ab25b --- /dev/null +++ b/pkg/docker/logrotate.conf @@ -0,0 +1,6 @@ +/var/log/pgadmin/pgadmin4.log { + daily + copytruncate + rotate 7 + compress +} \ No newline at end of file