create a custom hassio repository with portainer
This commit is contained in:
6
portainer/rootfs/etc/cont-init.d/portainer.sh
Normal file
6
portainer/rootfs/etc/cont-init.d/portainer.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Portainer
|
||||
# Runs some initializations for Portainer
|
||||
# ==============================================================================
|
||||
bashio::require.unprotected
|
||||
9
portainer/rootfs/etc/services.d/portainer/finish
Normal file
9
portainer/rootfs/etc/services.d/portainer/finish
Normal 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
|
||||
21
portainer/rootfs/etc/services.d/portainer/run
Normal file
21
portainer/rootfs/etc/services.d/portainer/run
Normal 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[@]}"
|
||||
Reference in New Issue
Block a user