I've been trying to get these two to start when my docker image starts but they never seem to start.
[supervisord]
nodaemon=true
[program:rsyslog]
command=/bin/bash "service rsyslog start"
[program:haproxy]
command=/bin/bash "service haproxy start"
What command is needed to start both in the order of rsyslog first then haproxy?
This is not going to work because
service ... start
command starts the programm as daemon and sends it in the background. Thesupervisord
can't deal with that rather it needs to start them as subprocess and run them in forground. See here:Here is a “real world” program configuration example from supervisord documentation:
Apache 2.2.6:
Your programm's startup scripts can be a good place to find out how the program starts, for proper configuration.
Some examples are here
However, now I must delay starting haproxy as haproxy requires rsyslog to be started before hand. This however is another problem.
You need to put something like that, just adjust parameters
Regards,