Skip to content

Instantly share code, notes, and snippets.

@StoneMoe
Forked from hezhao/myapp.conf
Created September 26, 2019 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StoneMoe/325ff682e8b015d272dd9561f8b563c0 to your computer and use it in GitHub Desktop.
Save StoneMoe/325ff682e8b015d272dd9561f8b563c0 to your computer and use it in GitHub Desktop.
Example supervisor config file /etc/supervisor/conf.d/myapp.conf
[program:myapp]
autostart = true
autorestart = true
command = python /home/pi/myapp.py
environment=SECRET_ID="secret_id",SECRET_KEY="secret_key_avoiding_%_chars"
stdout_logfile = /home/pi/stdout.log
stderr_logfile = /home/pi/stderr.log
startretries = 3
user = pi
$ sudo apt-get install supervisor
$ sudo touch /etc/supervisor/conf.d/myapp.conf
$ sudo supervisorctl start myapp
$ sudo supervisorctl tail myapp
$ sudo supervisorctl status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment