Document to toy around with supervisord
as a means to manage
multiple processes running for a given application during
local dev.
python -m pip install supervisor
# OR: brew install supervisor
(We may consider using a pinned version.)
python -m flask --app app1 run --port 6104
python -m flask --app app2 run --port 7308
supervisord --configuration ./supervisord.conf
supervisorctl --configuration ./supervisord.conf stop all
# app1: stopped
# app2: stopped
supervisorctl --configuration ./supervisord.conf shutdown
# Shut down
Roughly equivalent to docker ps
supervisorctl --configuration ./supervisord.conf status
# app1 RUNNING pid 16735, uptime 0:00:16
# app2 RUNNING pid 16736, uptime 0:00:16
$ supervisorctl --configuration ./supervisord.conf --interactive
app1 STOPPED Jan 07 11:54 PM
app2 STOPPED Jan 07 11:54 PM
mysupervisor> help
default commands (type help <topic>):
=====================================
add exit open reload restart start tail
avail fg pid remove shutdown status update
clear maintail quit reread signal stop version
mysupervisor>