mirror of
https://github.com/zokradonh/kopano-docker
synced 2025-06-08 08:26:13 +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
|
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
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
|
1
Makefile
1
Makefile
@ -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
|
||||||
|
@ -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 ".."
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
|
|
|
||||||
|
@ -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"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -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>
|
||||||
|
@ -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
|
||||||
|
@ -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 \
|
||||||
|
@ -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 \
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -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
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -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 && \
|
||||||
|
@ -21,5 +21,4 @@ General prefix |
|
|||||||
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
|
||||||
|
|
||||||
```
|
```
|
@ -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
|
||||||
```
|
```
|
344
web/kweb.cfg
344
web/kweb.cfg
@ -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/
|
||||||
}
|
}
|
||||||
|
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user