1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-20 21:03:06 +00:00

Subdir renaming (removed prefix)

This commit is contained in:
Andre Zoledziowski
2018-04-16 12:18:10 +02:00
parent 1d7cc13d91
commit 638c299c35
32 changed files with 0 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
ARG BASE_VERSION=latest
FROM zokradonh/kopano_base:${BASE_VERSION}
LABEL maintainer=az@zok.xyz \
version="1.0"
# install kopano
RUN apt-get update && apt-get install -y --no-install-recommends \
kopano-server \
kopano-utils \
&& rm -rf /var/cache/apt /var/lib/apt/lists
ADD configure.py /kopano/configure.py
ADD start.sh /kopano/start.sh
RUN chmod a+x /kopano/start.sh
EXPOSE 237/tcp
CMD [ "/kopano/start.sh" ]
+34
View File
@@ -0,0 +1,34 @@
This image is part of a complete set of kopano docker images:
* zokradonh/kopano_webapp
* zokradonh/kopano_spooler
* zokradonh/kopano_gateway
* zokradonh/kopano_ical
* zokradonh/kopano_dagent
* zokradonh/kopano_monitor
* zokradonh/kopano_search
* zokradonh/kopano_ssl
E-Mail attachment directory is by default in /kopano/data/attachments/ so bind /kopano/data as volume.
You can reconfigure by setting environment variable `KCCONF_SERVER_ATTACHMENT_PATH`.
You can change all server.cfg settings you like prefixed with "`KCCONF_SERVER_`"
So specify "`KCCONF_SERVER_MYSQL_HOST`" for "mysql\_host" setting in "server.cfg".
Or specify "`KCCONF_LDAP_LDAP_SEARCH_BASE`" to set "ldap\_search_base" in "ldap.cfg".
This image activates ActiveDirectory mode (Not OpenLDAP).
So you need an ActiveDirectory already running to use this.
You may try to override default settings with "`KCCONF_*`" options but using OpenLDAP instead of ActiveDirectory will fail due to !include command in ldap.cfg. This docker image does not support any method to edit this file. Create your own Dockerfile to enable OpenLDAP.
For coredumps on crashes kopano-server requires the fs.suid_dumpable sysctl to contain the value 2, not 0.
The docker image kopano_ssl will create certificates for all containers. Those certificates are selfsigned and only for internal Kopano component communication.
kopano_webapp port 80 is meant to be published through a https reverse proxy. MAPI connection for Outlook is also handled over port 80.
Maybe you need to execute `kopano-cli --list-users` once after initial install in the kopano_server container
see https://documentation.kopano.io/kopanocore_administrator_manual/configure_kc_components.html#testing-ldap-configuration
Example:
`docker-compose exec kserver kopano-cli --list-users` (This may last very long without any console output.)
+18
View File
@@ -0,0 +1,18 @@
import os
import kcconf
# Component specific configurations
kcconf.configkopano({
r"/etc/kopano/server.cfg":
{
'log_file': "-",
'log_level': "3",
'attachment_path': "/kopano/data/attachments/",
'user_plugin': "ldap",
'server_listen': "",
'server_listen_tls': "*:237",
}
})
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/etc/kopano/"))
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
set -eu # unset variables are errors & non-zero return values exit the whole script
mkdir -p /kopano/data/attachments /var/run/kopano
echo "Create /etc/kopano/ldap.cfg and prepare" | ts
cp /usr/share/doc/kopano/example-config/ldap.cfg /etc/kopano/ldap.cfg
sed -e "s|^\s*!include /usr/share/kopano/ldap.openldap.cfg|#!include /usr/sharekopano/ldap.openldap.cfg|" \
-e "s|#!include /usr/share/kopano/ldap.active-directory.cfg|!include /usr/share/kopano/ldap.active-directory.cfg|" \
-i /etc/kopano/ldap.cfg
echo "Configure server core" | ts
/usr/bin/python3 /kopano/configure.py
echo "Set config ownership" | ts
chown -R kopano:kopano /kopano/data /run /tmp
echo "Clean old pid files and sockets" | ts
rm -f /var/run/kopano/*
exec /usr/sbin/kopano-server -F