You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: admin_manual/exapps_management/DeployConfigurations.rst
+68Lines changed: 68 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -568,6 +568,74 @@ Docker Socket Proxy security
568
568
AIO Docker Socket Proxy has strictly limited access to the Docker APIs described in `HAProxy configuration <https://github.com/nextcloud/all-in-one/blob/main/Containers/docker-socket-proxy/haproxy.cfg>`_.
569
569
570
570
571
+
.. _exapp-container-log-rotation:
572
+
573
+
Container log rotation
574
+
----------------------
575
+
576
+
AppAPI deploys each ExApp as a container but does not set a logging configuration on it, so each ExApp container
577
+
uses the logging settings of the deploy daemon that runs it. If those logs have no size limit they are never
578
+
rotated and can grow until they fill the host disk. Configure rotation on the daemon, where it applies to every
579
+
container the daemon runs.
580
+
581
+
Docker
582
+
^^^^^^
583
+
584
+
Docker's default ``json-file`` driver sets no size limit. Add the following to the Docker daemon configuration file
585
+
(:file:`/etc/docker/daemon.json` on most Linux hosts) and restart the daemon:
586
+
587
+
.. code-block:: json
588
+
589
+
{
590
+
"log-driver": "json-file",
591
+
"log-opts": {
592
+
"max-size": "10m",
593
+
"max-file": "3"
594
+
}
595
+
}
596
+
597
+
.. code-block:: bash
598
+
599
+
sudo systemctl restart docker
600
+
601
+
Each container then keeps at most ``max-file`` log files of ``max-size`` each (here three files of 10 MB, so up to
602
+
30 MB per container). Adjust the values to suit your hosts.
603
+
604
+
.. note::
605
+
606
+
A container keeps the logging configuration it was created with, and disabling and enabling an ExApp only stops
607
+
and starts the existing container. Remove and install the affected ExApps again (or update them) so their
608
+
containers are recreated with the new settings.
609
+
610
+
.. important::
611
+
612
+
Keep the ``json-file`` or ``journald`` driver: AppAPI can only download container logs for these two drivers, so a
613
+
different driver disables log downloads for ExApp containers.
614
+
615
+
If you deliberately use a different driver (``syslog``, ``fluentd``, and so on) to forward logs elsewhere, keep your
616
+
existing setup: rotation is then handled by that driver and the steps above do not apply.
617
+
618
+
Podman
619
+
^^^^^^
620
+
621
+
When the deploy daemon is Podman, set a global default in :file:`/etc/containers/containers.conf` (or the per-user
622
+
file) and re-deploy the affected ExApps:
623
+
624
+
.. code-block:: toml
625
+
626
+
[containers]
627
+
log_driver = "json-file"
628
+
log_size_max = 10485760
629
+
630
+
Kubernetes
631
+
^^^^^^^^^^
632
+
633
+
For the Kubernetes deploy daemon, container log rotation is handled by the kubelet, not by AppAPI. Set
634
+
``containerLogMaxSize`` and ``containerLogMaxFiles`` in the kubelet configuration on each node and restart the kubelet
635
+
for the change to take effect (it loads its configuration only at startup); see the
0 commit comments