Add ingress

This commit is contained in:
Alexandre
2025-01-14 12:12:00 +01:00
parent a844f787b9
commit 53aae2d105
5 changed files with 57 additions and 26 deletions

View File

@@ -0,0 +1,19 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
#################
# NGINX SETTING #
#################
declare ingress_interface
declare ingress_port
declare ingress_entry
echo "Adapting for ingress"
ingress_port=$(bashio::addon.ingress_port)
ingress_interface=$(bashio::addon.ip_address)
ingress_entry=$(bashio::addon.ingress_entry)
sed -i "s|%%port%%|${ingress_port}|g" /etc/nginx/http.d/ingress.conf
sed -i "s|%%interface%%|${ingress_interface}|g" /etc/nginx/http.d/ingress.conf
sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/nginx/http.d/ingress.conf

View File

@@ -4,8 +4,6 @@ set -e
bashio::log.warning "App starting."
# In the addon script, make symlinks on the fly
echo "Creating symlinks"
for folder in config db; do
@@ -24,10 +22,3 @@ sudo chown -R nginx:www-data /config/config/
if [ -f /config/db/app.db ]; then
chmod a+rwx /config/db/app.db
fi
##############
# LAUNCH APP #
##############
#chmod +x /app/dockerfiles/start.sh
#/app/dockerfiles/start.sh