mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-26 10:33:40 +02:00
Add Ingress support to Bazarr NAS addon
- Add ingress: true, ingress_entry, panel_icon, panel_admin to config.yaml - Add connection_mode option (ingress_noauth/noingress_auth/ingress_auth) - Add nginx package and 90-disable_ingress.sh module to Dockerfile - Add nginx reverse proxy configuration (matching Sonarr/Radarr pattern) - Add 32-nginx_ingress.sh init script for Bazarr YAML config handling - Add nginx S6 service (run/finish) with base_url validation Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/621436fb-7e38-4572-8231-55b067f62d83 Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
69f1e74476
commit
5df9eb8588
8
bazarr/rootfs/etc/services.d/nginx/finish
Normal file
8
bazarr/rootfs/etc/services.d/nginx/finish
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/execlineb -S0
|
||||
# ==============================================================================
|
||||
# Take down the S6 supervision tree when Nginx fails
|
||||
# ==============================================================================
|
||||
if { s6-test ${1} -ne 0 }
|
||||
if { s6-test ${1} -ne 256 }
|
||||
|
||||
s6-svscanctl -t /var/run/s6/services
|
||||
24
bazarr/rootfs/etc/services.d/nginx/run
Normal file
24
bazarr/rootfs/etc/services.d/nginx/run
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
# ==============================================================================
|
||||
|
||||
# Set variables
|
||||
slug=bazarr
|
||||
port=6767
|
||||
CONFIG_LOCATION=/config/config/config.yaml
|
||||
|
||||
# Wait for bazarr to become available
|
||||
bashio::net.wait_for "$port" localhost 900
|
||||
|
||||
# Set base_url
|
||||
if [ -f "$CONFIG_LOCATION" ]; then
|
||||
if ! grep -q "base_url.*$slug" "$CONFIG_LOCATION" && ! bashio::config.true "ingress_disabled"; then
|
||||
bashio::log.warning "BaseUrl not set properly, restarting"
|
||||
sed -i "s/ base_url:.*/ base_url: $slug/" "$CONFIG_LOCATION"
|
||||
bashio::addon.restart
|
||||
fi
|
||||
fi
|
||||
|
||||
bashio::log.info "Starting NGinx..."
|
||||
exec nginx
|
||||
Reference in New Issue
Block a user