adjust things as discussed

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-05-20 18:36:43 +02:00
parent 0c945c9516
commit c84091cc0c
8 changed files with 42 additions and 42 deletions

View file

@ -16,12 +16,49 @@
{$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} {
# Bundled
import /caddy-imports/*
# Collabora
route /browser/* {
reverse_proxy {$COLLABORA_HOST}:9980
}
route /hosting/* {
reverse_proxy {$COLLABORA_HOST}:9980
}
route /cool/* {
reverse_proxy {$COLLABORA_HOST}:9980
}
# Notify Push
route /push/* {
uri strip_prefix /push
reverse_proxy {$NEXTCLOUD_HOST}:7867
}
# Onlyoffice
route /onlyoffice/* {
uri strip_prefix /onlyoffice
reverse_proxy {$ONLYOFFICE_HOST}:80 {
header_up X-Forwarded-Host {http.request.host}/onlyoffice
header_up X-Forwarded-Proto https
}
}
# Talk
route /standalone-signaling/* {
uri strip_prefix /standalone-signaling
reverse_proxy {$TALK_HOST}:8081
}
# Others
import /mnt/data/caddy-imports/*
# Nextcloud
route {
rewrite /.well-known/carddav /remote.php/dav
rewrite /.well-known/caldav /remote.php/dav
header Strict-Transport-Security max-age=31536000;
reverse_proxy localhost:8000
}
# TLS options
tls {
issuer acme {

View file

@ -7,8 +7,6 @@ COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
COPY --chown=33:33 Caddyfile /Caddyfile
COPY --chmod=664 nextcloud.conf /usr/local/apache2/conf/nextcloud.conf
COPY --chmod=664 nextcloud /nextcloud
COPY --chmod=664 caddy-imports/* /caddy-imports/
COPY --chmod=664 supervisord.conf /supervisord.conf
COPY --chmod=775 start.sh /start.sh
COPY --chmod=775 healthcheck.sh /healthcheck.sh

View file

@ -1,10 +0,0 @@
# Collabora
route /browser/* {
reverse_proxy {$COLLABORA_HOST}:9980
}
route /hosting/* {
reverse_proxy {$COLLABORA_HOST}:9980
}
route /cool/* {
reverse_proxy {$COLLABORA_HOST}:9980
}

View file

@ -1,5 +0,0 @@
# Notify Push
route /push/* {
uri strip_prefix /push
reverse_proxy {$NEXTCLOUD_HOST}:7867
}

View file

@ -1,8 +0,0 @@
# Onlyoffice
route /onlyoffice/* {
uri strip_prefix /onlyoffice
reverse_proxy {$ONLYOFFICE_HOST}:80 {
header_up X-Forwarded-Host {http.request.host}/onlyoffice
header_up X-Forwarded-Proto https
}
}

View file

@ -1,5 +0,0 @@
# Talk
route /standalone-signaling/* {
uri strip_prefix /standalone-signaling
reverse_proxy {$TALK_HOST}:8081
}

View file

@ -1,7 +0,0 @@
# Nextcloud
route /* {
rewrite /.well-known/carddav /remote.php/dav
rewrite /.well-known/caldav /remote.php/dav
header Strict-Transport-Security max-age=31536000;
reverse_proxy localhost:8000
}

View file

@ -45,9 +45,6 @@ else
fi
echo "$CADDYFILE" > /Caddyfile
# Overwrite nextcloud conf
cat /nextcloud > /mnt/data/caddy-imports/nextcloud
# Fix the Caddyfile format
caddy fmt --overwrite /Caddyfile
@ -57,6 +54,9 @@ mkdir -p /mnt/data/caddy/
# Add caddy import path
mkdir -p /mnt/data/caddy-imports
# Makre sure that the caddy-imports dir is not empty
echo "" > /mnt/data/caddy-imports/empty
# Fix apache startup
rm -f /usr/local/apache2/logs/httpd.pid