diff --git a/autoupdate b/autoupdate index 03d86865c..020bb29d9 160000 --- a/autoupdate +++ b/autoupdate @@ -1 +1 @@ -Subproject commit 03d86865c063059878f4c3d616b6a6a9099b90d3 +Subproject commit 020bb29d9924ffb32c60e081e019acc2984ac42e diff --git a/caddy/Caddyfile b/caddy/Caddyfile new file mode 100644 index 000000000..aeb601dac --- /dev/null +++ b/caddy/Caddyfile @@ -0,0 +1,21 @@ +{ + # Enable debug output + #debug +} + +:8000 + +reverse_proxy /system/* http://autoupdate:8002 { + flush_interval -1 +} + +@server { + path /apps/* + path /rest/* + path /server-version.txt +} +reverse_proxy @server server:8000 + +reverse_proxy /media/* media:8000 + +reverse_proxy client:4200 diff --git a/caddy/Dockerfile b/caddy/Dockerfile new file mode 100644 index 000000000..618b1aabb --- /dev/null +++ b/caddy/Dockerfile @@ -0,0 +1,3 @@ +FROM caddy:2.3.0-alpine + +COPY Caddyfile /etc/caddy/ diff --git a/client/docker/nginx.conf b/client/docker/nginx.conf index f96659452..b95f2cd21 100644 --- a/client/docker/nginx.conf +++ b/client/docker/nginx.conf @@ -6,7 +6,7 @@ events { http { server { - listen 80; + listen 4200; server_name localhost; root /usr/share/nginx/html; diff --git a/docker/build.sh b/docker/build.sh index 7e7771b23..16cdff8d6 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -6,7 +6,7 @@ declare -A TARGETS TARGETS=( [client]="$(dirname "${BASH_SOURCE[0]}")/../client/docker/" [server]="$(dirname "${BASH_SOURCE[0]}")/../server/docker/" - [haproxy]="$(dirname "${BASH_SOURCE[0]}")/../haproxy/" + [caddy]="$(dirname "${BASH_SOURCE[0]}")/../caddy/" [autoupdate]="$(dirname "${BASH_SOURCE[0]}")/../autoupdate/" [media]="https://github.com/OpenSlides/openslides-media-service.git" [pgbouncer]="https://github.com/OpenSlides/openslides-docker-compose.git#:pgbouncer" diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index d639a7d5a..59517bbc9 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -45,13 +45,11 @@ services: redis: image: redis:latest - haproxy: - image: os3-haproxy-dev - volumes: - - ../haproxy/src:/usr/local/etc/haproxy + caddy: + image: caddy:2.3.0-alpine depends_on: - client - server - autoupdate ports: - - "8000:8000" \ No newline at end of file + - "8000:8000" diff --git a/docker/docker-compose.yml.m4 b/docker/docker-compose.yml.m4 index 1a9d1cd1c..847b161f7 100644 --- a/docker/docker-compose.yml.m4 +++ b/docker/docker-compose.yml.m4 @@ -15,7 +15,7 @@ define(`ifenvelse', `ifelse(read_env(`$1'),, `$2', read_env(`$1'))') define(`HAPROXY_IMAGE', ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/dnl -ifenvelse(`DOCKER_OPENSLIDES_HAPROXY_NAME', openslides-haproxy):dnl +ifenvelse(`DOCKER_OPENSLIDES_HAPROXY_NAME', openslides-caddy):dnl ifenvelse(`DOCKER_OPENSLIDES_HAPROXY_TAG', latest)) define(`BACKEND_IMAGE', ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/dnl diff --git a/docker/docker-stack.yml.m4 b/docker/docker-stack.yml.m4 index 0d83990cb..af8eb6beb 100644 --- a/docker/docker-stack.yml.m4 +++ b/docker/docker-stack.yml.m4 @@ -15,7 +15,7 @@ define(`ifenvelse', `ifelse(read_env(`$1'),, `$2', read_env(`$1'))') define(`HAPROXY_IMAGE', ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/dnl -ifenvelse(`DOCKER_OPENSLIDES_HAPROXY_NAME', openslides-haproxy):dnl +ifenvelse(`DOCKER_OPENSLIDES_HAPROXY_NAME', openslides-caddy):dnl ifenvelse(`DOCKER_OPENSLIDES_HAPROXY_TAG', latest)) define(`BACKEND_IMAGE', ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/dnl