create a custom hassio repository with portainer

This commit is contained in:
2022-08-13 20:19:59 +02:00
parent 1b71c11b96
commit 5055e39cd0
26 changed files with 374 additions and 185 deletions

View File

@@ -0,0 +1,6 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Portainer
# Runs some initializations for Portainer
# ==============================================================================
bashio::require.unprotected

View File

@@ -0,0 +1,9 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Home Assistant Community Add-on: Portainer
# Take down the S6 supervision tree when Portainer fails
# ==============================================================================
if { s6-test ${1} -ne 0 }
if { s6-test ${1} -ne 256 }
s6-svscanctl -t /var/run/s6/services

View File

@@ -0,0 +1,21 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Portainer
# Runs portainer
# ==============================================================================
declare -a options
export AGENT_SECRET
bashio::log.info 'Starting Portainer...'
options+=(--data /data)
options+=(--bind 0.0.0.0:8099)
options+=(--host unix:///var/run/docker.sock)
# Export agent secret, if defined
if bashio::config.has_value 'agent_secret' ; then
AGENT_SECRET=$(bashio::config 'agent_secret')
fi
# Run Portainer
exec /opt/portainer/portainer "${options[@]}"