Logging into stdout to supervisor with docker

I have multiple docker containers that require superload management.

However, I have been unable to get the supervisor to grab the logs and dump them to stdout. It looks like the supervisor doesn't grab their produce and spill it out the way that docker works well. I would like this to be added by the process name or something.

How can i do this? this is not clear from the supervisor's manual.

I would also consider another tool other than supervisor. One drawback is that it is written in python which really bloats docker containers. Along with your solution, if you have one, is there a better tool that works better with docker?

+3


source to share


1 answer


I found a solution using runit.

runit is only slightly harder to set up, but not nearly as significant, and writing is done out of the box.

Basically you just install runit with apt-get install runit

. Then make a copy of the startup file in / etc / service / {servicename} / run The startup file is just a bash script that runs the name of your service. This stdout is captured automatically.



I am having problems writing nginx to stdout and stderr. I followed the recipe that wrote things in nginx.conf. It didn't work. What was simple:

ln -sf /dev/stdout /var/log/nginx/access.log
ln -sf /dev/stderr /var/log/nginx/error.log

      

+3


source







All Articles