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:
parent
d901eb05b9
commit
fb37723cc3
@ -5,6 +5,25 @@ root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = tab
|
||||
end_of_line = lf
|
||||
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
|
||||
|
@ -1,5 +1,10 @@
|
||||
sudo: required
|
||||
language: bash
|
||||
dist: bionic
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- stable
|
||||
|
||||
env:
|
||||
global:
|
||||
- HADOLINT_VERSION=1.16.3
|
||||
@ -20,6 +25,7 @@ before_install:
|
||||
- sudo chmod +rx /usr/local/bin/docker-compose
|
||||
- sudo apt update && sudo apt install -y expect
|
||||
- sudo pip install --upgrade pip && sudo pip install yamllint
|
||||
- npm install -g eclint
|
||||
install:
|
||||
- make lint
|
||||
- "./test.exp"
|
||||
|
@ -18,17 +18,17 @@ docker_login=${docker_login:-""}
|
||||
docker_pwd=${docker_pwd:-""}
|
||||
|
||||
if [ -z "$docker_login" ]; then
|
||||
docker_login="$(<~/.docker-account-user)"
|
||||
docker_login="$(<~/.docker-account-user)"
|
||||
fi
|
||||
|
||||
if [ -z "$docker_pwd" ]; then
|
||||
docker_pwd="$(<~/.docker-account-pwd)"
|
||||
docker_pwd="$(<~/.docker-account-pwd)"
|
||||
fi
|
||||
|
||||
image=${1:-""}
|
||||
if [ -z "$image" ]; then
|
||||
echo "ERROR: You must specify an image to modify."
|
||||
exit 1
|
||||
echo "ERROR: You must specify an image to modify."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 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() {
|
||||
declare -r image="${1}"
|
||||
declare -r token="${2}"
|
||||
declare -r readme="${3}"
|
||||
declare -r image="${1}"
|
||||
declare -r token="${2}"
|
||||
declare -r readme="${3}"
|
||||
|
||||
local code
|
||||
code=$(jq -n --arg msg "$(<"${readme}")" \
|
||||
'{"registry":"registry-1.docker.io","full_description": $msg }' | \
|
||||
curl -s -o /dev/null -L -w "%{http_code}" \
|
||||
https://cloud.docker.com/v2/repositories/"${image}"/ \
|
||||
-d @- -X PATCH \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: JWT ${token}")
|
||||
local code
|
||||
code=$(jq -n --arg msg "$(<"${readme}")" \
|
||||
'{"registry":"registry-1.docker.io","full_description": $msg }' | \
|
||||
curl -s -o /dev/null -L -w "%{http_code}" \
|
||||
https://cloud.docker.com/v2/repositories/"${image}"/ \
|
||||
-d @- -X PATCH \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: JWT ${token}")
|
||||
|
||||
if [[ "${code}" = "200" ]]; then
|
||||
printf "Successfully pushed README to Docker Hub"
|
||||
else
|
||||
printf "Unable to push README to Docker Hub, response code: %s\n" "${code}"
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${code}" = "200" ]]; then
|
||||
printf "Successfully pushed README to Docker Hub"
|
||||
else
|
||||
printf "Unable to push README to Docker Hub, response code: %s\n" "${code}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local code
|
||||
code=$(jq -n --arg msg "$(head -n 1 "${readme}" | cut -d' ' -f2-)" \
|
||||
'{"registry":"registry-1.docker.io","description": $msg }' | \
|
||||
curl -s -o /dev/null -L -w "%{http_code}" \
|
||||
https://cloud.docker.com/v2/repositories/"${image}"/ \
|
||||
-d @- -X PATCH \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: JWT ${token}")
|
||||
local code
|
||||
code=$(jq -n --arg msg "$(head -n 1 "${readme}" | cut -d' ' -f2-)" \
|
||||
'{"registry":"registry-1.docker.io","description": $msg }' | \
|
||||
curl -s -o /dev/null -L -w "%{http_code}" \
|
||||
https://cloud.docker.com/v2/repositories/"${image}"/ \
|
||||
-d @- -X PATCH \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: JWT ${token}")
|
||||
|
||||
if [[ "${code}" = "200" ]]; then
|
||||
printf "Successfully pushed description to Docker Hub"
|
||||
else
|
||||
printf "Unable to push description to Docker Hub, response code: %s\n" "${code}"
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${code}" = "200" ]]; then
|
||||
printf "Successfully pushed description to Docker Hub"
|
||||
else
|
||||
printf "Unable to push description to Docker Hub, response code: %s\n" "${code}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# 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
|
||||
|
||||
if [ -e "$tmpfile" ]; then
|
||||
rm "$tmpfile"
|
||||
rm "$tmpfile"
|
||||
fi
|
||||
|
1
Makefile
1
Makefile
@ -325,6 +325,7 @@ publish-zpush: tag-zpush
|
||||
component=zpush make publish-container
|
||||
|
||||
lint:
|
||||
git ls-files | xargs --max-lines=1 eclint check
|
||||
grep -rIl '^#![[:blank:]]*/bin/\(bash\|sh\|zsh\)' \
|
||||
--exclude-dir=.git --exclude=*.sw? \
|
||||
| xargs shellcheck -x
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Kopano base image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_base "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_base "Microbadger version")
|
||||
|
||||
# Kopano base image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_base "Microbadger size/labels") [](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).
|
@ -6,49 +6,49 @@ set -eu
|
||||
function urldecode { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||
|
||||
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 {
|
||||
component=${1:-core}
|
||||
distribution=${2:-Debian_9.0}
|
||||
component=${1:-core}
|
||||
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 \
|
||||
"Accept: application/json" https://download.kopano.io/community/ | jq -r '.items[].href' | \
|
||||
grep "$distribution-all\|$distribution-amd64" | sed "s#/community/$component:/##")
|
||||
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' | \
|
||||
grep "$distribution-all\|$distribution-amd64" | sed "s#/community/$component:/##")
|
||||
|
||||
if [ -z "${filename// }" ]; then
|
||||
echo "unknown component"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${filename// }" ]; then
|
||||
echo "unknown component"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
filename=$(urldecode "$filename")
|
||||
echo "$filename"
|
||||
filename=$(urldecode "$filename")
|
||||
echo "$filename"
|
||||
}
|
||||
|
||||
function dl_and_package_community {
|
||||
# take component as first argument and fallback to core if none given
|
||||
component=${1:-core}
|
||||
distribution=${2:-Debian_9.0}
|
||||
# take component as first argument and fallback to core if none given
|
||||
component=${1:-core}
|
||||
distribution=${2:-Debian_9.0}
|
||||
|
||||
# query community server by h5ai API
|
||||
filename=$(h5ai_query "$component" "$distribution")
|
||||
# query community server by h5ai API
|
||||
filename=$(h5ai_query "$component" "$distribution")
|
||||
|
||||
# download & extract packages
|
||||
curl -s -S -L -o "$filename" https://download.kopano.io/community/"$component":/"${filename}"
|
||||
tar xf "$filename"
|
||||
# download & extract packages
|
||||
curl -s -S -L -o "$filename" https://download.kopano.io/community/"$component":/"${filename}"
|
||||
tar xf "$filename"
|
||||
|
||||
# save buildversion
|
||||
currentVersion=$(version_from_filename "$filename")
|
||||
echo "$component-$currentVersion" >> /kopano/buildversion
|
||||
# save buildversion
|
||||
currentVersion=$(version_from_filename "$filename")
|
||||
echo "$component-$currentVersion" >> /kopano/buildversion
|
||||
|
||||
# save disk space
|
||||
rm "$filename"
|
||||
# save disk space
|
||||
rm "$filename"
|
||||
|
||||
mv "${filename%.tar.gz}" "$component"
|
||||
mv "${filename%.tar.gz}" "$component"
|
||||
|
||||
# prepare directory to be apt source
|
||||
cd "$component"
|
||||
apt-ftparchive packages . | gzip -9c > Packages.gz
|
||||
cd ".."
|
||||
# prepare directory to be apt source
|
||||
cd "$component"
|
||||
apt-ftparchive packages . | gzip -9c > Packages.gz
|
||||
cd ".."
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ RUN \
|
||||
set -x && \
|
||||
apt-get install --no-install-recommends -y \
|
||||
kopano-server-packages \
|
||||
kopano-grapi kopano-kapid \
|
||||
kopano-grapi kopano-kapid \
|
||||
${ADDITIONAL_KOPANO_PACKAGES} \
|
||||
&& \
|
||||
set +x && \
|
||||
@ -68,4 +68,4 @@ ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
CMD [ "/kopano/start-service.sh" ]
|
||||
|
||||
HEALTHCHECK --interval=5m --timeout=60s \
|
||||
CMD /kopano/healthcheck.sh
|
||||
CMD /kopano/healthcheck.sh
|
||||
|
@ -16,7 +16,7 @@ KCCONF_SERVER_MYSQL_HOST=127.0.0.1
|
||||
| | | |
|
||||
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
|
||||
|
|
||||
|
@ -12,7 +12,7 @@ kcconf.configkopano({
|
||||
'server_listen': "*:236",
|
||||
'server_listen_tls': "*:237",
|
||||
'sync_gab_realtime': "no",
|
||||
'softdelete_lifetime': "0",
|
||||
'softdelete_lifetime': "0",
|
||||
'kcoidc_initialize_timeout': "360"
|
||||
}
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Kopano kDAV image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_kdav "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_kdav "Microbadger version")
|
||||
|
||||
Image to run [Kopano kDAV](https://github.com/kopano-dev/kdav).
|
||||
|
||||
# Kopano kDAV image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_kdav "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_kdav "Microbadger version")
|
||||
|
||||
Image to run [Kopano kDAV](https://github.com/kopano-dev/kdav).
|
||||
|
||||
kDAV can be accessed on port 80 with the url ``/kdav``.
|
@ -1,29 +1,29 @@
|
||||
<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
|
||||
ErrorLog "|/bin/cat"
|
||||
CustomLog "|/bin/cat" proxy
|
||||
LogFormat "%{X-Forwarded-For}i %{%a %b %d %T %Y}t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
|
||||
ErrorLog "|/bin/cat"
|
||||
CustomLog "|/bin/cat" proxy
|
||||
|
||||
RewriteEngine On
|
||||
# redirect well-known url http://sabre.io/dav/service-discovery/
|
||||
# (redirect may need to be done to the absolute external url)
|
||||
RewriteRule ^/.well-known/carddav$ / [R]
|
||||
RewriteRule ^/.well-known/caldav$ / [R]
|
||||
# This makes every request go to server.php
|
||||
RewriteRule ^/(.*)$ /server.php [L]
|
||||
RewriteEngine On
|
||||
# redirect well-known url http://sabre.io/dav/service-discovery/
|
||||
# (redirect may need to be done to the absolute external url)
|
||||
RewriteRule ^/.well-known/carddav$ / [R]
|
||||
RewriteRule ^/.well-known/caldav$ / [R]
|
||||
# This makes every request go to server.php
|
||||
RewriteRule ^/(.*)$ /server.php [L]
|
||||
|
||||
# Output buffering needs to be off, to prevent high memory usage
|
||||
php_flag output_buffering off
|
||||
# Output buffering needs to be off, to prevent high memory usage
|
||||
php_flag output_buffering off
|
||||
|
||||
# This is also to prevent high memory usage
|
||||
php_flag always_populate_raw_post_data off
|
||||
# This is also to prevent high memory usage
|
||||
php_flag always_populate_raw_post_data off
|
||||
|
||||
# SabreDAV is not compatible with mbstring function overloading
|
||||
php_flag mbstring.func_overload off
|
||||
# SabreDAV is not compatible with mbstring function overloading
|
||||
php_flag mbstring.func_overload off
|
||||
|
||||
# set higher limits by default
|
||||
php_value memory_limit 256M
|
||||
php_value max_execution_time 259200
|
||||
# set higher limits by default
|
||||
php_value memory_limit 256M
|
||||
php_value max_execution_time 259200
|
||||
|
||||
</VirtualHost>
|
||||
|
@ -23,7 +23,7 @@ if [ "$KCCONF_SERVERHOSTNAME" == "127.0.0.1" ]; then
|
||||
else
|
||||
echo "kDAV is using an ip connection"
|
||||
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
|
||||
|
||||
# change root uri to /kdav
|
||||
|
@ -16,11 +16,11 @@ LABEL maintainer=az@zok.xyz \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
RUN apk add --no-cache \
|
||||
jq \
|
||||
moreutils \
|
||||
openssl \
|
||||
py-pip \
|
||||
&& pip install yq==2.7.2
|
||||
jq \
|
||||
moreutils \
|
||||
openssl \
|
||||
py-pip \
|
||||
&& pip install yq==2.7.2
|
||||
|
||||
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 \
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Kopano Konnect image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_konnect "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_konnect "Microbadger version")
|
||||
|
||||
# Kopano Konnect image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_konnect "Microbadger size/labels") [](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.
|
@ -1,5 +1,5 @@
|
||||
# Kopano Kwmserver image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_kwmserver "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_kwmserver "Microbadger version")
|
||||
|
||||
# Kopano Kwmserver image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_kwmserver "Microbadger size/labels") [](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.
|
@ -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.
|
||||
exec dockerize \
|
||||
-wait http://kopano_konnect:8777/.well-known/openid-configuration \
|
||||
-timeout 360s \
|
||||
-timeout 360s \
|
||||
/usr/local/bin/docker-entrypoint.sh serve \
|
||||
--registration-conf /kopano/ssl/konnectd-identifier-registration.yaml \
|
||||
"$@"
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Kopano LDAP image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_ldap "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_ldap "Microbadger version")
|
||||
|
||||
# Kopano LDAP image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_ldap "Microbadger size/labels") [](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.
|
@ -320,7 +320,7 @@ objectclass ( 1.3.6.1.4.1.47732.1.5.0.0
|
||||
DESC 'KOPANO: a Kopano Addresslist'
|
||||
SUP top STRUCTURAL
|
||||
MUST ( cn )
|
||||
MAY (
|
||||
MAY (
|
||||
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'
|
||||
SUP top STRUCTURAL
|
||||
MUST ( cn )
|
||||
MAY (
|
||||
MAY (
|
||||
kopanoAccount $ kopanoHidden $ mail $ kopanoAliases $ kopanoFilter $ kopanoBase
|
||||
)
|
||||
)
|
||||
|
@ -45,9 +45,9 @@ RUN \
|
||||
set -x && \
|
||||
# TODO mime-support could be remove once its an official dependency of kopano-kwebd
|
||||
apt-get install --no-install-recommends -y \
|
||||
mime-support \
|
||||
mime-support \
|
||||
kopano-kwebd \
|
||||
kopano-meet kopano-meet-webapp \
|
||||
kopano-meet kopano-meet-webapp \
|
||||
${ADDITIONAL_KOPANO_PACKAGES} \
|
||||
&& \
|
||||
cp /usr/share/doc/kopano-meet-webapp/config.json.in /usr/share/kopano-kweb/www/config/kopano/meet.json && \
|
||||
|
@ -1,25 +1,24 @@
|
||||
# Kopano Kwmserver image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_meet "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_meet "Microbadger version")
|
||||
|
||||
Image to run [Kopano Meet](https://github.com/Kopano-dev/meet).
|
||||
|
||||
## 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.
|
||||
|
||||
Examples of env variables:
|
||||
|
||||
```
|
||||
KCCONF_KWEBD_TLS=no
|
||||
^ ^ ^ ^
|
||||
| | | |
|
||||
General prefix |
|
||||
| | |
|
||||
Name of the relevant configuration file (kwebd.cfg in this case)
|
||||
| |
|
||||
Name of the configuration option in the configuration file
|
||||
|
|
||||
Value of the configuration option
|
||||
|
||||
# Kopano Kwmserver image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_meet "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_meet "Microbadger version")
|
||||
|
||||
Image to run [Kopano Meet](https://github.com/Kopano-dev/meet).
|
||||
|
||||
## 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.
|
||||
|
||||
Examples of env variables:
|
||||
|
||||
```
|
||||
KCCONF_KWEBD_TLS=no
|
||||
^ ^ ^ ^
|
||||
| | | |
|
||||
General prefix |
|
||||
| | |
|
||||
Name of the relevant configuration file (kwebd.cfg in this case)
|
||||
| |
|
||||
Name of the configuration option in the configuration file
|
||||
|
|
||||
Value of the configuration option
|
||||
```
|
@ -30,8 +30,8 @@ General prefix | | |
|
||||
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)
|
||||
| |
|
||||
Name of the configuration option in the configuration file
|
||||
| |
|
||||
Name of the configuration option in the configuration file
|
||||
|
|
||||
Value of the configuration option
|
||||
```
|
@ -1,9 +1,9 @@
|
||||
# Kopano Playground image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_playground "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_playground "Microbadger version")
|
||||
|
||||
Example applications to test Konnect and Kapi.
|
||||
|
||||
## What are and how can I use the Kapi Playground and OIDC Playground?
|
||||
|
||||
# Kopano Playground image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_playground "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_playground "Microbadger version")
|
||||
|
||||
Example applications to test Konnect and Kapi.
|
||||
|
||||
## 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`.
|
@ -1,18 +1,18 @@
|
||||
# Kopano Scheduler image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_scheduler "Microbadger size/labels") [](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.
|
||||
|
||||
## 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.
|
||||
|
||||
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`
|
||||
- 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`
|
||||
- Jobs prefixed with `CRONDELAYED_` are only executed at the scheduled time.
|
||||
|
||||
# Kopano Scheduler image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_scheduler "Microbadger size/labels") [](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.
|
||||
|
||||
## 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.
|
||||
|
||||
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`
|
||||
- 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`
|
||||
- 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.
|
@ -1,5 +1,5 @@
|
||||
# Kopano SSL image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_ssl "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_ssl "Microbadger version")
|
||||
|
||||
# Kopano SSL image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_ssl "Microbadger size/labels") [](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.
|
@ -1,5 +1,5 @@
|
||||
# Kopano Utils image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_utils "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_utils "Microbadger version")
|
||||
|
||||
# Kopano Utils image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_utils "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_utils "Microbadger version")
|
||||
|
||||
Dedicated image with utilities for Kopano environments (admin, backup, ..).
|
@ -1,7 +1,7 @@
|
||||
# Kopano Web image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_web "Microbadger size/labels") [](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.
|
||||
|
||||
# Kopano Web image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_web "Microbadger size/labels") [](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.
|
||||
|
||||
The `kopano_webapp` container is accessible on port 9080 and serves the WebApp on `/webapp`.
|
344
web/kweb.cfg
344
web/kweb.cfg
@ -1,200 +1,200 @@
|
||||
{%FQDN%}:80, :80 {
|
||||
redir / https://{host}{uri}
|
||||
redir / https://{host}{uri}
|
||||
}
|
||||
|
||||
# kweb >=0.7.0 needs the explicit hostname to be set
|
||||
{%FQDN%}, *:2015, *:443 {
|
||||
log stdout
|
||||
errors stdout
|
||||
log stdout
|
||||
errors stdout
|
||||
|
||||
gzip
|
||||
header / Server kweb
|
||||
gzip
|
||||
header / Server kweb
|
||||
|
||||
tls {%EMAIL%}
|
||||
tls {%EMAIL%}
|
||||
|
||||
limits {
|
||||
header 1MB
|
||||
body 50MB
|
||||
}
|
||||
limits {
|
||||
header 1MB
|
||||
body 50MB
|
||||
}
|
||||
|
||||
redir 302 {
|
||||
if {path} is /
|
||||
/ /webapp/
|
||||
}
|
||||
redir 302 {
|
||||
if {path} is /
|
||||
/ /webapp/
|
||||
}
|
||||
|
||||
# Config
|
||||
proxy /api/config/v1/kopano/meet/ http://kopano_meet:9080/ {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
keepalive 100
|
||||
}
|
||||
# Config
|
||||
proxy /api/config/v1/kopano/meet/ http://kopano_meet:9080/ {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
keepalive 100
|
||||
}
|
||||
|
||||
# Konnect
|
||||
proxy /upstreams/konnect/ {
|
||||
without /upstreams/konnect/
|
||||
upstream kopano_konnect:8777
|
||||
policy least_conn
|
||||
health_check /health-check
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
keepalive 100
|
||||
transparent
|
||||
header_downstream Feature-Policy "midi 'none'"
|
||||
header_downstream X-Frame-Options "sameorigin"
|
||||
}
|
||||
ratelimit * 100 200 minute {
|
||||
/upstreams/konnect/v1/
|
||||
/signin/v1/identifier/_/
|
||||
whitelist 127.0.0.1/8
|
||||
}
|
||||
rewrite /.well-known/openid-configuration {
|
||||
to /upstreams/konnect/{path}
|
||||
}
|
||||
rewrite /konnect/v1/ {
|
||||
to /upstreams/konnect/{path}
|
||||
}
|
||||
rewrite /signin/v1/ {
|
||||
to /upstreams/konnect/{path}
|
||||
}
|
||||
redir /signin /signin/v1/identifier
|
||||
# Konnect
|
||||
proxy /upstreams/konnect/ {
|
||||
without /upstreams/konnect/
|
||||
upstream kopano_konnect:8777
|
||||
policy least_conn
|
||||
health_check /health-check
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
keepalive 100
|
||||
transparent
|
||||
header_downstream Feature-Policy "midi 'none'"
|
||||
header_downstream X-Frame-Options "sameorigin"
|
||||
}
|
||||
ratelimit * 100 200 minute {
|
||||
/upstreams/konnect/v1/
|
||||
/signin/v1/identifier/_/
|
||||
whitelist 127.0.0.1/8
|
||||
}
|
||||
rewrite /.well-known/openid-configuration {
|
||||
to /upstreams/konnect/{path}
|
||||
}
|
||||
rewrite /konnect/v1/ {
|
||||
to /upstreams/konnect/{path}
|
||||
}
|
||||
rewrite /signin/v1/ {
|
||||
to /upstreams/konnect/{path}
|
||||
}
|
||||
redir /signin /signin/v1/identifier
|
||||
|
||||
# Kapi
|
||||
proxy /upstreams/kapi/ {
|
||||
without /upstreams/kapi/
|
||||
upstream kopano_kapi:8039
|
||||
policy least_conn
|
||||
health_check /health-check
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
keepalive 100
|
||||
transparent
|
||||
websocket
|
||||
}
|
||||
ratelimit * 100 200 minute {
|
||||
/upstreams/kapi/api/
|
||||
whitelist 127.0.0.1/8
|
||||
}
|
||||
rewrite /api/gc/v1/ {
|
||||
to /upstreams/kapi/{path}
|
||||
}
|
||||
rewrite /api/pubs/v1/ {
|
||||
to /upstreams/kapi/{path}
|
||||
}
|
||||
rewrite /api/kvs/v1/ {
|
||||
to /upstreams/kapi/{path}
|
||||
}
|
||||
# Kapi
|
||||
proxy /upstreams/kapi/ {
|
||||
without /upstreams/kapi/
|
||||
upstream kopano_kapi:8039
|
||||
policy least_conn
|
||||
health_check /health-check
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
keepalive 100
|
||||
transparent
|
||||
websocket
|
||||
}
|
||||
ratelimit * 100 200 minute {
|
||||
/upstreams/kapi/api/
|
||||
whitelist 127.0.0.1/8
|
||||
}
|
||||
rewrite /api/gc/v1/ {
|
||||
to /upstreams/kapi/{path}
|
||||
}
|
||||
rewrite /api/pubs/v1/ {
|
||||
to /upstreams/kapi/{path}
|
||||
}
|
||||
rewrite /api/kvs/v1/ {
|
||||
to /upstreams/kapi/{path}
|
||||
}
|
||||
|
||||
# playground for oidc
|
||||
proxy /oidc-playground/ http://kopano_playground:8888/ {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
keepalive 100
|
||||
}
|
||||
folderish /oidc-playground
|
||||
# playground for oidc
|
||||
proxy /oidc-playground/ http://kopano_playground:8888/ {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
keepalive 100
|
||||
}
|
||||
folderish /oidc-playground
|
||||
|
||||
# playground for Kapi
|
||||
proxy /kapi-playground/ http://kopano_playground:8888/ {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
keepalive 100
|
||||
}
|
||||
folderish /kapi-playground
|
||||
# playground for Kapi
|
||||
proxy /kapi-playground/ http://kopano_playground:8888/ {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
keepalive 100
|
||||
}
|
||||
folderish /kapi-playground
|
||||
|
||||
|
||||
# Kwmserver
|
||||
proxy /upstreams/kwmserver/ {
|
||||
without /upstreams/kwmserver/
|
||||
upstream kopano_kwmserver:8778
|
||||
policy least_conn
|
||||
health_check /health-check
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
keepalive 100
|
||||
transparent
|
||||
websocket
|
||||
}
|
||||
ratelimit * 100 200 minute {
|
||||
/upstreams/kwmserver/
|
||||
whitelist 127.0.0.1/8
|
||||
}
|
||||
rewrite /api/kwm/v2/ {
|
||||
to /upstreams/kwmserver/{path}
|
||||
}
|
||||
# Kwmserver
|
||||
proxy /upstreams/kwmserver/ {
|
||||
without /upstreams/kwmserver/
|
||||
upstream kopano_kwmserver:8778
|
||||
policy least_conn
|
||||
health_check /health-check
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
keepalive 100
|
||||
transparent
|
||||
websocket
|
||||
}
|
||||
ratelimit * 100 200 minute {
|
||||
/upstreams/kwmserver/
|
||||
whitelist 127.0.0.1/8
|
||||
}
|
||||
rewrite /api/kwm/v2/ {
|
||||
to /upstreams/kwmserver/{path}
|
||||
}
|
||||
|
||||
proxy /meet/ kopano_meet:9080 {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
keepalive 100
|
||||
}
|
||||
folderish /meet
|
||||
proxy /meet/ kopano_meet:9080 {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
keepalive 100
|
||||
}
|
||||
folderish /meet
|
||||
|
||||
proxy /webapp/ kopano_webapp:9080 {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
keepalive 100
|
||||
}
|
||||
folderish /webapp
|
||||
proxy /webapp/ kopano_webapp:9080 {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
keepalive 100
|
||||
}
|
||||
folderish /webapp
|
||||
|
||||
proxy /Microsoft-Server-ActiveSync kopano_zpush:80 {
|
||||
transparent
|
||||
keepalive 0
|
||||
timeout 3540s
|
||||
}
|
||||
proxy /Microsoft-Server-ActiveSync kopano_zpush:80 {
|
||||
transparent
|
||||
keepalive 0
|
||||
timeout 3540s
|
||||
}
|
||||
|
||||
proxy /AutoDiscover/AutoDiscover.xml kopano_zpush:80 {
|
||||
transparent
|
||||
keepalive 0
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
}
|
||||
proxy /AutoDiscover/AutoDiscover.xml kopano_zpush:80 {
|
||||
transparent
|
||||
keepalive 0
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
}
|
||||
|
||||
proxy /Autodiscover/Autodiscover.xml kopano_zpush:80 {
|
||||
transparent
|
||||
keepalive 0
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
}
|
||||
proxy /Autodiscover/Autodiscover.xml kopano_zpush:80 {
|
||||
transparent
|
||||
keepalive 0
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
}
|
||||
|
||||
proxy /autodiscover/autodiscover.xml kopano_zpush:80 {
|
||||
transparent
|
||||
keepalive 0
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
}
|
||||
proxy /autodiscover/autodiscover.xml kopano_zpush:80 {
|
||||
transparent
|
||||
keepalive 0
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
}
|
||||
|
||||
proxy /caldav/ kopano_ical:8080 {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
}
|
||||
folderish /caldav
|
||||
proxy /caldav/ kopano_ical:8080 {
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
transparent
|
||||
}
|
||||
folderish /caldav
|
||||
|
||||
proxy /kdav/ kopano_kdav:80 {
|
||||
transparent
|
||||
keepalive 0
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
}
|
||||
proxy /kdav/ kopano_kdav:80 {
|
||||
transparent
|
||||
keepalive 0
|
||||
fail_timeout 10s
|
||||
try_duration 30s
|
||||
}
|
||||
|
||||
redir 301 {
|
||||
/.well-known/carddav /kdav/
|
||||
/.well-known/caldav /kdav/
|
||||
}
|
||||
redir 301 {
|
||||
/.well-known/carddav /kdav/
|
||||
/.well-known/caldav /kdav/
|
||||
}
|
||||
|
||||
proxy /ldap-admin/ ldap-admin:80 {
|
||||
without /ldap-admin
|
||||
transparent
|
||||
}
|
||||
redir /ldap-admin /ldap-admin/
|
||||
proxy /ldap-admin/ ldap-admin:80 {
|
||||
without /ldap-admin
|
||||
transparent
|
||||
}
|
||||
redir /ldap-admin /ldap-admin/
|
||||
|
||||
proxy /password-reset/ password-self-service:80 {
|
||||
without /password-reset
|
||||
transparent
|
||||
}
|
||||
redir /password-reset /password-reset/
|
||||
proxy /password-reset/ password-self-service:80 {
|
||||
without /password-reset
|
||||
transparent
|
||||
}
|
||||
redir /password-reset /password-reset/
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Kopano WebApp image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_webapp "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_webapp "Microbadger version")
|
||||
|
||||
# Kopano WebApp image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_webapp "Microbadger size/labels") [](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.
|
@ -1,7 +1,7 @@
|
||||
# Kopano Z-Push image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_zpush "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_zpush "Microbadger version")
|
||||
|
||||
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).
|
||||
# Kopano Z-Push image
|
||||
|
||||
[](https://microbadger.com/images/zokradonh/kopano_zpush "Microbadger size/labels") [](https://microbadger.com/images/zokradonh/kopano_zpush "Microbadger version")
|
||||
|
||||
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).
|
||||
|
@ -1,8 +1,8 @@
|
||||
<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
|
||||
ErrorLog "|/bin/cat"
|
||||
CustomLog "|/bin/cat" proxy
|
||||
LogFormat "%{X-Forwarded-For}i %{%a %b %d %T %Y}t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
|
||||
ErrorLog "|/bin/cat"
|
||||
CustomLog "|/bin/cat" proxy
|
||||
|
||||
</VirtualHost>
|
||||
|
Loading…
x
Reference in New Issue
Block a user