Skip to content

Commit

Permalink
Add variables to change names of the other docker container (zokradon…
Browse files Browse the repository at this point in the history
…h#231)

* Add variables to change names of the other docker container
	modified:   Dockerfile
	modified:   kweb.cfg
* fix default values for konnect and kapi
add inline comment
  • Loading branch information
RobinvG authored and fbartels committed Aug 31, 2019
1 parent de66536 commit 0a7eb73
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 deletions.
15 changes: 15 additions & 0 deletions web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ ARG CODE_VERSION

ENV CODE_VERSION="${CODE_VERSION}"
ENV DEFAULTREDIRECT="/webapp"
# Workaround to not break backwards compatibility,
# since an underscore is not a valid char in a hostname.
# This causes issues when using kweb in kubernetes.
# Related issue https://github.com/docker/compose/issues/229
ENV KWEBD_DNS_KONNECT="kopano_konnect"
ENV KWEBD_DNS_MEET="kopano_meet"
ENV KWEBD_DNS_KAPI="kopano_kapi"
ENV KWEBD_DNS_PLAYGROUND="kopano_playground"
ENV KWEBD_DNS_KWMSERVER="kopano_kwmserver"
ENV KWEBD_DNS_WEBAPP="kopano_webapp"
ENV KWEBD_DNS_ZPUSH="kopano_zpush"
ENV KWEBD_DNS_ICAL="kopano_ical"
ENV KWEBD_DNS_KDAV="kopano_kdav"
ENV KWEBD_DNS_GRAPI="kopano_grapi"
ENV KWEBD_DNS_ICAL="kopano_ical"

COPY wrapper.sh /usr/local/bin
COPY kweb.cfg /etc/kweb.cfg
Expand Down
31 changes: 15 additions & 16 deletions web/kweb.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{%FQDN%}:80, *:80 {
log stdout
errors stdout

redir / https://{host}{uri}
}

Expand All @@ -26,7 +25,7 @@
}

# Config
proxy /api/config/v1/kopano/meet/ http://kopano_meet:9080/ {
proxy /api/config/v1/kopano/meet/ http://{%KWEBD_DNS_MEET%}:9080/ {
fail_timeout 10s
try_duration 30s
transparent
Expand All @@ -36,7 +35,7 @@
# Konnect
proxy /upstreams/konnect/ {
without /upstreams/konnect/
upstream kopano_konnect:8777
upstream {%KWEBD_DNS_KONNECT%}:8777
policy least_conn
health_check /health-check
fail_timeout 10s
Expand Down Expand Up @@ -65,7 +64,7 @@
# Kapi
proxy /upstreams/kapi/ {
without /upstreams/kapi/
upstream kopano_kapi:8039
upstream {%KWEBD_DNS_KAPI%}:8039
policy least_conn
health_check /health-check
fail_timeout 10s
Expand All @@ -89,7 +88,7 @@
}

# playground for oidc
proxy /oidc-playground/ http://kopano_playground:8888/ {
proxy /oidc-playground/ http://{%KWEBD_DNS_PLAYGROUND%}:8888/ {
fail_timeout 10s
try_duration 30s
transparent
Expand All @@ -98,7 +97,7 @@
folderish /oidc-playground

# playground for Kapi
proxy /kapi-playground/ http://kopano_playground:8888/ {
proxy /kapi-playground/ http://{%KWEBD_DNS_PLAYGROUND%}:8888/ {
fail_timeout 10s
try_duration 30s
transparent
Expand All @@ -109,7 +108,7 @@
# Kwmserver
proxy /upstreams/kwmserver/ {
without /upstreams/kwmserver/
upstream kopano_kwmserver:8778
upstream {%KWEBD_DNS_KWMSERVER%}:8778
policy least_conn
health_check /health-check
fail_timeout 10s
Expand All @@ -126,57 +125,57 @@
to /upstreams/kwmserver/{path}
}

proxy /meet/ kopano_meet:9080 {
proxy /meet/ {%KWEBD_DNS_MEET%}:9080 {
fail_timeout 10s
try_duration 30s
transparent
keepalive 100
}
folderish /meet

proxy /webapp/ kopano_webapp:9080 {
proxy /webapp/ {%KWEBD_DNS_WEBAPP%}:9080 {
fail_timeout 10s
try_duration 30s
transparent
keepalive 100
}
folderish /webapp

proxy /Microsoft-Server-ActiveSync kopano_zpush:80 {
proxy /Microsoft-Server-ActiveSync {%KWEBD_DNS_ZPUSH%}:80 {
transparent
keepalive 0
timeout 3540s
}

proxy /AutoDiscover/AutoDiscover.xml kopano_zpush:80 {
proxy /AutoDiscover/AutoDiscover.xml {%KWEBD_DNS_ZPUSH%}:80 {
transparent
keepalive 0
fail_timeout 10s
try_duration 30s
}

proxy /Autodiscover/Autodiscover.xml kopano_zpush:80 {
proxy /Autodiscover/Autodiscover.xml {%KWEBD_DNS_ZPUSH%}:80 {
transparent
keepalive 0
fail_timeout 10s
try_duration 30s
}

proxy /autodiscover/autodiscover.xml kopano_zpush:80 {
proxy /autodiscover/autodiscover.xml {%KWEBD_DNS_ZPUSH%}:80 {
transparent
keepalive 0
fail_timeout 10s
try_duration 30s
}

proxy /caldav/ kopano_ical:8080 {
proxy /caldav/ {%KWEBD_DNS_ICAL%}:8080 {
fail_timeout 10s
try_duration 30s
transparent
}
folderish /caldav

proxy /kdav/ kopano_kdav:80 {
proxy /kdav/ {%KWEBD_DNS_KDAV%}:80 {
transparent
keepalive 0
fail_timeout 10s
Expand All @@ -200,7 +199,7 @@
}
redir /password-reset /password-reset/

proxy /grapi-explorer/ http://kopano_grapi-explorer:3000/ {
proxy /grapi-explorer/ http://{%KWEBD_DNS_GRAPI%}-explorer:3000/ {
fail_timeout 10s
try_duration 30s
transparent
Expand Down

0 comments on commit 0a7eb73

Please sign in to comment.