mirror of
https://github.com/zokradonh/kopano-docker.git
synced 2026-08-11 16:32:59 +00:00
Have a dedicate container for z-push (#19)
* remove z-push from webapp image Signed-off-by: Felix Bartels <felix@host-consultants.de> * remove z-push from webapp start script Signed-off-by: Felix Bartels <felix@host-consultants.de> * add container for z-push Signed-off-by: Felix Bartels <felix@host-consultants.de> * adapt version.sh for z-push Signed-off-by: Felix Bartels <felix@host-consultants.de> * ci: committing changes for zpush * tune version.sh for z-push adapt makefile Signed-off-by: Felix Bartels <felix@host-consultants.de> * add z-push to setup script and docker-compose Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
@@ -26,21 +26,13 @@ RUN \
|
||||
# install apt keys if supported kopano
|
||||
if [ ${RELEASE_KEY_DOWNLOAD} -eq 1 ]; then \
|
||||
curl -s -S -o - "${KOPANO_CORE_REPOSITORY_URL}/Release.key" | apt-key add -; \
|
||||
curl -s -S -o - "${KOPANO_WEBAPP_REPOSITORY_URL}/Release.key" | apt-key add -; \
|
||||
fi; \
|
||||
# TODO separate out z-push?
|
||||
# prepare z-push installation
|
||||
echo "deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" > /etc/apt/sources.list.d/zpush.list && \
|
||||
curl -s -S -o - "http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key" | apt-key add - && \
|
||||
# install
|
||||
set -x && \
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
apache2 \
|
||||
libapache2-mod-php7.0 \
|
||||
crudini \
|
||||
z-push-backend-kopano \
|
||||
z-push-config-apache \
|
||||
z-push-ipc-sharedmemory \
|
||||
ca-certificates \
|
||||
kopano-webapp \
|
||||
kopano-webapp-plugin-contactfax \
|
||||
@@ -96,11 +88,6 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||
crudini --set /etc/php/7.0/apache2/php.ini PHP post_max_size 500M && \
|
||||
crudini --set /etc/php/7.0/apache2/php.ini PHP max_input_vars 1800 && \
|
||||
crudini --set /etc/php/7.0/apache2/php.ini Session session.save_path /run/sessions && \
|
||||
# configure z-push
|
||||
mkdir -p /var/lib/z-push /var/log/z-push && \
|
||||
chown www-data:www-data /var/lib/z-push /var/log/z-push
|
||||
|
||||
VOLUME /var/lib/z-push/
|
||||
|
||||
EXPOSE 80/tcp
|
||||
|
||||
|
||||
+1
-20
@@ -2,7 +2,7 @@
|
||||
|
||||
# define default value for serverhostname and serverport if not passed into container
|
||||
KCCONF_SERVERHOSTNAME=${KCCONF_SERVERHOSTNAME:-127.0.0.1}
|
||||
KCCONF_SERVERPORT=${KCCONF_SERVERPORT:-237}
|
||||
KCCONF_SERVERPORT=${KCCONF_SERVERPORT:-236}
|
||||
ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES:-""}
|
||||
|
||||
set -eu # unset variables are errors & non-zero return values exit the whole script
|
||||
@@ -31,28 +31,9 @@ sed \
|
||||
-e "s#define(\"INSECURE_COOKIES\",\s*.*)#define(\"INSECURE_COOKIES\", true)#" \
|
||||
-i /etc/kopano/webapp/config.php
|
||||
|
||||
if [ "$KCCONF_SERVERHOSTNAME" == "127.0.0.1" ]; then
|
||||
echo "Z-Push is using the default: connection"
|
||||
else
|
||||
echo "Z-Push is using an ip connection"
|
||||
sed -e "s#define([\"']MAPI_SERVER[\"'],\s*[\"']default:[\"'])#define('MAPI_SERVER', 'https://${KCCONF_SERVERHOSTNAME}:${KCCONF_SERVERPORT}/kopano')#" \
|
||||
-i /etc/z-push/kopano.conf.php
|
||||
fi
|
||||
|
||||
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', true)#" \
|
||||
-i /etc/z-push/z-push.conf.php
|
||||
|
||||
echo "Ensure config ownership"
|
||||
chown -R www-data:www-data /run/sessions /tmp/webapp
|
||||
|
||||
echo "Activate z-push log rerouting"
|
||||
touch /var/log/z-push/z-push.log
|
||||
touch /var/log/z-push/z-push-error.log
|
||||
chown www-data:www-data /var/log/z-push/z-push.log /var/log/z-push/z-push-error.log
|
||||
tail --pid=$$ -F --lines=0 -q /var/log/z-push/z-push.log &
|
||||
tail --pid=$$ -F --lines=0 -q /var/log/z-push/z-push-error.log &
|
||||
|
||||
echo "Starting Apache"
|
||||
rm -f /run/apache2/apache2.pid
|
||||
set +u
|
||||
|
||||
Reference in New Issue
Block a user