mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-30 12:24:04 +02:00
Try ingress
This commit is contained in:
@@ -7,9 +7,12 @@ set -e
|
||||
###############
|
||||
|
||||
if bashio::config.true 'ssl'; then
|
||||
bashio::log "Ssl is enabled using addon options, setting up nginx"
|
||||
bashio::config.require.ssl
|
||||
certfile=$(bashio::config 'certfile')
|
||||
keyfile=$(bashio::config 'keyfile')
|
||||
sed -i "/root/a tls /ssl/${certfile} /ssl/${keyfile}" /etc/caddy/Caddyfile
|
||||
sed -i "s|http://|https://|g" /etc/caddy/Caddyfile
|
||||
fi
|
||||
|
||||
echo " "
|
||||
|
||||
@@ -44,7 +44,8 @@ sed -i "/User=pi/d" "$HOME/BirdNET-Pi/templates/birdnet_log.service"
|
||||
sed -i "s|birdnet_log.sh|cat /proc/1/fd/1|g" "$HOME/BirdNET-Pi/templates/birdnet_log.service"
|
||||
|
||||
# Make sure config is correctly formatted.
|
||||
echo "... avoid caddy formatting errors"
|
||||
echo "... caddyfile modifications"
|
||||
caddy fmt --overwrite /etc/caddy/Caddyfile
|
||||
sed -i "s|http://|http://:8081|g" /etc/caddy/Caddyfile
|
||||
|
||||
echo " "
|
||||
|
||||
@@ -8,22 +8,22 @@
|
||||
|
||||
location /log {
|
||||
# Proxy pass
|
||||
proxy_pass http://localhost:80;
|
||||
proxy_pass http://localhost:8081;
|
||||
}
|
||||
|
||||
location /stats {
|
||||
# Proxy pass
|
||||
proxy_pass http://localhost:80;
|
||||
proxy_pass http://localhost:8081;
|
||||
}
|
||||
|
||||
location /terminal {
|
||||
# Proxy pass
|
||||
proxy_pass http://localhost:80;
|
||||
proxy_pass http://localhost:8081;
|
||||
}
|
||||
|
||||
location / {
|
||||
# Proxy pass
|
||||
proxy_pass http://localhost:80;
|
||||
proxy_pass http://localhost:8081;
|
||||
|
||||
# Next three lines allow websockets
|
||||
proxy_http_version 1.1;
|
||||
|
||||
Reference in New Issue
Block a user