unifios-utilities/container-common
bruvv 162d4ce478
Auto set correct data path (#491)
* Corrected file path by removing /mnt

* Update 20-zerotier.sh

* Update README.md

* removed /mnt directory as evertyhing is done in /data

* Corrected URL

* Update remote_install.sh

* Auto check data dir

* fixed adguard installation

* More data fixes

* Fix dns common data path

* fixed haproxy readme
2023-02-22 08:49:54 -08:00
..
on_boot.d Update 05-container-common.sh 2021-01-30 00:39:48 -08:00
README.md Auto set correct data path (#491) 2023-02-22 08:49:54 -08:00

Container common settings

Features

  1. Stable disk usage footprint: Sets a maximum log size any podman container log is allowed to grow up to (from unlimited size to 100Mb). Log "max size" is not a hard limit, but a point when Container Monitor attempts to truncate container log file. NOTE: application-specific logs that may be written outside container logs are not truncated by Container Monitor at set limits.

Requirements

  1. You have already setup the on boot script described here

Customization

While a 100Mb log limit per container should give plenty of log data for all featured in this repo projects, you can increase or decrease max_log_size value in /data/on_boot.d/05-container-common.sh file after installation.

Steps

  1. Run as root on UDM Pro to download and set permissions of on_boot.d script:
# Download 05-container-common.sh from GitHub
curl -L https://raw.githubusercontent.com/unifi-utilities/unifios-utilities/main/container-common/on_boot.d/05-container-common.sh -o /data/on_boot.d/05-container-common.sh;
# Set execute permission
chmod a+x /data/on_boot.d/05-container-common.sh;
  1. Review the script /data/on_boot.d/05-container-common.sh and when happy execute it.
# Review script
cat /data/on_boot.d/05-container-common.sh;
# Apply container-common settings
/data/on_boot.d/05-container-common.sh;
  1. Already running containers will pick up new defaults after either container restart ("podman restart <container-name>") or after UDM Pro restart. New containers will pick up a change from first run.
  2. To list containers that are running with log size limits:
# List container monitor processes with "--log-size-max" custom argument set
ps -ef | grep conmon | grep log-size-max