Revert to single Caddyfile
This commit is contained in:
parent
75a7bee519
commit
a9259cb33b
@ -1,5 +1,5 @@
|
|||||||
name: "3DPrinter-OctoPrint"
|
name: "3DPrinter-OctoPrint"
|
||||||
version: "2022.12.01"
|
version: "2022.12.02"
|
||||||
slug: "3dprinter-octoprint"
|
slug: "3dprinter-octoprint"
|
||||||
description: "OctoPrint as an addon, no additional bells and whistles."
|
description: "OctoPrint as an addon, no additional bells and whistles."
|
||||||
url: "https://github.com/fredrikbaberg/home-assistant-addons/tree/main/3dprinter-octoprint"
|
url: "https://github.com/fredrikbaberg/home-assistant-addons/tree/main/3dprinter-octoprint"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# Main Caddy configuration file. Config for Ingress/direct will be stored in subfiles.
|
# Temporary file, will be overwritten on launch.
|
||||||
{
|
{
|
||||||
debug
|
debug
|
||||||
log {
|
log {
|
||||||
@ -6,4 +6,3 @@
|
|||||||
output file /var/log/caddy/caddy.log
|
output file /var/log/caddy/caddy.log
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
import configs/*.caddy
|
|
||||||
|
|||||||
@ -12,14 +12,5 @@ bashio::var.json \
|
|||||||
camera_host "$(bashio::config 'camera_url')" \
|
camera_host "$(bashio::config 'camera_url')" \
|
||||||
mode "$(bashio::config 'mode')" \
|
mode "$(bashio::config 'mode')" \
|
||||||
| tempio \
|
| tempio \
|
||||||
-template /usr/share/tempio/caddy/Caddyfile.ingress.gtpl \
|
-template /usr/share/tempio/caddy/Caddyfile.gtpl \
|
||||||
-out /etc/caddy/configs/ingress.caddy
|
-out /etc/caddy/Caddyfile
|
||||||
|
|
||||||
# Generate proxy configuration for direct access, if enabled.
|
|
||||||
if bashio::var.has_value "$(bashio::addon.port 5000)"; then
|
|
||||||
bashio::var.json \
|
|
||||||
mode "$(bashio::config 'mode')" \
|
|
||||||
| tempio \
|
|
||||||
-template /usr/share/tempio/caddy/Caddyfile.direct.gtpl \
|
|
||||||
-out /etc/caddy/configs/direct.caddy
|
|
||||||
fi
|
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
# OctoPrint WebUI
|
|
||||||
:5000 {
|
|
||||||
reverse_proxy http://127.0.0.1:80 {
|
|
||||||
header_up X-Scheme {scheme}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
:8099 {
|
|
||||||
@ingress {
|
|
||||||
remote_ip 172.30.32.2
|
|
||||||
}
|
|
||||||
uri strip_prefix {{ .ingress_entry }}
|
|
||||||
|
|
||||||
handle_path /camera/* {
|
|
||||||
reverse_proxy @ingress {{ .camera_host }} {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handle {
|
|
||||||
{{ if eq .mode "camera" }}
|
|
||||||
reverse_proxy @ingress {{ .camera_host }} {}
|
|
||||||
{{ else if eq .mode "recovery" }}
|
|
||||||
rewrite / /recovery
|
|
||||||
{{ else if eq .mode "reverse_proxy_test" }}
|
|
||||||
rewrite / /reverse_proxy_test
|
|
||||||
{{ end }}
|
|
||||||
reverse_proxy @ingress 127.0.0.1:80 {
|
|
||||||
header_up X-Script-Name {{ .ingress_entry }}
|
|
||||||
header_up -Origin
|
|
||||||
header_up Origin 172.30.32.2
|
|
||||||
header_up X-Forwarded-For 172.30.32.2
|
|
||||||
header_up X-Scheme {scheme}
|
|
||||||
flush_interval -1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user