This commit is contained in:
Alexandre
2024-04-27 07:13:22 +00:00
parent fb55e961ac
commit a78e19f30c
3 changed files with 7 additions and 63 deletions

View File

@@ -31,7 +31,7 @@ ENV DEBIAN_FRONTEND="noninteractive" \
RUN \
# Install dependencies
echo "Install dependencies" && \
apt-get update -y && apt-get install curl gcc python3-dev git jq sudo -y && \
apt-get update -y && apt-get install curl gcc python3-dev git jq sudo php-mbstring -y && \
\
# Correct for systemctl
curl -f -L -s -S https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl3.py -o /bin/systemctl && \
@@ -85,27 +85,6 @@ RUN \
ln -s /home/pi /app && \
chown -R 1000:1000 /home/pi /app
#USER pi
#WORKDIR /app
#RUN export DEBIAN_FRONTEND noninteractive && \
# export BIRDNET_USER="pi" && \
# export USER="pi" && \
# export HOME="/app" && \
# echo "HOME is $HOME" && \
# ls -l /app && \
# sudo chown -R pi:pi /app && \
# /./newinstaller.sh
#USER root
#sudo -E -u birdnet -s /bin/bash -c "/newinstaller.sh"
# Correct script
#sed -i "s|== 0|== 7|g" /newinstaller.sh && \
#sed -i "s|sudo -n true|true|g" /newinstaller.sh && \
#sed -i "s|sudo -K|true|g" /newinstaller.sh && \
#for file in $(grep -srl "sudo" $HOME/BirdNET-Pi/scripts); do \sed -i "s|sudo ||" "$file"; done && \
#/./newinstaller.sh
# Correct for absence of sudo
#sudo -E -u birdnet -s /bin/bash -c "/newinstaller.sh"
##################
# 2 Modify Image #
##################
@@ -135,7 +114,7 @@ ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templat
RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh
# Manual apps
ENV PACKAGES="alsa-utils libasound2-plugins nginx"
ENV PACKAGES="alsa-utils libasound2-plugins"
# Automatic apps & bashio
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"

View File

@@ -61,34 +61,24 @@
"environment": {
},
"init": false,
"ingress": true,
"ingress_stream": true,
"map": [
"addon_config:rw",
"media:rw",
"share:rw"
],
"name": "zzz Do not use",
"options": {
"COMMAND": "realtime"
},
"name": "BirdNET-pi",
"panel_icon": "mdi:bird",
"ports": {
"80/tcp": 80
},
"ports_description": {
"80/tcp": "web ui",
"8888/tcp": "web terminal",
"8080/tcp": "log",
"8501/tcp": "streamlit"
"80/tcp": "web ui"
},
"privileged": [
"SYS_ADMIN",
"DAC_READ_SEARCH"
],
"schema": {
"ALSA_CARD": "int?",
"COMMAND": "str",
"TZ": "str?",
"cifsdomain": "str?",
"cifspassword": "str?",
@@ -98,6 +88,7 @@
},
"slug": "birdnet-pi",
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi",
"version": "1.9",
"video": true
"version": "1.0",
"video": true,
"webui": "[PROTO:ssl]://[HOST]:[PORT:80]"
}

View File

@@ -1,26 +0,0 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
#################
# NGINX SETTING #
#################
exit 0
declare ingress_interface
declare ingress_port
bashio::log.info "Setting up ingress"
echo "... adding new instructions"
cat /Caddyfile >> /etc/caddy/Caddyfile
rm /Caddyfile
echo "... customizing"
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/caddy/Caddyfile
sed -i "s/%%interface%%/${ingress_interface}/g" /etc/caddy/Caddyfile
sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/caddy/Caddyfile