[docker-syncd-invm]: use service dependency in supervisord to start services
This commit is contained in:
parent
82dc8ace12
commit
745f58cde7
@ -24,7 +24,6 @@ RUN dpkg -i \
|
|||||||
debs/{{ deb }}{{' '}}
|
debs/{{ deb }}{{' '}}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
COPY ["start.sh", "/usr/bin/"]
|
|
||||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||||
|
|
||||||
## Clean up
|
## Clean up
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
rm -f /var/run/rsyslogd.pid
|
|
||||||
|
|
||||||
supervisorctl start rsyslogd
|
|
||||||
|
|
||||||
supervisorctl start syncd
|
|
@ -3,26 +3,29 @@ logfile_maxbytes=1MB
|
|||||||
logfile_backups=2
|
logfile_backups=2
|
||||||
nodaemon=true
|
nodaemon=true
|
||||||
|
|
||||||
[program:start.sh]
|
[eventlistener:dependent-startup]
|
||||||
command=/usr/bin/start.sh
|
command=python -m supervisord_dependent_startup
|
||||||
priority=1
|
|
||||||
autostart=true
|
autostart=true
|
||||||
|
autorestart=unexpected
|
||||||
|
startretries=0
|
||||||
|
exitcodes=0,3
|
||||||
|
events=PROCESS_STATE
|
||||||
|
|
||||||
|
[program:rsyslogd]
|
||||||
|
command=/usr/sbin/rsyslogd -n -iNONE
|
||||||
|
priority=1
|
||||||
|
autostart=false
|
||||||
autorestart=false
|
autorestart=false
|
||||||
stdout_logfile=syslog
|
stdout_logfile=syslog
|
||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
|
dependent_startup=true
|
||||||
|
|
||||||
[program:rsyslogd]
|
[program:syncd]
|
||||||
command=/usr/sbin/rsyslogd -n
|
command=/usr/bin/syncd_start.sh
|
||||||
priority=2
|
priority=2
|
||||||
autostart=false
|
autostart=false
|
||||||
autorestart=false
|
autorestart=false
|
||||||
stdout_logfile=syslog
|
stdout_logfile=syslog
|
||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
|
dependent_startup=true
|
||||||
[program:syncd]
|
dependent_startup_wait_for=rsyslogd:running
|
||||||
command=/usr/bin/syncd_start.sh
|
|
||||||
priority=3
|
|
||||||
autostart=false
|
|
||||||
autorestart=false
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
|
Loading…
Reference in New Issue
Block a user