diff --git a/docker-compose.yml b/docker-compose.yml index d63f212..11748c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,7 @@ services: environment: - EMAIL=${EMAIL:-off} - FQDN=${FQDNCLEANED?err} + - DEFAULTREDIRECT=${DEFAULTREDIRECT:-/webapp} command: wrapper.sh cap_drop: - ALL diff --git a/setup.sh b/setup.sh index f616d65..bc57b42 100755 --- a/setup.sh +++ b/setup.sh @@ -299,6 +299,7 @@ TZ=$TZ # Defines how Kopano can be accessed from the outside world FQDN=$FQDN FQDNCLEANED=${FQDN%:*} +DEFAULTREDIRECT=/webapp EMAIL=$EMAIL CADDY=2015 HTTP=80 diff --git a/web/Dockerfile b/web/Dockerfile index a215f02..2f1d865 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -5,6 +5,7 @@ ARG VCS_REF ARG CODE_VERSION ENV CODE_VERSION="${CODE_VERSION}" +ENV DEFAULTREDIRECT="/webapp" COPY wrapper.sh /usr/local/bin COPY kweb.cfg /etc/kweb.cfg diff --git a/web/README.md b/web/README.md index f9418eb..e6bd727 100644 --- a/web/README.md +++ b/web/README.md @@ -4,4 +4,14 @@ Reverse Proxy to securely and with as less configuration effort as possible expose Kopano to the public internet. +In its default configuration this container will redirect requests to the root of the domain (so for example when opening https://kopano.demo/ in a browser) to https://kopano.demo/webapp. To redirect to a different path the environment variable `DEFAULTREDIRECT` needs to be configured. + +Example: +``` +# the following value needs to be added to .env +DEFAULTREDIRECT=/meet +``` + +## Information needed when not running your own reverse proxy + The `kopano_webapp` container is accessible on port 9080 and serves the WebApp on `/webapp`. \ No newline at end of file diff --git a/web/kweb.cfg b/web/kweb.cfg index 81842b4..df53cb8 100644 --- a/web/kweb.cfg +++ b/web/kweb.cfg @@ -19,7 +19,7 @@ redir 302 { if {path} is / - / /webapp/ + / {%DEFAULTREDIRECT%}/ } # Config