41bc074793
One of the motivations for this is to allow the node code to restart nginx once the nginx config files have been written out. Without supervisor, the app code needs to be root. With supervisor, we can just ask supervisor to restart it for us (which helpfully listens for commands in a tcp port 9001). The supervisor configs are crude and need to somehow use environment variables for log file paths and such. %(ENV)s format is supposed to work but doesn't. supervisor is not a daemon because it's easy to start/stop it through run.sh (and Ctrl+C) works nicely during development. We can possibly run it as a daemon once supervisor configs are more stable. nginx is not a daemon anymore because it is run through supervisor. supervisorctl seems to magically connect to supervisor even without passing it -c <conf> file. Not sure how that works.