diff --git a/Makefile b/Makefile index 4135c24..3245133 100644 --- a/Makefile +++ b/Makefile @@ -353,7 +353,11 @@ test-ci: ## Test if all containers start up docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml build docker-compose -f $(DOCKERCOMPOSE_FILE) up -d docker-compose -f $(DOCKERCOMPOSE_FILE) ps - docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml run test || (docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml ps; exit 1) + docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml run test || \ + (docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml ps; \ + docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml stop; \ + docker rm kopano_test_run_1 2>/dev/null; \ + exit 1) docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml stop 2>/dev/null docker ps --filter name=kopano_test* -aq | xargs docker rm -f diff --git a/build/Dockerfile b/build/Dockerfile index b0eb93c..f9f07a5 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,7 +1,7 @@ FROM docker:18.09.6 ENV COMPOSE_VERSION "1.19.0" ENV REG_VERSION "0.16.0" -RUN apk add --no-cache bash curl coreutils expect make nano jq py-pip +RUN apk add --no-cache bash curl coreutils git expect make nano jq py-pip RUN pip install --no-cache-dir docker-compose==${COMPOSE_VERSION} # the 0.16.0 release of reg has a bug that breaks loading tags from the docker hub. # issue is fixed in master, but not in a release. diff --git a/setup.sh b/setup.sh index 8ec6ebd..ae972dd 100755 --- a/setup.sh +++ b/setup.sh @@ -308,6 +308,7 @@ SMTPPORT=25 SMTPSPORT=465 MSAPORT=587 IMAPPORT=143 +ICALPORT=8080 KOPANOPORT=236 KOPANOSPORT=237 diff --git a/web/Dockerfile b/web/Dockerfile index ded6be7..a215f02 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,4 +1,4 @@ -ARG CODE_VERSION=0.6.1 +ARG CODE_VERSION=0.7.0 FROM kopano/kwebd:${CODE_VERSION} ARG VCS_REF @@ -6,6 +6,9 @@ ARG CODE_VERSION ENV CODE_VERSION="${CODE_VERSION}" +COPY wrapper.sh /usr/local/bin +COPY kweb.cfg /etc/kweb.cfg + LABEL maintainer=az@zok.xyz \ org.label-schema.name="Kopano Web container" \ org.label-schema.description="Reverse proxy for http(s) based components of kopano-docker" \ @@ -14,11 +17,3 @@ LABEL maintainer=az@zok.xyz \ org.label-schema.vcs-url="https://github.com/zokradonh/kopano-docker" \ org.label-schema.version=$CODE_VERSION \ org.label-schema.schema-version="1.0" - -ENV KWEBD_USER root -ENV KWEBD_GROUP root -# hadolint ignore=DL3002 -USER root -COPY wrapper.sh /usr/local/bin -COPY kweb.cfg /etc/kweb.cfg - diff --git a/web/kweb.cfg b/web/kweb.cfg index f3e9a49..6790766 100644 --- a/web/kweb.cfg +++ b/web/kweb.cfg @@ -1,8 +1,9 @@ -:80 { +{%FQDN%}:80, :80 { redir / https://{host}{uri} } -*, :443 { +# kweb >=0.7.0 needs the explicit hostname to be set +{%FQDN%}, *:2015, *:443 { log stdout errors stdout diff --git a/web/wrapper.sh b/web/wrapper.sh index adbd288..605a0b5 100755 --- a/web/wrapper.sh +++ b/web/wrapper.sh @@ -2,9 +2,4 @@ set -e -if [ "$EMAIL" = "self_signed" ] || [ "$EMAIL" = "off" ]; then - # do not use the '-host' option if using a self signed cert - exec kwebd caddy -conf /etc/kweb.cfg -agree -else - exec kwebd caddy -conf /etc/kweb.cfg -agree -host "$FQDN" -fi +exec kwebd caddy -conf /etc/kweb.cfg -agree