Handling expected supervisord exit codes

Posted by Mulkave on Server Fault See other posts from Server Fault or by Mulkave
Published on 2014-08-23T14:40:37Z Indexed on 2014/08/23 16:23 UTC
Read the original article Hit count: 193

Filed under:
|

I am using supervisord inside a Docker container to manage my running processes and would like to also use it to trigger certain commands - run them once and expect them to exit with 0.

Here's one example:

[program:central-seed-posts]
command = /usr/bin/php /var/www/app/artisan post
autostart = false
autorestart = false
startsecs = 3
startretries = 0
exitcodes = 0
stderr_logfile=/tmp/central/posts-stderr-supervisor.log
stdout_logfile=/tmp/central/posts-stdout-supervisor.log

And I'm using nsenter's docker-enter with supervisorctl start central-seed-posts to trigger it but I would also like to handle a successful exit instead of supervisor telling me ERROR (abnormal termination)

Does it have to do with supervisor events ?

© Server Fault or respective owner

Related posts about centos

Related posts about supervisord