[SOGo] Revert self-built SOGo

master
andryyy 2018-12-21 19:54:32 +01:00
parent 161a72dc8e
commit e84dec3b56
6 changed files with 27 additions and 222 deletions

View File

@ -4,7 +4,6 @@ LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
ENV LC_ALL C ENV LC_ALL C
ENV GOSU_VERSION 1.9 ENV GOSU_VERSION 1.9
ENV SOGO_VERSION 4.0.4
# Prerequisites # Prerequisites
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
@ -12,6 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \ ca-certificates \
cron \ cron \
gettext \ gettext \
gnupg \
mysql-client \ mysql-client \
supervisor \ supervisor \
syslog-ng \ syslog-ng \
@ -22,102 +22,24 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
psmisc \ psmisc \
wget \ wget \
patch \ patch \
git \
devscripts \
debhelper \
build-essential \
gnustep-make \
gnustep-base-runtime \
libgnustep-base-dev \
libgnustep-base1.24 \
gobjc \
libxml2-dev \
libldap2-dev \
libssl-dev \
zlib1g-dev \
libpq-dev \
default-libmysqlclient-dev \
liblasso3-dev \
libmemcached-dev \
mysql-client \
libcurl4-openssl-dev \
&& rm -rf /var/lib/apt/lists/* \ && 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" \
&& chmod +x /usr/local/bin/gosu \ && chmod +x /usr/local/bin/gosu \
&& gosu nobody true \ && gosu nobody true
&& mkdir /tmp/sogo_build \
&& cd /tmp/sogo_build \ RUN mkdir /usr/share/doc/sogo \
&& git clone -b SOPE-${SOGO_VERSION} https://github.com/inverse-inc/sope.git \ && touch /usr/share/doc/sogo/empty.sh \
&& cd sope \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-key 0x810273C4 \
&& ./configure --enable-xml --enable-mysql --enable-openldap --with-gnustep \ && echo "deb http://packages.inverse.ca/SOGo/nightly/4/debian/ stretch stretch" > /etc/apt/sources.list.d/sogo.list \
&& make -j4 \ && apt-get update && apt-get install -y --force-yes \
&& make install \ sogo \
&& cd /tmp/sogo_build \ sogo-activesync \
&& git clone -b SOGo-${SOGO_VERSION} https://github.com/inverse-inc/sogo.git \
&& cd sogo \
&& ./configure --enable-saml2 \
&& make -j4 \
&& make install \
&& groupadd -g 6000 sogo \
&& useradd -g sogo -u 6000 sogo -d /var/lib/sogo \
&& mkdir -p /usr/local/share/doc/sogo \
&& touch /usr/local/share/doc/sogo/empty.sh \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& echo '* * * * * sogo /usr/local/sbin/sogo-ealarms-notify 2>/dev/null' > /etc/cron.d/sogo \ && echo '* * * * * sogo /usr/sbin/sogo-ealarms-notify 2>/dev/null' > /etc/cron.d/sogo \
&& echo '* * * * * sogo /usr/local/sbin/sogo-tool expire-sessions 60' >> /etc/cron.d/sogo \ && echo '* * * * * sogo /usr/sbin/sogo-tool expire-sessions 60' >> /etc/cron.d/sogo \
&& echo '0 0 * * * sogo /usr/local/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds' >> /etc/cron.d/sogo \ && echo '0 0 * * * sogo /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds' >> /etc/cron.d/sogo \
&& touch /etc/default/locale \ && touch /etc/default/locale
&& echo '/usr/local/lib/sogo' > /etc/ld.so.conf.d/sogo.conf \
&& ldconfig \
&& mkdir -p /var/run/sogo /var/spool/sogo \
&& chown sogo:sogo /var/run/sogo /var/spool/sogo \
&& rm -rf /tmp/* /var/tmp/* /usr/bin/mysql_embedded /usr/bin/mariabackup /tmp/sogo_build \
&& apt-get purge -y libxml2-dev \
libldap2-dev \
libssl-dev \
zlib1g-dev \
libpq-dev \
default-libmysqlclient-dev \
liblasso3-dev \
libmemcached-dev \
libgnustep-base-dev \
libcurl4-openssl-dev \
devscripts \
debhelper \
build-essential \
autoconf \
automake \
autopoint \
autotools-dev \
binutils \
cpp \
cpp-6 \
dh-python \
dpkg-dev \
g++-6 \
gcc-6 \
gobjc-6 \
groff-base \
icu-devtools \
libc-dev-bin \
libc6-dev \
libgcc-6-dev \
libgcrypt20-dev \
libgmp-dev \
libgpg-error-dev \
libhashkit-dev \
libicu-dev \
libidn11-dev \
libnspr4-dev \
libnss3-dev \
libobjc-6-dev \
libp11-kit-dev \
libpcre3-dev \
libsasl2-dev \
libtasn1-6-dev \
linux-libc-dev \
nettle-dev
COPY ./bootstrap-sogo.sh /bootstrap-sogo.sh COPY ./bootstrap-sogo.sh /bootstrap-sogo.sh
COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
@ -130,4 +52,6 @@ RUN chmod +x /bootstrap-sogo.sh \
CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
VOLUME /usr/local/lib/GNUstep/SOGo/ VOLUME /usr/lib/GNUstep/SOGo/
RUN rm -rf /tmp/* /var/tmp/*

View File

@ -171,11 +171,11 @@ chmod 600 /var/lib/sogo/GNUstep/Defaults/sogod.plist
sed -i 's/\/usr\/local\/sbin\/sogo-ealarms-notify/\/usr\/local\/sbin\/sogo-ealarms-notify -p \/etc\/sogo\/sieve.creds/g' /etc/cron.d/sogo sed -i 's/\/usr\/local\/sbin\/sogo-ealarms-notify/\/usr\/local\/sbin\/sogo-ealarms-notify -p \/etc\/sogo\/sieve.creds/g' /etc/cron.d/sogo
# Patch ACLs (comment this out to enable any or authenticated targets for ACL) # Patch ACLs (comment this out to enable any or authenticated targets for ACL)
if patch -sfN --dry-run /usr/local/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff > /dev/null; then if patch -sfN --dry-run /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff > /dev/null; then
patch /usr/local/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff; patch /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff;
fi fi
# Copy logo, if any # Copy logo, if any
[[ -f /etc/sogo/sogo-full.svg ]] && cp /etc/sogo/sogo_full.svg /usr/local/lib/GNUstep/SOGo/WebServerResources/img/sogo-full.svg [[ -f /etc/sogo/sogo-full.svg ]] && cp /etc/sogo/sogo_full.svg /usr/lib/GNUstep/SOGo/WebServerResources/img/sogo-full.svg
exec gosu sogo /usr/local/sbin/sogod exec gosu sogo /usr/sbin/sogod

File diff suppressed because one or more lines are too long

View File

@ -1,103 +0,0 @@
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
(function() {
'use strict';
angular.module('SOGo.Common')
.config(configure)
/**
* @ngInject
*/
configure.$inject = ['$mdThemingProvider'];
function configure($mdThemingProvider) {
// Overwrite values to prevent flipping colors on login screen
$mdThemingProvider.definePalette('mailcow-blue', {
'50': 'E3F2FD',
'100': 'BBDEFB',
'200': '90CAF9',
'300': '64B5F6',
'400': '42A5F5',
'500': '2196F3',
'600': '1E88E5',
'700': '1976D2',
'800': '1565C0',
'900': '0D47A1',
'1000': '0D47A1',
'A100': '82B1FF',
'A200': '448AFF',
'A400': '2979ff',
'A700': '2962ff',
'contrastDefaultColor': 'dark',
'contrastLightColors': ['700', '800', '900'],
'contrastDarkColors': undefined
});
$mdThemingProvider.definePalette('sogo-green', {
'50': 'E3F2FD',
'100': 'BBDEFB',
'200': '90CAF9',
'300': '64B5F6',
'400': '42A5F5',
'500': '2196F3',
'600': '1E88E5',
'700': '1976D2',
'800': '1565C0',
'900': '0D47A1',
'1000': '0D47A1',
'A100': '82B1FF',
'A200': '448AFF',
'A400': '2979ff',
'A700': '2962ff',
'contrastDefaultColor': 'dark',
'contrastLightColors': ['700', '800', '900'],
'contrastDarkColors': undefined
});
$mdThemingProvider.definePalette('default', {
'50': 'E3F2FD',
'100': 'BBDEFB',
'200': '90CAF9',
'300': '64B5F6',
'400': '42A5F5',
'500': '2196F3',
'600': '1E88E5',
'700': '1976D2',
'800': '1565C0',
'900': '0D47A1',
'1000': '0D47A1',
'A100': '82B1FF',
'A200': '448AFF',
'A400': '2979ff',
'A700': '2962ff',
'contrastDefaultColor': 'dark',
'contrastLightColors': ['700', '800', '900'],
'contrastDarkColors': undefined
});
$mdThemingProvider.theme('default')
.primaryPalette('mailcow-blue', {
'default': '700', // top toolbar
'hue-1': '500',
'hue-2': '700', // sidebar toolbar
'hue-3': 'A200'
})
.accentPalette('mailcow-blue', {
'default': '800', // fab buttons
'hue-1': '50', // center list toolbar
'hue-2': '500',
'hue-3': 'A700'
})
.backgroundPalette('grey', {
'default': '50', // center list background
'hue-1': '100',
'hue-2': '200',
'hue-3': '300'
});
$mdThemingProvider.setDefaultTheme('default');
$mdThemingProvider.generateThemesOnDemand(false);
$mdThemingProvider.alwaysWatchTheme(true);
}
})();

View File

@ -170,19 +170,19 @@ server {
} }
location /SOGo.woa/WebServerResources/ { location /SOGo.woa/WebServerResources/ {
alias /usr/local/lib/GNUstep/SOGo/WebServerResources/; alias /usr/lib/GNUstep/SOGo/WebServerResources/;
} }
location /.woa/WebServerResources/ { location /.woa/WebServerResources/ {
alias /usr/local/lib/GNUstep/SOGo/WebServerResources/; alias /usr/lib/GNUstep/SOGo/WebServerResources/;
} }
location /SOGo/WebServerResources/ { location /SOGo/WebServerResources/ {
alias /usr/local/lib/GNUstep/SOGo/WebServerResources/; alias /usr/lib/GNUstep/SOGo/WebServerResources/;
} }
location (^/SOGo/so/ControlPanel/Products/[^/]*UI/Resources/.*\.(jpg|png|gif|css|js)$) { location (^/SOGo/so/ControlPanel/Products/[^/]*UI/Resources/.*\.(jpg|png|gif|css|js)$) {
alias /usr/local/lib/GNUstep/SOGo/$1.SOGo/Resources/$2; alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
} }
include /etc/nginx/conf.d/site.*.custom; include /etc/nginx/conf.d/site.*.custom;

View File

@ -138,7 +138,7 @@ services:
- phpfpm - phpfpm
sogo-mailcow: sogo-mailcow:
image: mailcow/sogo:1.46 image: mailcow/sogo:1.47
build: ./data/Dockerfiles/sogo build: ./data/Dockerfiles/sogo
environment: environment:
- DBNAME=${DBNAME} - DBNAME=${DBNAME}
@ -150,7 +150,7 @@ services:
volumes: volumes:
- ./data/conf/sogo/:/etc/sogo/ - ./data/conf/sogo/:/etc/sogo/
- ./data/web/inc/init_db.inc.php:/init_db.inc.php - ./data/web/inc/init_db.inc.php:/init_db.inc.php
- ./data/conf/sogo/custom-sogo.js:/usr/local/lib/GNUstep/SOGo/WebServerResources/js/custom-sogo.js - ./data/conf/sogo/custom-sogo.js:/usr/lib/GNUstep/SOGo/WebServerResources/js/custom-sogo.js
- mysql-socket-vol-1:/var/run/mysqld/ - mysql-socket-vol-1:/var/run/mysqld/
restart: always restart: always
dns: dns: