Instead of rotating logs, don't write them to the container in the first place.
This is inline with container best practices (logs go to the container console). Fixes #6170pull/40/head
parent
0ccf2dad22
commit
b41557b54b
|
@ -163,7 +163,6 @@ RUN apk add --no-cache --virtual \
|
||||||
krb5-server-ldap \
|
krb5-server-ldap \
|
||||||
linux-headers && \
|
linux-headers && \
|
||||||
apk add \
|
apk add \
|
||||||
logrotate \
|
|
||||||
postfix \
|
postfix \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
postgresql-libs \
|
postgresql-libs \
|
||||||
|
@ -182,7 +181,6 @@ 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
|
RUN ln -sf /usr/lib/libpq.so.5.13 /usr/lib/libpq.so.5
|
||||||
|
|
||||||
# Copy the various scripts
|
# Copy the various scripts
|
||||||
COPY pkg/docker/logrotate.conf /etc/logrotate.d/pgadmin
|
|
||||||
COPY pkg/docker/run_pgadmin.py /pgadmin4
|
COPY pkg/docker/run_pgadmin.py /pgadmin4
|
||||||
COPY pkg/docker/gunicorn_config.py /pgadmin4
|
COPY pkg/docker/gunicorn_config.py /pgadmin4
|
||||||
COPY pkg/docker/entrypoint.sh /entrypoint.sh
|
COPY pkg/docker/entrypoint.sh /entrypoint.sh
|
||||||
|
@ -194,8 +192,6 @@ RUN groupadd -g 5050 pgadmin && \
|
||||||
useradd -r -u 5050 -g pgadmin pgadmin && \
|
useradd -r -u 5050 -g pgadmin pgadmin && \
|
||||||
mkdir -p /var/lib/pgadmin && \
|
mkdir -p /var/lib/pgadmin && \
|
||||||
chown pgadmin:pgadmin /var/lib/pgadmin && \
|
chown pgadmin:pgadmin /var/lib/pgadmin && \
|
||||||
mkdir -p /var/log/pgadmin && \
|
|
||||||
chown pgadmin:pgadmin /var/log/pgadmin && \
|
|
||||||
touch /pgadmin4/config_distro.py && \
|
touch /pgadmin4/config_distro.py && \
|
||||||
chown pgadmin:pgadmin /pgadmin4/config_distro.py && \
|
chown pgadmin:pgadmin /pgadmin4/config_distro.py && \
|
||||||
setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/python3.9
|
setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/python3.9
|
||||||
|
|
|
@ -12,7 +12,7 @@ New features
|
||||||
| `Issue #5912 <https://redmine.postgresql.org/issues/5912>`_ - Added support for Logical Replication.
|
| `Issue #5912 <https://redmine.postgresql.org/issues/5912>`_ - Added support for Logical Replication.
|
||||||
| `Issue #5967 <https://redmine.postgresql.org/issues/5967>`_ - Implemented runtime using NWjs to open pgAdmin4 in a standalone window instead of the system tray and web browser.
|
| `Issue #5967 <https://redmine.postgresql.org/issues/5967>`_ - Implemented runtime using NWjs to open pgAdmin4 in a standalone window instead of the system tray and web browser.
|
||||||
| `Issue #6148 <https://redmine.postgresql.org/issues/6148>`_ - Added Quick Search functionality for menu items and help articles.
|
| `Issue #6148 <https://redmine.postgresql.org/issues/6148>`_ - Added Quick Search functionality for menu items and help articles.
|
||||||
| `Issue #6170 <https://redmine.postgresql.org/issues/6170>`_ - Rotate the logfile in the container distribution.
|
| `Issue #6170 <https://redmine.postgresql.org/issues/6170>`_ - Ensure logs are not stored in the container, and only sent to the console.
|
||||||
|
|
||||||
Housekeeping
|
Housekeeping
|
||||||
************
|
************
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
if [ `wc -m /pgadmin4/config_distro.py | awk '{ print $1 }'` = "0" ]; then
|
if [ `wc -m /pgadmin4/config_distro.py | awk '{ print $1 }'` = "0" ]; then
|
||||||
cat << EOF > /pgadmin4/config_distro.py
|
cat << EOF > /pgadmin4/config_distro.py
|
||||||
CA_FILE = '/etc/ssl/certs/ca-certificates.crt'
|
CA_FILE = '/etc/ssl/certs/ca-certificates.crt'
|
||||||
|
LOG_FILE = '/dev/null'
|
||||||
HELP_PATH = '../../docs'
|
HELP_PATH = '../../docs'
|
||||||
DEFAULT_BINARY_PATHS = {
|
DEFAULT_BINARY_PATHS = {
|
||||||
'pg': '/usr/local/pgsql-13'
|
'pg': '/usr/local/pgsql-13'
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
/var/log/pgadmin/pgadmin4.log {
|
|
||||||
daily
|
|
||||||
copytruncate
|
|
||||||
rotate 7
|
|
||||||
compress
|
|
||||||
}
|
|
Loading…
Reference in New Issue