supervisord does not directly support dependencies. Your options instead are:
-
Use priorities. Set
priorityforAto a low value and it’ll be started beforeB, and shut down afterB. The default value forpriorityis999.If you put the two programs into one group as well, that’d let you start and stop them in tandem, with the priorities regulating their start and stop order.
-
Write an event listener that listens for
PROCESS_STATESTARTING-to-RUNNINGtransition andSTOPPINGevents forA, then instructsupervisordto start and stopBaccording to those events. HaveAautostart, but disable autostarting forB, so that the event handler controls it.