Page MenuHomeDevCentral

Rotate nginx logs on PaaS Docker
Open, NormalPublic

Description

If T2129 takes care of PaaS Alkane web logs rotation, we could also do the same for nginx logs in PaaS docker role with logrotate.

There is already a file /etc/logrotate.d/nginx, but it handles /var/log/nginx/*.log.

To use the same 90 days rotation, we can use:

/var/log/www/*/*.log {
    daily
    rotate 90
}

Event Timeline

dereckson triaged this task as Normal priority.Sep 21 2025, 15:09
dereckson created this task.

Current status: deployed to Dwellers

$ ls -lah /var/log/www/orbeon
total 476K
drwxr-xr-x. 2 nginx root 4.0K Nov 19 00:22 .
drwx--x--x. 9 nginx web  4.0K Nov 14 16:22 ..
-rw-r--r--. 1 nginx root  28K Nov 19 23:07 nasqueron_forms-access.log
-rw-r--r--. 1 nginx root 251K Nov 14 22:21 nasqueron_forms-access.log-20251115.gz
-rw-r--r--. 1 nginx root 2.9K Nov 15 22:49 nasqueron_forms-access.log-20251116.gz
-rw-r--r--. 1 nginx root 3.6K Nov 16 21:32 nasqueron_forms-access.log-20251117.gz
-rw-r--r--. 1 nginx root 9.0K Nov 18 00:00 nasqueron_forms-access.log-20251118.gz
-rw-r--r--. 1 nginx root  26K Nov 18 22:10 nasqueron_forms-access.log-20251119
-rw-r--r--. 1 nginx root  11K Nov 19 23:07 nasqueron_forms-error.log
-rw-r--r--. 1 nginx root  96K Nov 14 19:28 nasqueron_forms-error.log-20251115.gz
-rw-r--r--. 1 nginx root 1.3K Nov 15 22:49 nasqueron_forms-error.log-20251116.gz
-rw-r--r--. 1 nginx root 1.3K Nov 16 21:31 nasqueron_forms-error.log-20251117.gz
-rw-r--r--. 1 nginx root 5.9K Nov 18 00:00 nasqueron_forms-error.log-20251118.gz
-rw-r--r--. 1 nginx root  14K Nov 18 22:10 nasqueron_forms-error.log-20251119

Next step: deploy to docker-002, and ensure D3622 is already deployed there too.