New system for SOGo to be able to use cronjobs... mail alarms need bug fix from SOGo
parent
dbf2275094
commit
d128d46240
|
@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
ENV GOSU_VERSION 1.9
|
ENV GOSU_VERSION 1.9
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget cron && rm -rf /var/lib/apt/lists/* \
|
&& apt-get update && apt-get install -y --no-install-recommends apt-transport-https ca-certificates wget rsyslog supervisor && rm -rf /var/lib/apt/lists/* \
|
||||||
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
|
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
|
||||||
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
|
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
|
||||||
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \
|
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \
|
||||||
|
@ -16,16 +16,17 @@ RUN set -x \
|
||||||
&& chmod +x /usr/local/bin/gosu \
|
&& chmod +x /usr/local/bin/gosu \
|
||||||
&& gosu nobody true
|
&& gosu nobody true
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-key adv --keyserver keys.gnupg.net --recv-key 0x810273C4 \
|
||||||
&& apt-get -y --force-yes install apt-transport-https \
|
|
||||||
&& apt-key adv --keyserver keys.gnupg.net --recv-key 0x810273C4 \
|
|
||||||
&& echo "deb http://packages.inverse.ca/SOGo/nightly/3/debian/ jessie jessie" > /etc/apt/sources.list.d/sogo.list \
|
&& echo "deb http://packages.inverse.ca/SOGo/nightly/3/debian/ jessie jessie" > /etc/apt/sources.list.d/sogo.list \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get -y --force-yes install sogo sogo-activesync
|
&& apt-get -y --force-yes install sogo sogo-activesync
|
||||||
|
|
||||||
COPY ./docker-entrypoint.sh /
|
COPY ./docker-entrypoint.sh /
|
||||||
|
COPY ./sogo-cron.sh /
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
CMD ["/usr/sbin/sogod"]
|
|
||||||
|
|
||||||
EXPOSE 20000
|
EXPOSE 20000
|
||||||
|
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,6 @@ ${AS_SOGO} defaults write sogod SOGoProfileURL "mysql://${DBUSER}:${DBPASS}@mysq
|
||||||
${AS_SOGO} defaults write sogod OCSFolderInfoURL "mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_folder_info"
|
${AS_SOGO} defaults write sogod OCSFolderInfoURL "mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_folder_info"
|
||||||
${AS_SOGO} defaults write sogod OCSEMailAlarmsFolderURL "mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_alarms_folder"
|
${AS_SOGO} defaults write sogod OCSEMailAlarmsFolderURL "mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_alarms_folder"
|
||||||
${AS_SOGO} defaults write sogod OCSSessionsFolderURL "mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_sessions_folder"
|
${AS_SOGO} defaults write sogod OCSSessionsFolderURL "mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_sessions_folder"
|
||||||
|
${AS_SOGO} defaults write sogod SOGoTimeZone "${TZ}"
|
||||||
|
|
||||||
echo '* * * * * sogo /usr/sbin/sogo-tool expire-sessions 60' > /etc/cron.d/sogo
|
exec "$@"
|
||||||
echo '* * * * * sogo /usr/sbin/sogo-ealarms-notify' >> /etc/cron.d/sogo
|
|
||||||
|
|
||||||
cron
|
|
||||||
|
|
||||||
exec ${AS_SOGO} "$@"
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
/usr/sbin/sogo-tool expire-sessions 60
|
||||||
|
/usr/sbin/sogo-ealarms-notify
|
||||||
|
sleep 60
|
||||||
|
done
|
|
@ -0,0 +1,23 @@
|
||||||
|
[supervisord]
|
||||||
|
nodaemon=true
|
||||||
|
|
||||||
|
[program:rsyslog]
|
||||||
|
command=/usr/sbin/rsyslogd -n
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
redirect_stderr=true
|
||||||
|
|
||||||
|
[program:sogo]
|
||||||
|
command=/usr/sbin/sogod
|
||||||
|
user=sogo
|
||||||
|
autorestart=true
|
||||||
|
|
||||||
|
[program:sogo-syslog]
|
||||||
|
command=/usr/bin/tail -f /var/log/syslog -f /var/log/sogo/sogo.log
|
||||||
|
stdout_logfile=/dev/fd/1
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
|
||||||
|
[program:sogo-cron]
|
||||||
|
command=/sogo-cron.sh
|
||||||
|
user=sogo
|
||||||
|
autorestart=true
|
Loading…
Reference in New Issue