Skip to content

Commit

Permalink
Fix supervisor logging (to console instead of syslog)
Browse files Browse the repository at this point in the history
  • Loading branch information
sukrit007 committed Jul 18, 2015
1 parent 94491f3 commit 46724ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ RUN curl -L https://github.com/coreos/etcd/releases/download/$ETCDCTL_VERSION/et
rm -rf /tmp/etcd-$ETCDCTL_VERSION-linux-amd64.tar.gz

#Supervisor Config
RUN pip install supervisor==3.1.2 && mkdir -p /var/log/supervisor
RUN pip install supervisor==3.1.2 supervisor-stdout && \
mkdir -p /var/log/supervisor
ADD bin/supervisord-wrapper.sh /usr/sbin/supervisord-wrapper.sh
RUN chmod +x /usr/sbin/supervisord-wrapper.sh && ln -sf /etc/supervisor/supervisord.conf /etc/supervisord.conf

Expand Down
14 changes: 10 additions & 4 deletions etc/supervisor/conf.d/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ nodaemon=true
command=/usr/sbin/confd-wrapper.sh
autorestart=true
startsecs=5
stderr_logfile=syslog
stdout_logfile=syslog
stdout_events_enabled = true
stderr_events_enabled = true

[program:image-factory]
command=/opt/image-factory/bin/image-factory -D --debug --config /opt/image-factory/config/config-docker.json
autorestart=true
stderr_logfile=syslog
stdout_logfile=syslog
stdout_events_enabled = true
stderr_events_enabled = true
environment=HOME="/root"

[eventlistener:stdout]
command = supervisor_stdout
buffer_size = 100
events = PROCESS_LOG
result_handler = supervisor_stdout:event_handler

0 comments on commit 46724ef

Please sign in to comment.