mirror of
https://github.com/zokradonh/kopano-docker.git
synced 2026-08-11 16:32:59 +00:00
wip: Implement a scheduler to run recurring tasks (such as z-push-gabsync) (#123)
* add scheduler container for gabsync Adds a general scheduler container to trigger tasks within containers. Also adds gabsync to zpush image * make scheduler dynamic execute each cron job once at startup to see if they would succeed * remove services scripts from core container (now is part of the scheduler) * add "CRONDELAY" for tasks that should not be executed at startup * add documentation * clear out crontab at startup
This commit is contained in:
@@ -45,6 +45,7 @@ RUN \
|
||||
crudini \
|
||||
z-push-kopano \
|
||||
z-push-config-apache \
|
||||
z-push-kopano-gabsync \
|
||||
ca-certificates \
|
||||
${ADDITIONAL_KOPANO_PACKAGES} \
|
||||
&& rm -rf /var/cache/apt /var/lib/apt/lists
|
||||
@@ -73,6 +74,12 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||
mkdir -p /var/lib/z-push /var/log/z-push && \
|
||||
chown www-data:www-data /var/lib/z-push /var/log/z-push
|
||||
|
||||
# Patch Gabsync to make it work
|
||||
# See https://jira.z-hub.io/browse/ZP-1463
|
||||
# https://forum.kopano.io/topic/1928/8-7-80-missing-php-files-in-php-mapi-deb-package-ubuntu-16-04
|
||||
# can be removed once gabsync is fixed - should not hurt
|
||||
RUN sed -i -e "s/set_include_path(get_include_path() . PATH_SEPARATOR . BASE_PATH_CLI);/define('PATH_TO_ZPUSH', '..\/..\/backend\/kopano\/');\n set_include_path(get_include_path() . PATH_SEPARATOR . BASE_PATH_CLI . PATH_SEPARATOR . BASE_PATH_CLI . PATH_TO_ZPUSH);/" /usr/share/z-push/tools/gab-sync/gab-sync.php
|
||||
|
||||
VOLUME /var/lib/z-push/
|
||||
|
||||
EXPOSE 80/tcp
|
||||
|
||||
@@ -30,6 +30,9 @@ echo "Configuring Z-Push for use behind a reverse proxy"
|
||||
sed -e "s#define([\"']USE_CUSTOM_REMOTE_IP_HEADER[\"'],\s*false)#define('USE_CUSTOM_REMOTE_IP_HEADER', 'HTTP_X_FORWARDED_FOR')#" \
|
||||
-i /etc/z-push/z-push.conf.php
|
||||
|
||||
sed -e "s#define([\"']USERNAME[\"'],\s*'')#define('USERNAME', 'SYSTEM')#" \
|
||||
-i /etc/z-push/gabsync.conf.php
|
||||
|
||||
echo "Ensure config ownership"
|
||||
chown -R www-data:www-data /run/sessions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user