1
0
Fork
You've already forked syslog-stdout
0
No description
  • Python 92.1%
  • Dockerfile 7.9%
Find a file
2017年03月21日 14:14:50 +01:00
example example 2014年08月12日 14:50:39 +02:00
.gitignore example 2014年08月12日 14:50:39 +02:00
LICENSE create (UN)LICENSE, fixes #1 2017年03月21日 14:14:50 +01:00
README.md example 2014年08月12日 14:50:39 +02:00
setup.py initial import 2014年08月12日 14:22:05 +02:00
syslog-stdout.py initial import 2014年08月12日 14:22:05 +02:00

syslog-stdout

Minimalistic syslog which just prints all messages received from /dev/log to standard out. This is useful in docker containers where you don't want to install a full blown syslog daemon, in combination with supervisord/supervisor-stdout.

example Dockerfile:

FROM centos:centos6
RUN yum install -q -y postfix python-setuptools
RUN easy_install supervisor supervisor-stdout syslog-stdout 
ADD supervisord.conf /etc/
CMD python -u /usr/bin/supervisord
EXPOSE 25
RUN postconf -e "inet_interfaces = all"
RUN newaliases

supervisord.conf:

[eventlistener:stdout]
command = supervisor_stdout
buffer_size = 100
events = PROCESS_LOG
result_handler = supervisor_stdout:event_handler
priority = 1
[program:syslog]
command=/usr/bin/syslog-stdout.py
stdout_events_enabled = true
stderr_events_enabled = true
priority = 10
[program:postfix]
process_name = master
directory = /etc/postfix
command = /usr/sbin/postfix -c /etc/postfix start
startsecs = 0
autorestart = false
priority = 50