Supervisord
supervisord is a process manager, mainly useful in Docker or Podman containers.
Installation
Most container base images will have a supervisord package available.
Configuration
The below configuration demonstrates starting a process that forks itself (crond(8)-see Cron) and starting a process through the userspace utility (Postfix).
[supervisord] childlogdir=/var/log/supervisord logfile=/dev/stderr logfile_maxbytes=0 nodaemon=true user=root [program:crond] autostart=true command=crond -f -l 2 redirect_stderr=true [program:postfix] autorestart=false command=postfix start startsecs=0 redirect_stderr=true
Log to stderr
To redirect logging, set the logfile option within the [supervisord] section. If the logfile is a non-searchable pseudofile (such as /dev/stderr), then logfile_maxbytes must be set to 0.
[supervisord] logfile=/dev/stderr logfile_maxbytes=0