Merge pull request #5851 from ostcar/caddy

Use caddy
This commit is contained in:
Emanuel Schütze 2021-02-05 18:17:51 +01:00 committed by GitHub
commit d05958ca10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 10 deletions

@ -1 +1 @@
Subproject commit 03d86865c063059878f4c3d616b6a6a9099b90d3 Subproject commit 020bb29d9924ffb32c60e081e019acc2984ac42e

21
caddy/Caddyfile Normal file
View File

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

3
caddy/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM caddy:2.3.0-alpine
COPY Caddyfile /etc/caddy/

View File

@ -6,7 +6,7 @@ events {
http { http {
server { server {
listen 80; listen 4200;
server_name localhost; server_name localhost;
root /usr/share/nginx/html; root /usr/share/nginx/html;

View File

@ -6,7 +6,7 @@ declare -A TARGETS
TARGETS=( TARGETS=(
[client]="$(dirname "${BASH_SOURCE[0]}")/../client/docker/" [client]="$(dirname "${BASH_SOURCE[0]}")/../client/docker/"
[server]="$(dirname "${BASH_SOURCE[0]}")/../server/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/" [autoupdate]="$(dirname "${BASH_SOURCE[0]}")/../autoupdate/"
[media]="https://github.com/OpenSlides/openslides-media-service.git" [media]="https://github.com/OpenSlides/openslides-media-service.git"
[pgbouncer]="https://github.com/OpenSlides/openslides-docker-compose.git#:pgbouncer" [pgbouncer]="https://github.com/OpenSlides/openslides-docker-compose.git#:pgbouncer"

View File

@ -45,13 +45,11 @@ services:
redis: redis:
image: redis:latest image: redis:latest
haproxy: caddy:
image: os3-haproxy-dev image: caddy:2.3.0-alpine
volumes:
- ../haproxy/src:/usr/local/etc/haproxy
depends_on: depends_on:
- client - client
- server - server
- autoupdate - autoupdate
ports: ports:
- "8000:8000" - "8000:8000"

View File

@ -15,7 +15,7 @@ define(`ifenvelse', `ifelse(read_env(`$1'),, `$2', read_env(`$1'))')
define(`HAPROXY_IMAGE', define(`HAPROXY_IMAGE',
ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/dnl 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)) ifenvelse(`DOCKER_OPENSLIDES_HAPROXY_TAG', latest))
define(`BACKEND_IMAGE', define(`BACKEND_IMAGE',
ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/dnl ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/dnl

View File

@ -15,7 +15,7 @@ define(`ifenvelse', `ifelse(read_env(`$1'),, `$2', read_env(`$1'))')
define(`HAPROXY_IMAGE', define(`HAPROXY_IMAGE',
ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/dnl 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)) ifenvelse(`DOCKER_OPENSLIDES_HAPROXY_TAG', latest))
define(`BACKEND_IMAGE', define(`BACKEND_IMAGE',
ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/dnl ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/dnl