Skip to content

Instantly share code, notes, and snippets.

@dkarchmer
Created April 26, 2016 17:01
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save dkarchmer/52c580477b575c6592f683583f6cf7e1 to your computer and use it in GitHub Desktop.
Save dkarchmer/52c580477b575c6592f683583f6cf7e1 to your computer and use it in GitHub Desktop.
Sample supervisord conf for running a python script in the background
; Assumes dockerfile with:
; ENTRYPOINT ["/usr/bin/supervisord", "-c", "/var/app/supervisord.conf"]
[supervisord]
;logfile=/var/app/logs/ ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=5 ; (num of main logfile rotation backups;default 10)
loglevel=debug ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=true ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)
[program:myprogram]
priority=10
directory=/var/app
command=python myscript.py
user=root
autostart=true
autorestart=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment