class

Mangrullo::Config

Inherits Reference < Object

Constants

DOCOPT = "Mangrullo - Docker container update automation tool\n\nUsage:\n mangrullo [--interval=<seconds>] [--allow-major] [--socket=<path>]\n [--log-level=<level>] [--once] [--dry-run] [<container-name>...]\n [--help] [--version]\n\nOptions:\n --interval=<seconds> Check interval in seconds [default: #{Mangrullo::Constants::Config::DEFAULT_INTERVAL}]\n --allow-major Allow major version upgrades\n --socket=<path> Docker socket path [default: #{Mangrullo::Constants::Docker::DEFAULT_SOCKET_PATH}]\n --log-level=<level> Log level (debug, info, warn, error) [default: #{Mangrullo::Constants::Config::DEFAULT_LOG_LEVEL}]\n --once Run once and exit\n --dry-run Show what would be updated without actually updating\n --help Show this help message\n --version Show version information\n\nArguments:\n <container-name> Specific container names to check (if not specified, checks all containers)"

Constructors

from_args_and_env(args : Array(String)) : Config
Source
from_env
Source
new(interval : Int32 = Mangrullo::Constants::Config::DEFAULT_INTERVAL, allow_major_upgrade : Bool = false, docker_socket_path : String = Mangrullo::Constants::Docker::DEFAULT_SOCKET_PATH, log_level : String = Mangrullo::Constants::Config::DEFAULT_LOG_LEVEL, run_once : Bool = false, dry_run : Bool = false, container_names : Array(String) = [] of String)
Source
parse(args : Array(String), config_file_path : String | Nil = nil) : Config
Source

Instance methods

allow_major_upgrade=(allow_major_upgrade : Bool)
Source
allow_major_upgrade?
Source
container_names
Source
container_names=(container_names : Array(String))
Source
docker_socket_path
Source
docker_socket_path=(docker_socket_path : String)
Source
dry_run=(dry_run : Bool)
Source
dry_run?
Source
interval
Source
interval=(interval : Int32)
Source
log_level
Source
log_level=(log_level : String)
Source
run_once=(run_once : Bool)
Source
run_once?
Source
setup_logging
Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source
validate!
Source