update Caddyfiles to use ENV var and snippets

This commit is contained in:
bain 2023-08-05 15:01:02 +02:00
parent b11315c19d
commit d657960f62
12 changed files with 26 additions and 34 deletions

View file

@ -1,5 +0,0 @@
https://torrent.$domain {
@blocked not remote_ip 10.0.0.0/24 10.0.89.0/24
respond @blocked "Internal use only" 403
reverse_proxy http://localhost:8085
}

View file

@ -0,0 +1,4 @@
https://torrent.{$DOMAIN} {
import internal_only
reverse_proxy http://localhost:8085
}

View file

@ -3,7 +3,7 @@ set -euo pipefail
source "$HL_LIB"
_assert_vars HL_TIMEZONE HL_DOMAIN;
_assert_vars HL_TIMEZONE;
_ch_001-make_dirs() {
mkdir -p ~/deluge /data/deluge;
@ -14,8 +14,7 @@ _ch_002-copy_compose() {
}
_ch_003-update_caddy() {
cp $(_fill Caddyfile.templ) /etc/caddy/conf.d/deluge.Caddyfile;
chmod a+r /etc/caddy/conf.d/deluge.Caddyfile;
cp deluge.Caddyfile /etc/caddy/conf.d;
sudo systemctl reload caddy.service;
}

View file

@ -1,6 +0,0 @@
https://film.$domain {
@blocked not remote_ip 10.0.0.0/24 10.0.89.0/24
respond @blocked "Internal use only" 403
reverse_proxy http://localhost:8096
}

View file

@ -0,0 +1,5 @@
https://film.{$DOMAIN} {
import internal_only
reverse_proxy http://localhost:8096
}

View file

@ -14,8 +14,7 @@ _ch_002-copy_compose() {
}
_ch_003-update_caddy() {
cp $(_fill Caddyfile.templ) /etc/caddy/conf.d/jellyfin.Caddyfile;
chmod a+r /etc/caddy/conf.d/jellyfin.Caddyfile;
cp jellyfin.Caddyfile /etc/caddy/conf.d;
sudo systemctl reload caddy.service;
}

View file

@ -1,7 +0,0 @@
https://cloud.$domain {
reverse_proxy https://localhost:4987 {
transport http {
tls_insecure_skip_verify
}
}
}

View file

@ -0,0 +1,7 @@
https://cloud.{$DOMAIN} {
reverse_proxy https://localhost:4987 {
transport http {
tls_insecure_skip_verify
}
}
}

View file

@ -3,7 +3,7 @@ set -euo pipefail
source "$HL_LIB"
_assert_vars HL_TIMEZONE HL_DOMAIN;
_assert_vars HL_TIMEZONE;
_ch_001-make_dirs() {
mkdir -p ~/nextcloud /data/nextcloud;
@ -14,8 +14,7 @@ _ch_002-copy_compose() {
}
_ch_003-update_caddy() {
cp $(_fill Caddyfile.templ) /etc/caddy/conf.d/nextcloud.Caddyfile;
chmod a+r /etc/caddy/conf.d/nextcloud.Caddyfile;
cp nextcloud.Caddyfile /etc/caddy/conf.d;
sudo systemctl reload caddy.service;
}
@ -24,5 +23,4 @@ _ch_004-run_service() {
docker-compose up -d;
}
_run_checkpoints

View file

@ -1,5 +0,0 @@
https://paperless.$domain {
@blocked not remote_ip 10.0.0.0/24 10.0.89.0/24
respond @blocked "Internal use only" 403
reverse_proxy http://localhost:8097
}

View file

@ -0,0 +1,4 @@
https://paperless.{$DOMAIN} {
import internal_only
reverse_proxy http://localhost:8097
}

View file

@ -16,8 +16,7 @@ _ch_002-copy_compose() {
}
_ch_003-update_caddy() {
cp $(_fill Caddyfile.templ) /etc/caddy/conf.d/paperlessngx.Caddyfile;
chmod a+r /etc/caddy/conf.d/paperlessngx.Caddyfile;
cp paperlessngx.Caddyfile /etc/caddy/conf.d;
sudo systemctl reload caddy.service;
}