mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-18 18:38:17 +01:00
Rollback code to 2.17.1-2
https://github.com/alexbelgium/hassio-addons/issues/745
This commit is contained in:
@@ -63,7 +63,7 @@ RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \
|
||||
if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi
|
||||
|
||||
# Modules
|
||||
ARG MODULES="01-custom_script.sh"
|
||||
ARG MODULES="00-banner.sh 01-custom_script.sh"
|
||||
|
||||
# Automatic modules download
|
||||
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
|
||||
@@ -89,20 +89,15 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get
|
||||
# 4 Entrypoint #
|
||||
################
|
||||
|
||||
RUN chmod 777 /etc/services.d/*/*
|
||||
#RUN chmod 777 /entrypoint.sh
|
||||
#WORKDIR /
|
||||
#ENTRYPOINT [ "/usr/bin/env" ]
|
||||
#CMD [ "/entrypoint.sh" ]
|
||||
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
#################
|
||||
# 5 Healthcheck #
|
||||
#################
|
||||
|
||||
HEALTHCHECK CMD curl --fail http://127.0.0.1:9000 || exit 1
|
||||
|
||||
############
|
||||
# 6 Labels #
|
||||
# 5 Labels #
|
||||
############
|
||||
|
||||
ARG BUILD_ARCH
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
## ⚠ Open Request : [✨ [REQUEST] Portainer Agent (opened 2022-11-19)](https://github.com/alexbelgium/hassio-addons/issues/565) by [@rikardronnkvist](https://github.com/rikardronnkvist)
|
||||
## ⚠ Open Issue : [Installed Portainer Add-on but it does not start (opened 2023-02-27)](https://github.com/alexbelgium/hassio-addons/issues/736) by [@deltabert](https://github.com/deltabert)
|
||||
# Home assistant add-on: Portainer
|
||||
|
||||
[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"build_from": {
|
||||
"aarch64": "ghcr.io/hassio-addons/base:13.1.2",
|
||||
"amd64": "ghcr.io/hassio-addons/base:13.1.2",
|
||||
"armv7": "ghcr.io/hassio-addons/base:13.1.2"
|
||||
"aarch64": "ghcr.io/hassio-addons/base/aarch64:stable",
|
||||
"amd64": "ghcr.io/hassio-addons/base/amd64:stable",
|
||||
"armv7": "ghcr.io/hassio-addons/base/armv7:stable"
|
||||
},
|
||||
"codenotary": {
|
||||
"signer": "alexandrep.github@gmail.com"
|
||||
|
||||
@@ -45,5 +45,5 @@
|
||||
},
|
||||
"slug": "portainer",
|
||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||
"version": "2.17.1-4"
|
||||
"version": "2.17.1-2"
|
||||
}
|
||||
|
||||
23
portainer/rootfs/etc/cont-init.d/00-aaa_portainer_install.sh
Normal file
23
portainer/rootfs/etc/cont-init.d/00-aaa_portainer_install.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
if [ -e "/PORTFILE" ]; then
|
||||
echo "Installing portainer..."
|
||||
BUILD_UPSTREAM=$(</PORTFILE)
|
||||
BUILD_ARCH=$(uname -m)
|
||||
|
||||
echo "${BUILD_ARCH}"
|
||||
BUILD_ARCH=${BUILD_ARCH:-x86}
|
||||
|
||||
if [[ "${BUILD_ARCH}" == *aarch64* ]]; then ARCH="arm64"; fi
|
||||
if [[ "${BUILD_ARCH}" == *armv8* ]]; then ARCH="arm64"; fi
|
||||
if [[ "${BUILD_ARCH}" == *arm64* ]]; then ARCH="arm64"; fi
|
||||
if [[ "${BUILD_ARCH}" == *armhf* ]]; then ARCH="arm"; fi
|
||||
if [[ "${BUILD_ARCH}" == *armv7* ]]; then ARCH="arm"; fi
|
||||
if [[ "${BUILD_ARCH}" == arm ]]; then ARCH="arm"; fi
|
||||
if [[ "${BUILD_ARCH}" == *x86* ]]; then ARCH="amd64"; fi
|
||||
|
||||
curl -f -L -s -S \
|
||||
"https://github.com/portainer/portainer/releases/download/${BUILD_UPSTREAM}/portainer-${BUILD_UPSTREAM}-linux-${ARCH}.tar.gz" |
|
||||
tar zxvf - -C /opt/ >/dev/null
|
||||
echo "... success!"
|
||||
fi
|
||||
4
portainer/rootfs/etc/s6-overlay/s6-rc.d/init-nginx/run → portainer/rootfs/etc/cont-init.d/30-nginx.sh
Executable file → Normal file
4
portainer/rootfs/etc/s6-overlay/s6-rc.d/init-nginx/run → portainer/rootfs/etc/cont-init.d/30-nginx.sh
Executable file → Normal file
@@ -1,4 +1,4 @@
|
||||
#!/command/with-contenv bashio
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
#################
|
||||
@@ -30,5 +30,3 @@ bashio::var.json \
|
||||
tempio \
|
||||
-template /etc/nginx/templates/ingress.gtpl \
|
||||
-out /etc/nginx/servers/ingress.conf
|
||||
|
||||
bashio::require.unprotected
|
||||
7
portainer/rootfs/etc/cont-init.d/portainer.sh
Normal file
7
portainer/rootfs/etc/cont-init.d/portainer.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Portainer
|
||||
# Runs some initializations for Portainer
|
||||
# ==============================================================================
|
||||
bashio::require.unprotected
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-nginx/run
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/command/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: AdGuard Home
|
||||
# Take down the S6 supervision tree when Nginx fails
|
||||
# ==============================================================================
|
||||
declare exit_code
|
||||
readonly exit_code_container=$(</run/s6-linux-init-container-results/exitcode)
|
||||
readonly exit_code_service="${1}"
|
||||
readonly exit_code_signal="${2}"
|
||||
readonly service="NGINX"
|
||||
|
||||
bashio::log.info \
|
||||
"Service ${service} exited with code ${exit_code_service}" \
|
||||
"(by signal ${exit_code_signal})"
|
||||
|
||||
if [[ "${exit_code_service}" -eq 256 ]]; then
|
||||
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||
echo $((128 + $exit_code_signal)) > /run/s6-linux-init-container-results/exitcode
|
||||
fi
|
||||
[[ "${exit_code_signal}" -eq 15 ]] && exec /run/s6/basedir/bin/halt
|
||||
elif [[ "${exit_code_service}" -ne 0 ]]; then
|
||||
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||
echo "${exit_code_service}" > /run/s6-linux-init-container-results/exitcode
|
||||
fi
|
||||
exec /run/s6/basedir/bin/halt
|
||||
fi
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/command/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: AdGuard Home
|
||||
# Runs the Nginx daemon
|
||||
# ==============================================================================
|
||||
|
||||
# Wait for adguard to become available
|
||||
bashio::net.wait_for 9000 localhost 900
|
||||
|
||||
bashio::log.info "Starting NGinx..."
|
||||
exec nginx
|
||||
@@ -1 +0,0 @@
|
||||
longrun
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: AdGuard Home
|
||||
# Take down the S6 supervision tree when Adguard Home fails
|
||||
# ==============================================================================
|
||||
declare exit_code
|
||||
readonly exit_code_container=$(</run/s6-linux-init-container-results/exitcode)
|
||||
readonly exit_code_service="${1}"
|
||||
readonly exit_code_signal="${2}"
|
||||
readonly service="Adguard Home"
|
||||
|
||||
bashio::log.info \
|
||||
"Service ${service} exited with code ${exit_code_service}" \
|
||||
"(by signal ${exit_code_signal})"
|
||||
|
||||
if [[ "${exit_code_service}" -eq 256 ]]; then
|
||||
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||
echo $((128 + $exit_code_signal)) > /run/s6-linux-init-container-results/exitcode
|
||||
fi
|
||||
[[ "${exit_code_signal}" -eq 15 ]] && exec /run/s6/basedir/bin/halt
|
||||
elif [[ "${exit_code_service}" -ne 0 ]]; then
|
||||
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||
echo "${exit_code_service}" > /run/s6-linux-init-container-results/exitcode
|
||||
fi
|
||||
exec /run/s6/basedir/bin/halt
|
||||
fi
|
||||
@@ -1 +0,0 @@
|
||||
longrun
|
||||
9
portainer/rootfs/etc/services.d/nginx/finish
Normal file
9
portainer/rootfs/etc/services.d/nginx/finish
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
#!/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
|
||||
12
portainer/rootfs/etc/services.d/nginx/run
Normal file
12
portainer/rootfs/etc/services.d/nginx/run
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
|
||||
bashio::log.info "Waiting for port 9000 to open..."
|
||||
|
||||
# Wait for transmission to become available
|
||||
bashio::net.wait_for 9000 localhost 900
|
||||
|
||||
bashio::log.info "Starting NGinx..."
|
||||
|
||||
exec nginx
|
||||
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
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/command/with-contenv bashio
|
||||
#!/usr/bin/env bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
bashio::log.info "Starting Portainer..."
|
||||
@@ -503,7 +503,7 @@ configuration:
|
||||
description: See upstream app documentation
|
||||
whitelist:
|
||||
name: whitelist
|
||||
description: '"localhost,192.168.0.0/16" # list ip subnets that that can access the webui'
|
||||
description: '"localhost,192.168.0.0/16" # list ip subnets that do no need a password'
|
||||
WHOOGLE_ALT_IG:
|
||||
name: WHOOGLE_ALT_IG
|
||||
description: See upstream app documentation
|
||||
|
||||
Reference in New Issue
Block a user