diff --git a/Dockerfile b/Dockerfile index 601d4d3..94515e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,12 +21,17 @@ VOLUME ["/etc/kopano/", "/var/lib/mysql/", "/var/lib/kopano/"] SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update && \ - apt-get install --no-install-recommends -y curl gnupg2 pwgen software-properties-common && \ + apt-get install --no-install-recommends -y curl gnupg2 jq pwgen software-properties-common && \ curl -fsSL $KOPANO_ONE_REPOSITORY_URL/$ONE_VERSION/gpg | apt-key add - && \ add-apt-repository "deb $KOPANO_ONE_REPOSITORY_URL/$ONE_VERSION $(lsb_release -cs) supported" && \ apt-get upgrade -y -o Dpkg::Options::="--force-confold" && \ rm -rf /var/cache/apt /var/lib/apt/lists/* +ENV DOCKERIZE_VERSION v0.14.0 +RUN curl -sfL https://github.com/powerman/dockerize/releases/download/"$DOCKERIZE_VERSION"/dockerize-"$(uname -s)"-"$(uname -m)" \ + | install /dev/stdin /usr/local/bin/dockerize && \ + dockerize --version + RUN apt-get update && \ apt-get install --no-install-recommends -y kopano-one-$ONE_VERSION kopano-smtpstd kopano-kidmd && \ rm -rf /var/cache/apt /var/lib/apt/lists/* && \ diff --git a/runit/kopano-kwebd/run b/runit/kopano-kwebd/run index 140efe9..48f8935 100755 --- a/runit/kopano-kwebd/run +++ b/runit/kopano-kwebd/run @@ -5,6 +5,8 @@ source ../kopano-helper.sh ensure_config kwebd.cfg ensure_dir /etc/kopano/kweb/extra.d +ensure_dir /etc/kopano/webapp +cfgdir=/etc/kopano/webapp tpldir=/etc/kopano.in/webapp ensure_config config.php # read settings from kwebd.cfg into env (emulates systemds EnvironmentFile) sed s/\ *=\ */=/g "/etc/kopano/kwebd.cfg" > /tmp/kweb-env diff --git a/runit/postfix/run b/runit/postfix/run new file mode 100755 index 0000000..d81ae66 --- /dev/null +++ b/runit/postfix/run @@ -0,0 +1,19 @@ +#!/bin/bash +set -euo pipefail +set -x + +if ! kopano-smtpstd status; then + echo "smptst has not yet started" + exit 1 +fi + +/usr/sbin/postfix check + +# configure postfix automatically based on smtpstd configuration +postconf -e virtual_mailbox_domains="$(kopano-smtpstd status --json |jq -r '.domains | join(" ")')" +postconf -e relayhost=[127.0.0.1]:10025 +postconf -e default_transport=smtp +postconf -e relay_transport=smtp + +#exec /usr/lib/postfix/sbin/master -d +exec /usr/sbin/postfix -c /etc/postfix start-fg \ No newline at end of file