1
0
mirror of https://github.com/zokradonh/kopano-docker synced 2025-06-07 07:56:12 +00:00

Enforce .editorconfig by running eclint (#213)

* tune .editorconfig for the existing files
* fix reported linting issues
* travis: switch language to node_js to be able to run npm
* travis: build on ubuntu bionic
This commit is contained in:
Felix Bartels 2019-08-12 16:14:45 +02:00 committed by GitHub
parent d901eb05b9
commit fb37723cc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 402 additions and 377 deletions

View File

@ -5,6 +5,25 @@ root = true
[*] [*]
charset = utf-8 charset = utf-8
indent_style = tab
end_of_line = lf end_of_line = lf
trim_trailing_whitespaces = true trim_trailing_whitespaces = true
indent_style = tab
[{*.{yml,yaml},.yamllint}]
indent_style = space
indent_size = 2
[*.{md,txt}]
indent_style = space
trim_trailing_whitespace = false
[Dockerfile*]
indent_style = space
indent_size = 4
[*.py]
indent_style = space
indent_size = 4
[*.ldif]
indent_style = space

View File

@ -1,5 +1,10 @@
sudo: required sudo: required
language: bash dist: bionic
language: node_js
node_js:
- stable
env: env:
global: global:
- HADOLINT_VERSION=1.16.3 - HADOLINT_VERSION=1.16.3
@ -20,6 +25,7 @@ before_install:
- sudo chmod +rx /usr/local/bin/docker-compose - sudo chmod +rx /usr/local/bin/docker-compose
- sudo apt update && sudo apt install -y expect - sudo apt update && sudo apt install -y expect
- sudo pip install --upgrade pip && sudo pip install yamllint - sudo pip install --upgrade pip && sudo pip install yamllint
- npm install -g eclint
install: install:
- make lint - make lint
- "./test.exp" - "./test.exp"

View File

@ -18,17 +18,17 @@ docker_login=${docker_login:-""}
docker_pwd=${docker_pwd:-""} docker_pwd=${docker_pwd:-""}
if [ -z "$docker_login" ]; then if [ -z "$docker_login" ]; then
docker_login="$(<~/.docker-account-user)" docker_login="$(<~/.docker-account-user)"
fi fi
if [ -z "$docker_pwd" ]; then if [ -z "$docker_pwd" ]; then
docker_pwd="$(<~/.docker-account-pwd)" docker_pwd="$(<~/.docker-account-pwd)"
fi fi
image=${1:-""} image=${1:-""}
if [ -z "$image" ]; then if [ -z "$image" ]; then
echo "ERROR: You must specify an image to modify." echo "ERROR: You must specify an image to modify."
exit 1 exit 1
fi fi
# below code is based on https://github.com/moikot/golang-dep/blob/aab3ea8462a19407544f1ce9daa11c3f0924394c/.travis/push.sh # below code is based on https://github.com/moikot/golang-dep/blob/aab3ea8462a19407544f1ce9daa11c3f0924394c/.travis/push.sh
@ -43,41 +43,41 @@ fi
# push_readme "foo/bar" "token" # push_readme "foo/bar" "token"
# #
push_readme() { push_readme() {
declare -r image="${1}" declare -r image="${1}"
declare -r token="${2}" declare -r token="${2}"
declare -r readme="${3}" declare -r readme="${3}"
local code local code
code=$(jq -n --arg msg "$(<"${readme}")" \ code=$(jq -n --arg msg "$(<"${readme}")" \
'{"registry":"registry-1.docker.io","full_description": $msg }' | \ '{"registry":"registry-1.docker.io","full_description": $msg }' | \
curl -s -o /dev/null -L -w "%{http_code}" \ curl -s -o /dev/null -L -w "%{http_code}" \
https://cloud.docker.com/v2/repositories/"${image}"/ \ https://cloud.docker.com/v2/repositories/"${image}"/ \
-d @- -X PATCH \ -d @- -X PATCH \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: JWT ${token}") -H "Authorization: JWT ${token}")
if [[ "${code}" = "200" ]]; then if [[ "${code}" = "200" ]]; then
printf "Successfully pushed README to Docker Hub" printf "Successfully pushed README to Docker Hub"
else else
printf "Unable to push README to Docker Hub, response code: %s\n" "${code}" printf "Unable to push README to Docker Hub, response code: %s\n" "${code}"
exit 1 exit 1
fi fi
local code local code
code=$(jq -n --arg msg "$(head -n 1 "${readme}" | cut -d' ' -f2-)" \ code=$(jq -n --arg msg "$(head -n 1 "${readme}" | cut -d' ' -f2-)" \
'{"registry":"registry-1.docker.io","description": $msg }' | \ '{"registry":"registry-1.docker.io","description": $msg }' | \
curl -s -o /dev/null -L -w "%{http_code}" \ curl -s -o /dev/null -L -w "%{http_code}" \
https://cloud.docker.com/v2/repositories/"${image}"/ \ https://cloud.docker.com/v2/repositories/"${image}"/ \
-d @- -X PATCH \ -d @- -X PATCH \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: JWT ${token}") -H "Authorization: JWT ${token}")
if [[ "${code}" = "200" ]]; then if [[ "${code}" = "200" ]]; then
printf "Successfully pushed description to Docker Hub" printf "Successfully pushed description to Docker Hub"
else else
printf "Unable to push description to Docker Hub, response code: %s\n" "${code}" printf "Unable to push description to Docker Hub, response code: %s\n" "${code}"
exit 1 exit 1
fi fi
} }
# Login into Docker repository # Login into Docker repository
@ -91,5 +91,5 @@ https://hub.docker.com/v2/users/login/ | jq -r .token)
push_readme "${docker_repo}"/kopano_"${image}" "${token}" "${image}"/README.md push_readme "${docker_repo}"/kopano_"${image}" "${token}" "${image}"/README.md
if [ -e "$tmpfile" ]; then if [ -e "$tmpfile" ]; then
rm "$tmpfile" rm "$tmpfile"
fi fi

View File

@ -325,6 +325,7 @@ publish-zpush: tag-zpush
component=zpush make publish-container component=zpush make publish-container
lint: lint:
git ls-files | xargs --max-lines=1 eclint check
grep -rIl '^#![[:blank:]]*/bin/\(bash\|sh\|zsh\)' \ grep -rIl '^#![[:blank:]]*/bin/\(bash\|sh\|zsh\)' \
--exclude-dir=.git --exclude=*.sw? \ --exclude-dir=.git --exclude=*.sw? \
| xargs shellcheck -x | xargs shellcheck -x

View File

@ -1,5 +1,5 @@
# Kopano base image # Kopano base image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_base.svg)](https://microbadger.com/images/zokradonh/kopano_base "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_base.svg)](https://microbadger.com/images/zokradonh/kopano_base "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_base.svg)](https://microbadger.com/images/zokradonh/kopano_base "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_base.svg)](https://microbadger.com/images/zokradonh/kopano_base "Microbadger version")
Common base for Kopano images. Predefines arguments and prepares fetching of Kopano packages and building of a local repository (when using nightly downloads). Common base for Kopano images. Predefines arguments and prepares fetching of Kopano packages and building of a local repository (when using nightly downloads).

View File

@ -6,49 +6,49 @@ set -eu
function urldecode { : "${*//+/ }"; echo -e "${_//%/\\x}"; } function urldecode { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
function version_from_filename { function version_from_filename {
echo "$1" | sed -r 's#[a-z]+-([0-9_.+]+)-.*#\1#' echo "$1" | sed -r 's#[a-z]+-([0-9_.+]+)-.*#\1#'
} }
function h5ai_query { function h5ai_query {
component=${1:-core} component=${1:-core}
distribution=${2:-Debian_9.0} distribution=${2:-Debian_9.0}
filename=$(curl -s -S -L -d "action=get&items%5Bhref%5D=%2Fcommunity%2F$component%3A%2F&items%5Bwhat%5D=1" -H \ filename=$(curl -s -S -L -d "action=get&items%5Bhref%5D=%2Fcommunity%2F$component%3A%2F&items%5Bwhat%5D=1" -H \
"Accept: application/json" https://download.kopano.io/community/ | jq -r '.items[].href' | \ "Accept: application/json" https://download.kopano.io/community/ | jq -r '.items[].href' | \
grep "$distribution-all\|$distribution-amd64" | sed "s#/community/$component:/##") grep "$distribution-all\|$distribution-amd64" | sed "s#/community/$component:/##")
if [ -z "${filename// }" ]; then if [ -z "${filename// }" ]; then
echo "unknown component" echo "unknown component"
exit 1 exit 1
fi fi
filename=$(urldecode "$filename") filename=$(urldecode "$filename")
echo "$filename" echo "$filename"
} }
function dl_and_package_community { function dl_and_package_community {
# take component as first argument and fallback to core if none given # take component as first argument and fallback to core if none given
component=${1:-core} component=${1:-core}
distribution=${2:-Debian_9.0} distribution=${2:-Debian_9.0}
# query community server by h5ai API # query community server by h5ai API
filename=$(h5ai_query "$component" "$distribution") filename=$(h5ai_query "$component" "$distribution")
# download & extract packages # download & extract packages
curl -s -S -L -o "$filename" https://download.kopano.io/community/"$component":/"${filename}" curl -s -S -L -o "$filename" https://download.kopano.io/community/"$component":/"${filename}"
tar xf "$filename" tar xf "$filename"
# save buildversion # save buildversion
currentVersion=$(version_from_filename "$filename") currentVersion=$(version_from_filename "$filename")
echo "$component-$currentVersion" >> /kopano/buildversion echo "$component-$currentVersion" >> /kopano/buildversion
# save disk space # save disk space
rm "$filename" rm "$filename"
mv "${filename%.tar.gz}" "$component" mv "${filename%.tar.gz}" "$component"
# prepare directory to be apt source # prepare directory to be apt source
cd "$component" cd "$component"
apt-ftparchive packages . | gzip -9c > Packages.gz apt-ftparchive packages . | gzip -9c > Packages.gz
cd ".." cd ".."
} }

View File

@ -43,7 +43,7 @@ RUN \
set -x && \ set -x && \
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
kopano-server-packages \ kopano-server-packages \
kopano-grapi kopano-kapid \ kopano-grapi kopano-kapid \
${ADDITIONAL_KOPANO_PACKAGES} \ ${ADDITIONAL_KOPANO_PACKAGES} \
&& \ && \
set +x && \ set +x && \
@ -68,4 +68,4 @@ ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD [ "/kopano/start-service.sh" ] CMD [ "/kopano/start-service.sh" ]
HEALTHCHECK --interval=5m --timeout=60s \ HEALTHCHECK --interval=5m --timeout=60s \
CMD /kopano/healthcheck.sh CMD /kopano/healthcheck.sh

View File

@ -16,7 +16,7 @@ KCCONF_SERVER_MYSQL_HOST=127.0.0.1
| | | | | | | |
General prefix | General prefix |
| | | | | |
Name of the relevant configuration file (server.cfg in this case) Name of the relevant configuration file (server.cfg in this case)
| | | |
Name of the configuration option in the configuration file Name of the configuration option in the configuration file
| |

View File

@ -12,7 +12,7 @@ kcconf.configkopano({
'server_listen': "*:236", 'server_listen': "*:236",
'server_listen_tls': "*:237", 'server_listen_tls': "*:237",
'sync_gab_realtime': "no", 'sync_gab_realtime': "no",
'softdelete_lifetime': "0", 'softdelete_lifetime': "0",
'kcoidc_initialize_timeout': "360" 'kcoidc_initialize_timeout': "360"
} }
}) })

View File

@ -1,7 +1,7 @@
# Kopano kDAV image # Kopano kDAV image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_kdav.svg)](https://microbadger.com/images/zokradonh/kopano_kdav "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_kdav.svg)](https://microbadger.com/images/zokradonh/kopano_kdav "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_kdav.svg)](https://microbadger.com/images/zokradonh/kopano_kdav "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_kdav.svg)](https://microbadger.com/images/zokradonh/kopano_kdav "Microbadger version")
Image to run [Kopano kDAV](https://github.com/kopano-dev/kdav). Image to run [Kopano kDAV](https://github.com/kopano-dev/kdav).
kDAV can be accessed on port 80 with the url ``/kdav``. kDAV can be accessed on port 80 with the url ``/kdav``.

View File

@ -1,29 +1,29 @@
<VirtualHost *:80> <VirtualHost *:80>
DocumentRoot /usr/share/kdav/ DocumentRoot /usr/share/kdav/
LogFormat "%{X-Forwarded-For}i %{%a %b %d %T %Y}t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy LogFormat "%{X-Forwarded-For}i %{%a %b %d %T %Y}t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
ErrorLog "|/bin/cat" ErrorLog "|/bin/cat"
CustomLog "|/bin/cat" proxy CustomLog "|/bin/cat" proxy
RewriteEngine On RewriteEngine On
# redirect well-known url http://sabre.io/dav/service-discovery/ # redirect well-known url http://sabre.io/dav/service-discovery/
# (redirect may need to be done to the absolute external url) # (redirect may need to be done to the absolute external url)
RewriteRule ^/.well-known/carddav$ / [R] RewriteRule ^/.well-known/carddav$ / [R]
RewriteRule ^/.well-known/caldav$ / [R] RewriteRule ^/.well-known/caldav$ / [R]
# This makes every request go to server.php # This makes every request go to server.php
RewriteRule ^/(.*)$ /server.php [L] RewriteRule ^/(.*)$ /server.php [L]
# Output buffering needs to be off, to prevent high memory usage # Output buffering needs to be off, to prevent high memory usage
php_flag output_buffering off php_flag output_buffering off
# This is also to prevent high memory usage # This is also to prevent high memory usage
php_flag always_populate_raw_post_data off php_flag always_populate_raw_post_data off
# SabreDAV is not compatible with mbstring function overloading # SabreDAV is not compatible with mbstring function overloading
php_flag mbstring.func_overload off php_flag mbstring.func_overload off
# set higher limits by default # set higher limits by default
php_value memory_limit 256M php_value memory_limit 256M
php_value max_execution_time 259200 php_value max_execution_time 259200
</VirtualHost> </VirtualHost>

View File

@ -23,7 +23,7 @@ if [ "$KCCONF_SERVERHOSTNAME" == "127.0.0.1" ]; then
else else
echo "kDAV is using an ip connection" echo "kDAV is using an ip connection"
sed -e "s#define([\"']MAPI_SERVER[\"'],\s*[\"']default:[\"'])#define('MAPI_SERVER', 'https://${KCCONF_SERVERHOSTNAME}:${KCCONF_SERVERPORT}/kopano')#" \ sed -e "s#define([\"']MAPI_SERVER[\"'],\s*[\"']default:[\"'])#define('MAPI_SERVER', 'https://${KCCONF_SERVERHOSTNAME}:${KCCONF_SERVERPORT}/kopano')#" \
-i /usr/share/kdav/config.php -i /usr/share/kdav/config.php
fi fi
# change root uri to /kdav # change root uri to /kdav

View File

@ -16,11 +16,11 @@ LABEL maintainer=az@zok.xyz \
org.label-schema.schema-version="1.0" org.label-schema.schema-version="1.0"
RUN apk add --no-cache \ RUN apk add --no-cache \
jq \ jq \
moreutils \ moreutils \
openssl \ openssl \
py-pip \ py-pip \
&& pip install yq==2.7.2 && pip install yq==2.7.2
ENV DOCKERIZE_VERSION v0.6.1 ENV DOCKERIZE_VERSION v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \

View File

@ -1,5 +1,5 @@
# Kopano Konnect image # Kopano Konnect image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_konnect.svg)](https://microbadger.com/images/zokradonh/kopano_konnect "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_konnect.svg)](https://microbadger.com/images/zokradonh/kopano_konnect "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_konnect.svg)](https://microbadger.com/images/zokradonh/kopano_konnect "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_konnect.svg)](https://microbadger.com/images/zokradonh/kopano_konnect "Microbadger version")
Image to run [Kopano Konnect](https://github.com/kopano-dev/konnect). Takes the [official image](https://cloud.docker.com/u/kopano/repository/docker/kopano/konnectd) and extends it for automatic configuration. Image to run [Kopano Konnect](https://github.com/kopano-dev/konnect). Takes the [official image](https://cloud.docker.com/u/kopano/repository/docker/kopano/konnectd) and extends it for automatic configuration.

View File

@ -1,5 +1,5 @@
# Kopano Kwmserver image # Kopano Kwmserver image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_kwmserver.svg)](https://microbadger.com/images/zokradonh/kopano_kwmserver "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_kwmserver.svg)](https://microbadger.com/images/zokradonh/kopano_kwmserver "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_kwmserver.svg)](https://microbadger.com/images/zokradonh/kopano_kwmserver "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_kwmserver.svg)](https://microbadger.com/images/zokradonh/kopano_kwmserver "Microbadger version")
Image to run [Kopano Kwmserver](https://github.com/kopano-dev/kwmserver). Takes the [official image](https://cloud.docker.com/u/kopano/repository/docker/kopano/kwmserverdd) and extends it for automatic configuration. Image to run [Kopano Kwmserver](https://github.com/kopano-dev/kwmserver). Takes the [official image](https://cloud.docker.com/u/kopano/repository/docker/kopano/kwmserverdd) and extends it for automatic configuration.

View File

@ -72,7 +72,7 @@ export registration_conf=/kopano/ssl/konnectd-identifier-registration.yaml
# so the konnect container (since the startup is running as nobody) can write to it. # so the konnect container (since the startup is running as nobody) can write to it.
exec dockerize \ exec dockerize \
-wait http://kopano_konnect:8777/.well-known/openid-configuration \ -wait http://kopano_konnect:8777/.well-known/openid-configuration \
-timeout 360s \ -timeout 360s \
/usr/local/bin/docker-entrypoint.sh serve \ /usr/local/bin/docker-entrypoint.sh serve \
--registration-conf /kopano/ssl/konnectd-identifier-registration.yaml \ --registration-conf /kopano/ssl/konnectd-identifier-registration.yaml \
"$@" "$@"

View File

@ -1,5 +1,5 @@
# Kopano LDAP image # Kopano LDAP image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_ldap.svg)](https://microbadger.com/images/zokradonh/kopano_ldap "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_ldap.svg)](https://microbadger.com/images/zokradonh/kopano_ldap "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_ldap.svg)](https://microbadger.com/images/zokradonh/kopano_ldap "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_ldap.svg)](https://microbadger.com/images/zokradonh/kopano_ldap "Microbadger version")
Image to for an OpenLDAP server that already includes the Kopano LDAP schema. Based on https://github.com/osixia/docker-openldap. Image to for an OpenLDAP server that already includes the Kopano LDAP schema. Based on https://github.com/osixia/docker-openldap.

View File

@ -320,7 +320,7 @@ objectclass ( 1.3.6.1.4.1.47732.1.5.0.0
DESC 'KOPANO: a Kopano Addresslist' DESC 'KOPANO: a Kopano Addresslist'
SUP top STRUCTURAL SUP top STRUCTURAL
MUST ( cn ) MUST ( cn )
MAY ( MAY (
kopanoAccount $ kopanoHidden $ kopanoFilter $ kopanoBase kopanoAccount $ kopanoHidden $ kopanoFilter $ kopanoBase
) )
) )
@ -330,7 +330,7 @@ objectclass ( 1.3.6.1.4.1.47732.1.7.0.0
DESC 'KOPANO: a Kopano dynamic group' DESC 'KOPANO: a Kopano dynamic group'
SUP top STRUCTURAL SUP top STRUCTURAL
MUST ( cn ) MUST ( cn )
MAY ( MAY (
kopanoAccount $ kopanoHidden $ mail $ kopanoAliases $ kopanoFilter $ kopanoBase kopanoAccount $ kopanoHidden $ mail $ kopanoAliases $ kopanoFilter $ kopanoBase
) )
) )

View File

@ -45,9 +45,9 @@ RUN \
set -x && \ set -x && \
# TODO mime-support could be remove once its an official dependency of kopano-kwebd # TODO mime-support could be remove once its an official dependency of kopano-kwebd
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
mime-support \ mime-support \
kopano-kwebd \ kopano-kwebd \
kopano-meet kopano-meet-webapp \ kopano-meet kopano-meet-webapp \
${ADDITIONAL_KOPANO_PACKAGES} \ ${ADDITIONAL_KOPANO_PACKAGES} \
&& \ && \
cp /usr/share/doc/kopano-meet-webapp/config.json.in /usr/share/kopano-kweb/www/config/kopano/meet.json && \ cp /usr/share/doc/kopano-meet-webapp/config.json.in /usr/share/kopano-kweb/www/config/kopano/meet.json && \

View File

@ -1,25 +1,24 @@
# Kopano Kwmserver image # Kopano Kwmserver image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_meet.svg)](https://microbadger.com/images/zokradonh/kopano_meet "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_meet.svg)](https://microbadger.com/images/zokradonh/kopano_meet "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_meet.svg)](https://microbadger.com/images/zokradonh/kopano_meet "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_meet.svg)](https://microbadger.com/images/zokradonh/kopano_meet "Microbadger version")
Image to run [Kopano Meet](https://github.com/Kopano-dev/meet). Image to run [Kopano Meet](https://github.com/Kopano-dev/meet).
## Configuration through environment variables ## Configuration through environment variables
Any additional configuration should be done through environment variables and not done in the actual container. The images working with configuration files (e.g. `kopano_core`, `kopano_webapp`, `kopano_meet`) have a mechanism built in to translate env variables into configuration files. For services that can directly work with env variables (e.g. `kopano_konnect`, ´kopano_kwmserver´) these can be specified directly. Please check the individual `README.md` files for further instructions. Any additional configuration should be done through environment variables and not done in the actual container. The images working with configuration files (e.g. `kopano_core`, `kopano_webapp`, `kopano_meet`) have a mechanism built in to translate env variables into configuration files. For services that can directly work with env variables (e.g. `kopano_konnect`, ´kopano_kwmserver´) these can be specified directly. Please check the individual `README.md` files for further instructions.
Examples of env variables: Examples of env variables:
``` ```
KCCONF_KWEBD_TLS=no KCCONF_KWEBD_TLS=no
^ ^ ^ ^ ^ ^ ^ ^
| | | | | | | |
General prefix | General prefix |
| | | | | |
Name of the relevant configuration file (kwebd.cfg in this case) Name of the relevant configuration file (kwebd.cfg in this case)
| | | |
Name of the configuration option in the configuration file Name of the configuration option in the configuration file
| |
Value of the configuration option Value of the configuration option
``` ```

View File

@ -30,8 +30,8 @@ General prefix | | |
Special value to signal the change should go into config-$identifier.php (located in /etc/kopano/webapp) Special value to signal the change should go into config-$identifier.php (located in /etc/kopano/webapp)
| | | | | |
Identifier for the configuration file (config-$identifier.php) Identifier for the configuration file (config-$identifier.php)
| | | |
Name of the configuration option in the configuration file Name of the configuration option in the configuration file
| |
Value of the configuration option Value of the configuration option
``` ```

View File

@ -1,9 +1,9 @@
# Kopano Playground image # Kopano Playground image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_playground.svg)](https://microbadger.com/images/zokradonh/kopano_playground "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_playground.svg)](https://microbadger.com/images/zokradonh/kopano_playground "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_playground.svg)](https://microbadger.com/images/zokradonh/kopano_playground "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_playground.svg)](https://microbadger.com/images/zokradonh/kopano_playground "Microbadger version")
Example applications to test Konnect and Kapi. Example applications to test Konnect and Kapi.
## What are and how can I use the Kapi Playground and OIDC Playground? ## What are and how can I use the Kapi Playground and OIDC Playground?
This project includes a Docker container to easily inspect the data returned by the Kopano Rest API (KAPI), as well as the OpenID (Connect) Service Provider. To explore these applications you need to pass the URL of the "Issuer" when opening these. For the Kapi Playground this would for example be `https://kopano.demo/kapi-playground/?iss=https://kopano.demo`. For the OIDC Playground it would be `https://kopano.demo/oidc-playground/?discovery_uri=https://kopano.demo/.well-known/openid-configuration&discovery=auto`. This project includes a Docker container to easily inspect the data returned by the Kopano Rest API (KAPI), as well as the OpenID (Connect) Service Provider. To explore these applications you need to pass the URL of the "Issuer" when opening these. For the Kapi Playground this would for example be `https://kopano.demo/kapi-playground/?iss=https://kopano.demo`. For the OIDC Playground it would be `https://kopano.demo/oidc-playground/?discovery_uri=https://kopano.demo/.well-known/openid-configuration&discovery=auto`.

View File

@ -1,18 +1,18 @@
# Kopano Scheduler image # Kopano Scheduler image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_scheduler.svg)](https://microbadger.com/images/zokradonh/kopano_scheduler "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_scheduler.svg)](https://microbadger.com/images/zokradonh/kopano_scheduler "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_scheduler.svg)](https://microbadger.com/images/zokradonh/kopano_scheduler "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_scheduler.svg)](https://microbadger.com/images/zokradonh/kopano_scheduler "Microbadger version")
Service to carry out repeating tasks within the Kopano environment. Takes care of initial user sync on startup and creating the public store. Service to carry out repeating tasks within the Kopano environment. Takes care of initial user sync on startup and creating the public store.
## Recurring tasks and maintenance tasks within Kopano ## Recurring tasks and maintenance tasks within Kopano
There are certain tasks within Kopano that either need to be executed once (like creating the public store when starting a new environment for the first time) or on a regular base (like syncing the internal user list with and external ldap tree). For convinience this project includes a "scheduler" container that will take care of this and that can be dynamically configured through env variables. There are certain tasks within Kopano that either need to be executed once (like creating the public store when starting a new environment for the first time) or on a regular base (like syncing the internal user list with and external ldap tree). For convinience this project includes a "scheduler" container that will take care of this and that can be dynamically configured through env variables.
The container knows two kinds of cron jobs (the crontab syntax is used for actual jobs): The container knows two kinds of cron jobs (the crontab syntax is used for actual jobs):
- `CRON_ZPUSHGAB=0 22 * * * docker exec kopano_zpush z-push-gabsync -a sync` - `CRON_ZPUSHGAB=0 22 * * * docker exec kopano_zpush z-push-gabsync -a sync`
- Jobs prefixed with `CRON_` are executed once at container startup (and container startup will fail if one of the jobs fail) and then at the scheduled time. - Jobs prefixed with `CRON_` are executed once at container startup (and container startup will fail if one of the jobs fail) and then at the scheduled time.
- `CRONDELAYED_KBACKUP=30 1 * * * docker run --rm -it zokradonh/kopano_utils kopano-backup -h` - `CRONDELAYED_KBACKUP=30 1 * * * docker run --rm -it zokradonh/kopano_utils kopano-backup -h`
- Jobs prefixed with `CRONDELAYED_` are only executed at the scheduled time. - Jobs prefixed with `CRONDELAYED_` are only executed at the scheduled time.
Instead of using the internal scheduler one can also just use an existing scheduler (cron on the docker host for example) to execute these tasks. Instead of using the internal scheduler one can also just use an existing scheduler (cron on the docker host for example) to execute these tasks.

View File

@ -1,5 +1,5 @@
# Kopano SSL image # Kopano SSL image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_ssl.svg)](https://microbadger.com/images/zokradonh/kopano_ssl "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_ssl.svg)](https://microbadger.com/images/zokradonh/kopano_ssl "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_ssl.svg)](https://microbadger.com/images/zokradonh/kopano_ssl "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_ssl.svg)](https://microbadger.com/images/zokradonh/kopano_ssl "Microbadger version")
Image to create certificates for all containers. These certificates are selfsigned and are used for internal Kopano component communication. Image to create certificates for all containers. These certificates are selfsigned and are used for internal Kopano component communication.

View File

@ -1,5 +1,5 @@
# Kopano Utils image # Kopano Utils image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_utils.svg)](https://microbadger.com/images/zokradonh/kopano_utils "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_utils.svg)](https://microbadger.com/images/zokradonh/kopano_utils "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_utils.svg)](https://microbadger.com/images/zokradonh/kopano_utils "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_utils.svg)](https://microbadger.com/images/zokradonh/kopano_utils "Microbadger version")
Dedicated image with utilities for Kopano environments (admin, backup, ..). Dedicated image with utilities for Kopano environments (admin, backup, ..).

View File

@ -1,7 +1,7 @@
# Kopano Web image # Kopano Web image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_web.svg)](https://microbadger.com/images/zokradonh/kopano_web "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_web.svg)](https://microbadger.com/images/zokradonh/kopano_web "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_web.svg)](https://microbadger.com/images/zokradonh/kopano_web "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_web.svg)](https://microbadger.com/images/zokradonh/kopano_web "Microbadger version")
Reverse Proxy to securely and with as less configuration effort as possible expose Kopano to the public internet. Reverse Proxy to securely and with as less configuration effort as possible expose Kopano to the public internet.
The `kopano_webapp` container is accessible on port 9080 and serves the WebApp on `/webapp`. The `kopano_webapp` container is accessible on port 9080 and serves the WebApp on `/webapp`.

View File

@ -1,200 +1,200 @@
{%FQDN%}:80, :80 { {%FQDN%}:80, :80 {
redir / https://{host}{uri} redir / https://{host}{uri}
} }
# kweb >=0.7.0 needs the explicit hostname to be set # kweb >=0.7.0 needs the explicit hostname to be set
{%FQDN%}, *:2015, *:443 { {%FQDN%}, *:2015, *:443 {
log stdout log stdout
errors stdout errors stdout
gzip gzip
header / Server kweb header / Server kweb
tls {%EMAIL%} tls {%EMAIL%}
limits { limits {
header 1MB header 1MB
body 50MB body 50MB
} }
redir 302 { redir 302 {
if {path} is / if {path} is /
/ /webapp/ / /webapp/
} }
# Config # Config
proxy /api/config/v1/kopano/meet/ http://kopano_meet:9080/ { proxy /api/config/v1/kopano/meet/ http://kopano_meet:9080/ {
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
transparent transparent
keepalive 100 keepalive 100
} }
# Konnect # Konnect
proxy /upstreams/konnect/ { proxy /upstreams/konnect/ {
without /upstreams/konnect/ without /upstreams/konnect/
upstream kopano_konnect:8777 upstream kopano_konnect:8777
policy least_conn policy least_conn
health_check /health-check health_check /health-check
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
keepalive 100 keepalive 100
transparent transparent
header_downstream Feature-Policy "midi 'none'" header_downstream Feature-Policy "midi 'none'"
header_downstream X-Frame-Options "sameorigin" header_downstream X-Frame-Options "sameorigin"
} }
ratelimit * 100 200 minute { ratelimit * 100 200 minute {
/upstreams/konnect/v1/ /upstreams/konnect/v1/
/signin/v1/identifier/_/ /signin/v1/identifier/_/
whitelist 127.0.0.1/8 whitelist 127.0.0.1/8
} }
rewrite /.well-known/openid-configuration { rewrite /.well-known/openid-configuration {
to /upstreams/konnect/{path} to /upstreams/konnect/{path}
} }
rewrite /konnect/v1/ { rewrite /konnect/v1/ {
to /upstreams/konnect/{path} to /upstreams/konnect/{path}
} }
rewrite /signin/v1/ { rewrite /signin/v1/ {
to /upstreams/konnect/{path} to /upstreams/konnect/{path}
} }
redir /signin /signin/v1/identifier redir /signin /signin/v1/identifier
# Kapi # Kapi
proxy /upstreams/kapi/ { proxy /upstreams/kapi/ {
without /upstreams/kapi/ without /upstreams/kapi/
upstream kopano_kapi:8039 upstream kopano_kapi:8039
policy least_conn policy least_conn
health_check /health-check health_check /health-check
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
keepalive 100 keepalive 100
transparent transparent
websocket websocket
} }
ratelimit * 100 200 minute { ratelimit * 100 200 minute {
/upstreams/kapi/api/ /upstreams/kapi/api/
whitelist 127.0.0.1/8 whitelist 127.0.0.1/8
} }
rewrite /api/gc/v1/ { rewrite /api/gc/v1/ {
to /upstreams/kapi/{path} to /upstreams/kapi/{path}
} }
rewrite /api/pubs/v1/ { rewrite /api/pubs/v1/ {
to /upstreams/kapi/{path} to /upstreams/kapi/{path}
} }
rewrite /api/kvs/v1/ { rewrite /api/kvs/v1/ {
to /upstreams/kapi/{path} to /upstreams/kapi/{path}
} }
# playground for oidc # playground for oidc
proxy /oidc-playground/ http://kopano_playground:8888/ { proxy /oidc-playground/ http://kopano_playground:8888/ {
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
transparent transparent
keepalive 100 keepalive 100
} }
folderish /oidc-playground folderish /oidc-playground
# playground for Kapi # playground for Kapi
proxy /kapi-playground/ http://kopano_playground:8888/ { proxy /kapi-playground/ http://kopano_playground:8888/ {
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
transparent transparent
keepalive 100 keepalive 100
} }
folderish /kapi-playground folderish /kapi-playground
# Kwmserver # Kwmserver
proxy /upstreams/kwmserver/ { proxy /upstreams/kwmserver/ {
without /upstreams/kwmserver/ without /upstreams/kwmserver/
upstream kopano_kwmserver:8778 upstream kopano_kwmserver:8778
policy least_conn policy least_conn
health_check /health-check health_check /health-check
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
keepalive 100 keepalive 100
transparent transparent
websocket websocket
} }
ratelimit * 100 200 minute { ratelimit * 100 200 minute {
/upstreams/kwmserver/ /upstreams/kwmserver/
whitelist 127.0.0.1/8 whitelist 127.0.0.1/8
} }
rewrite /api/kwm/v2/ { rewrite /api/kwm/v2/ {
to /upstreams/kwmserver/{path} to /upstreams/kwmserver/{path}
} }
proxy /meet/ kopano_meet:9080 { proxy /meet/ kopano_meet:9080 {
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
transparent transparent
keepalive 100 keepalive 100
} }
folderish /meet folderish /meet
proxy /webapp/ kopano_webapp:9080 { proxy /webapp/ kopano_webapp:9080 {
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
transparent transparent
keepalive 100 keepalive 100
} }
folderish /webapp folderish /webapp
proxy /Microsoft-Server-ActiveSync kopano_zpush:80 { proxy /Microsoft-Server-ActiveSync kopano_zpush:80 {
transparent transparent
keepalive 0 keepalive 0
timeout 3540s timeout 3540s
} }
proxy /AutoDiscover/AutoDiscover.xml kopano_zpush:80 { proxy /AutoDiscover/AutoDiscover.xml kopano_zpush:80 {
transparent transparent
keepalive 0 keepalive 0
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
} }
proxy /Autodiscover/Autodiscover.xml kopano_zpush:80 { proxy /Autodiscover/Autodiscover.xml kopano_zpush:80 {
transparent transparent
keepalive 0 keepalive 0
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
} }
proxy /autodiscover/autodiscover.xml kopano_zpush:80 { proxy /autodiscover/autodiscover.xml kopano_zpush:80 {
transparent transparent
keepalive 0 keepalive 0
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
} }
proxy /caldav/ kopano_ical:8080 { proxy /caldav/ kopano_ical:8080 {
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
transparent transparent
} }
folderish /caldav folderish /caldav
proxy /kdav/ kopano_kdav:80 { proxy /kdav/ kopano_kdav:80 {
transparent transparent
keepalive 0 keepalive 0
fail_timeout 10s fail_timeout 10s
try_duration 30s try_duration 30s
} }
redir 301 { redir 301 {
/.well-known/carddav /kdav/ /.well-known/carddav /kdav/
/.well-known/caldav /kdav/ /.well-known/caldav /kdav/
} }
proxy /ldap-admin/ ldap-admin:80 { proxy /ldap-admin/ ldap-admin:80 {
without /ldap-admin without /ldap-admin
transparent transparent
} }
redir /ldap-admin /ldap-admin/ redir /ldap-admin /ldap-admin/
proxy /password-reset/ password-self-service:80 { proxy /password-reset/ password-self-service:80 {
without /password-reset without /password-reset
transparent transparent
} }
redir /password-reset /password-reset/ redir /password-reset /password-reset/
} }

View File

@ -1,5 +1,5 @@
# Kopano WebApp image # Kopano WebApp image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_webapp.svg)](https://microbadger.com/images/zokradonh/kopano_webapp "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_webapp.svg)](https://microbadger.com/images/zokradonh/kopano_webapp "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_webapp.svg)](https://microbadger.com/images/zokradonh/kopano_webapp "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_webapp.svg)](https://microbadger.com/images/zokradonh/kopano_webapp "Microbadger version")
Image for Kopano WebApp and its plugins. Please check in the `kopano_php` folder for configuration instructions. Image for Kopano WebApp and its plugins. Please check in the `kopano_php` folder for configuration instructions.

View File

@ -1,7 +1,7 @@
# Kopano Z-Push image # Kopano Z-Push image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_zpush.svg)](https://microbadger.com/images/zokradonh/kopano_zpush "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_zpush.svg)](https://microbadger.com/images/zokradonh/kopano_zpush "Microbadger version") [![](https://images.microbadger.com/badges/image/zokradonh/kopano_zpush.svg)](https://microbadger.com/images/zokradonh/kopano_zpush "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_zpush.svg)](https://microbadger.com/images/zokradonh/kopano_zpush "Microbadger version")
Image for running Z-Push with Kopano. Image for running Z-Push with Kopano.
The `kopano_zpush` container is accessible on port 80 and serves Z-Push on `/Microsoft-Server-ActiveSync` ((additional urls are needed in case auto discover should be used). The `kopano_zpush` container is accessible on port 80 and serves Z-Push on `/Microsoft-Server-ActiveSync` ((additional urls are needed in case auto discover should be used).

View File

@ -1,8 +1,8 @@
<VirtualHost *:80> <VirtualHost *:80>
DocumentRoot /var/www/ DocumentRoot /var/www/
LogFormat "%{X-Forwarded-For}i %{%a %b %d %T %Y}t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy LogFormat "%{X-Forwarded-For}i %{%a %b %d %T %Y}t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
ErrorLog "|/bin/cat" ErrorLog "|/bin/cat"
CustomLog "|/bin/cat" proxy CustomLog "|/bin/cat" proxy
</VirtualHost> </VirtualHost>