From 863a0e4d067724e0d179682bbd8d2866ee39423c Mon Sep 17 00:00:00 2001 From: andryyy Date: Tue, 13 Jun 2017 23:38:47 +0200 Subject: [PATCH] Finally fix SOGo race condition --- data/Dockerfiles/sogo/Dockerfile | 1 + data/Dockerfiles/sogo/supervisord.conf | 36 ++++++++++++++------------ 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/data/Dockerfiles/sogo/Dockerfile b/data/Dockerfiles/sogo/Dockerfile index adc0f66d..88617816 100644 --- a/data/Dockerfiles/sogo/Dockerfile +++ b/data/Dockerfiles/sogo/Dockerfile @@ -44,6 +44,7 @@ RUN mkdir /usr/share/doc/sogo \ COPY ./reconf-domains.sh / COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf COPY supervisord.conf /etc/supervisor/supervisord.conf +COPY event-listener-ordered-startup.py /usr/local/bin/event-listener-ordered-startup.py CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf diff --git a/data/Dockerfiles/sogo/supervisord.conf b/data/Dockerfiles/sogo/supervisord.conf index dbb2d5a3..1d719096 100644 --- a/data/Dockerfiles/sogo/supervisord.conf +++ b/data/Dockerfiles/sogo/supervisord.conf @@ -6,32 +6,36 @@ command=/usr/sbin/syslog-ng --foreground --no-caps redirect_stderr=true autostart=true stdout_syslog=true - -[program:sogo] -command=sh -c "sleep 3; /usr/sbin/sogod" -user=sogo -autorestart=true -priority=20 - -[program:reconf-domains] -command=/reconf-domains.sh -autorestart=true -priority=10 - -[program:sogo-syslog] -command=/usr/bin/tail -f /var/log/combined.log -stdout_logfile=/dev/fd/1 -stdout_logfile_maxbytes=0 +priority=1 [program:cron] command=/usr/sbin/cron -f autorestart=true +priority=2 [program:sogo-webres] command=/usr/bin/python -u -m SimpleHTTPServer 9192 directory=/usr/lib/GNUstep/SOGo/ user=sogo autorestart=true +priority=4 + +[program:reconf-domains] +command=/reconf-domains.sh +priority=3 +autorestart=true + +[program:sogo] +command=sh -c "sleep 5; /usr/sbin/sogod" +user=sogo +autorestart=true +priority=5 + +[program:sogo-syslog] +command=/usr/bin/tail -f /var/log/combined.log +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 +priority=6 [inet_http_server] port=9191