Revert to port 80, to avoid collision

This commit is contained in:
Fredrik Baberg 2023-01-11 12:18:26 +01:00
parent 2f933b30d1
commit 39031df1c2
8 changed files with 13 additions and 13 deletions

View File

@ -1,5 +1,5 @@
name: "3DPrinter-OctoPrint" name: "3DPrinter-OctoPrint"
version: "2023.01.02" version: "2023.01.04"
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"

View File

@ -30,7 +30,7 @@ updateConfigRequired()
octoprint $BASEDIR config set server.commands.systemRestartCommand "/scripts/system_restart.sh" octoprint $BASEDIR config set server.commands.systemRestartCommand "/scripts/system_restart.sh"
octoprint $BASEDIR config set server.commands.systemShutdownCommand "/scripts/system_shutdown.sh" octoprint $BASEDIR config set server.commands.systemShutdownCommand "/scripts/system_shutdown.sh"
octoprint $BASEDIR config set server.host "127.0.0.1" octoprint $BASEDIR config set server.host "127.0.0.1"
octoprint $BASEDIR config set --int server.port 5000 octoprint $BASEDIR config set --int server.port 80
octoprint $BASEDIR config set webcam.ffmpeg "/usr/bin/ffmpeg" octoprint $BASEDIR config set webcam.ffmpeg "/usr/bin/ffmpeg"
} }

View File

@ -5,14 +5,14 @@
# ============================================================================== # ==============================================================================
# Generate proxy configuration for any access # Generate proxy configuration for any access
# bashio::var.json \ bashio::var.json \
# | tempio \ | tempio \
# -template /usr/share/tempio/caddy/Caddyfile.any.gtpl \ -template /usr/share/tempio/caddy/Caddyfile.any.gtpl \
# -out /etc/caddy/sites-enabled/any.caddy -out /etc/caddy/sites-enabled/any.caddy
# Generate proxy configuration for internal access # Generate proxy configuration for internal access
bashio::var.json \ bashio::var.json \
internal_hostname "$(bashio::info.hostname)" \ addon_hostname "$(bashio::addon.hostname)" \
| tempio \ | tempio \
-template /usr/share/tempio/caddy/Caddyfile.internal.gtpl \ -template /usr/share/tempio/caddy/Caddyfile.internal.gtpl \
-out /etc/caddy/sites-enabled/internal.caddy -out /etc/caddy/sites-enabled/internal.caddy

View File

@ -7,4 +7,4 @@
bashio::log.info "Starting OctoPrint..." bashio::log.info "Starting OctoPrint..."
## Run your program ## Run your program
exec octoprint --basedir /data/config/octoprint serve --iknowwhatimdoing --host 127.0.0.1 --port 5000 exec octoprint --basedir /data/config/octoprint serve --iknowwhatimdoing --host 127.0.0.1 --port 80

View File

@ -5,7 +5,7 @@
# ============================================================================== # ==============================================================================
# Wait for OctoPrint WebUI to be available # Wait for OctoPrint WebUI to be available
bashio::net.wait_for 5000 bashio::net.wait_for 80
bashio::log.info "Starting proxy..." bashio::log.info "Starting proxy..."

View File

@ -1,5 +1,5 @@
# OctoPrint WebUI through any access # OctoPrint WebUI through any access
:5000 { :5000 {
reverse_proxy http://127.0.0.1:5000 { reverse_proxy http://127.0.0.1:80 {
} }
} }

View File

@ -18,7 +18,7 @@
{{ else if eq .mode "reverse_proxy_test" }} {{ else if eq .mode "reverse_proxy_test" }}
rewrite / /reverse_proxy_test rewrite / /reverse_proxy_test
{{ end }} {{ end }}
reverse_proxy @ingress 127.0.0.1:5000 { reverse_proxy @ingress 127.0.0.1:80 {
header_up X-Script-Name {{ .ingress_entry }} header_up X-Script-Name {{ .ingress_entry }}
trusted_proxies 172.30.32.2 trusted_proxies 172.30.32.2
# header_up -Origin # header_up -Origin

View File

@ -1,5 +1,5 @@
# WebUI through internal hostname # WebUI through internal hostname
{{ .internal_hostname }}:5000 { {{ .addon_hostname }}:5000 {
reverse_proxy http://127.0.0.1:5000 { reverse_proxy http://127.0.0.1:80 {
} }
} }