Add config for camera
This commit is contained in:
parent
1012a52afa
commit
67f7dcf9fb
@ -1,5 +1,5 @@
|
|||||||
name: "3DPrinter-OctoPrint"
|
name: "3DPrinter-OctoPrint"
|
||||||
version: "2022.7.020"
|
version: "2022.7.021"
|
||||||
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"
|
||||||
@ -24,8 +24,10 @@ ports:
|
|||||||
ports_description:
|
ports_description:
|
||||||
5000/tcp: Web-based interface (Not required for Ingress)
|
5000/tcp: Web-based interface (Not required for Ingress)
|
||||||
options:
|
options:
|
||||||
|
camera_url: "http://b7aa59c4-camera-mjpg-streamer/"
|
||||||
recovery: false
|
recovery: false
|
||||||
schema:
|
schema:
|
||||||
|
camera_url: "url"
|
||||||
recovery: "bool"
|
recovery: "bool"
|
||||||
image: ghcr.io/fredrikbaberg/addon-3dprinter-octoprint-{arch}
|
image: ghcr.io/fredrikbaberg/addon-3dprinter-octoprint-{arch}
|
||||||
tmpfs: true
|
tmpfs: true
|
||||||
|
|||||||
@ -9,6 +9,7 @@ bashio::var.json \
|
|||||||
interface "$(bashio::addon.ip_address)" \
|
interface "$(bashio::addon.ip_address)" \
|
||||||
port "^$(bashio::addon.ingress_port)" \
|
port "^$(bashio::addon.ingress_port)" \
|
||||||
ingress_entry "$(bashio::addon.ingress_entry)" \
|
ingress_entry "$(bashio::addon.ingress_entry)" \
|
||||||
|
camera_host "$(bashio::config 'camera_url')" \
|
||||||
| tempio \
|
| tempio \
|
||||||
-template /etc/nginx/templates/ingress.gtpl \
|
-template /etc/nginx/templates/ingress.gtpl \
|
||||||
-out /etc/nginx/servers/ingress.conf
|
-out /etc/nginx/servers/ingress.conf
|
||||||
|
|||||||
@ -11,7 +11,7 @@ server {
|
|||||||
proxy_set_header X-Forwarded-For 172.30.32.2;
|
proxy_set_header X-Forwarded-For 172.30.32.2;
|
||||||
proxy_set_header Origin 172.30.32.2;
|
proxy_set_header Origin 172.30.32.2;
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:5000/; # make sure to add trailing slash here!
|
proxy_pass http://octoprint/; # make sure to add trailing slash here!
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
@ -23,4 +23,16 @@ server {
|
|||||||
|
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /webcam/ {
|
||||||
|
proxy_pass {{ .camera_host }};
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Scheme $scheme;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
client_max_body_size 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user