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

Update kweb (#209)

* Update kweb to latest release
the fqdn needs to be part of kweb.cfg
make port 2015 explicit
fixes #208

* testing improvements
add git to build container
improve ci testing
add kopano-ical ports to setup


* no longer run kweb as root
now possible because of fd5c7307db
may require to manually delete the kopano_web data volume since kweb user cannot read data from root user.
This commit is contained in:
Felix Bartels 2019-08-07 14:03:26 +02:00 committed by GitHub
parent 3b8c9c4d68
commit 45a506c7dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 19 deletions

View File

@ -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

View File

@ -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.

View File

@ -308,6 +308,7 @@ SMTPPORT=25
SMTPSPORT=465
MSAPORT=587
IMAPPORT=143
ICALPORT=8080
KOPANOPORT=236
KOPANOSPORT=237

View File

@ -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

View File

@ -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

View File

@ -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