configurator: Version 5.0.0 (#1229)

This commit is contained in:
Franck Nijhof
2020-04-16 19:54:12 +02:00
committed by GitHub
parent ac4582b639
commit 529ac8f930
8 changed files with 50 additions and 31 deletions

View File

@@ -1,5 +1,10 @@
# Changelog
## 5.0.0
- Rewrite add-on to S6 Overlay
- Reduced add-on size
## 4.7
- Fix file history width

View File

@@ -2,15 +2,23 @@ ARG BUILD_FROM
FROM $BUILD_FROM
# Setup base
ARG BUILD_ARCH
ARG CONFIGURATOR_VERSION
RUN apk add --no-cache \
RUN \
apk add --no-cache \
git \
openssh-client \
&& pip install --no-cache-dir \
hass-configurator==${CONFIGURATOR_VERSION}
python3 \
&& pip3 install \
--no-cache-dir \
--prefer-binary \
--find-links "https://wheels.home-assistant.io/alpine-3.11/${BUILD_ARCH}/" \
hass-configurator=="${CONFIGURATOR_VERSION}" \
\
&& find /usr/local \
\( -type d -a -name test -o -name tests -o -name '__pycache__' \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' +
# Copy data
COPY data/configurator.conf /etc/
COPY data/run.sh /
CMD ["/run.sh"]
COPY rootfs /

View File

@@ -1,10 +1,10 @@
{
"build_from": {
"aarch64": "homeassistant/aarch64-base-python:3.7",
"amd64": "homeassistant/amd64-base-python:3.7",
"armhf": "homeassistant/armhf-base-python:3.7",
"armv7": "homeassistant/armv7-base-python:3.7",
"i386": "homeassistant/i386-base-python:3.7"
"aarch64": "homeassistant/aarch64-base:3.11",
"amd64": "homeassistant/amd64-base:3.11",
"armhf": "homeassistant/armhf-base:3.11",
"armv7": "homeassistant/armv7-base:3.11",
"i386": "homeassistant/i386-base:3.11"
},
"args": {
"CONFIGURATOR_VERSION": "0.4.0"

View File

@@ -1,12 +1,13 @@
{
"name": "File editor",
"version": "4.7",
"version": "5.0.0",
"slug": "configurator",
"description": "Simple browser-based file editor for Home Assistant",
"url": "https://github.com/home-assistant/hassio-addons/tree/master/configurator",
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
"homeassistant": "0.91.1",
"startup": "application",
"init": false,
"ingress": true,
"panel_icon": "mdi:wrench",
"homeassistant_api": true,

View File

@@ -7,7 +7,7 @@
"SSL_CERTIFICATE": null,
"SSL_KEY": null,
"IGNORE_SSL": false,
"HASS_API": "http://hassio/homeassistant/api/",
"HASS_API": "http://supervisor/homeassistant/api/",
"HASS_WS_API": null,
"HASS_API_PASSWORD": null,
"USERNAME": null,

View File

@@ -0,0 +1,8 @@
#!/usr/bin/execlineb -S1
# ==============================================================================
# Take down the S6 supervision tree based on service exit code
# ==============================================================================
if { s6-test ${1} -ne 0 }
if { s6-test ${1} -ne 256 }
s6-svscanctl -t /var/run/s6/services

View File

@@ -1,9 +1,11 @@
#!/usr/bin/env bashio
set -e
DIRSFIRST=$(bashio::config 'dirsfirst')
ENFORCE_BASEPATH=$(bashio::config 'enforce_basepath')
IGNORE_PATTERN="$(bashio::config 'ignore_pattern | join(",")')"
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Start Configurator service
# ==============================================================================
export HC_DIRSFIRST
export HC_ENFORCE_BASEPATH
export HC_HASS_API_PASSWORD
export HC_IGNORE_PATTERN
# If any SSH key files are defined in the configuration options, add them for use by git
if bashio::config.has_value "ssh_keys"; then
@@ -20,19 +22,12 @@ if bashio::config.has_value "ssh_keys"; then
bashio::log.error "SSH key file \"${filename}\" not found"
fi
done <<< "$(bashio::config 'ssh_keys')"
# Disable strict host key checking
mkdir -p ~/.ssh
{
echo "Host *"
echo " StrictHostKeyChecking no"
} > ~/.ssh/config
fi
# Setup and run configurator
export HC_HASS_API_PASSWORD="${HASSIO_TOKEN}"
export HC_DIRSFIRST="${DIRSFIRST}"
export HC_ENFORCE_BASEPATH="${ENFORCE_BASEPATH}"
export HC_IGNORE_PATTERN="${IGNORE_PATTERN}"
HC_DIRSFIRST=$(bashio::config 'dirsfirst')
HC_ENFORCE_BASEPATH=$(bashio::config 'enforce_basepath')
HC_HASS_API_PASSWORD="${SUPERVISOR_TOKEN}"
HC_IGNORE_PATTERN="$(bashio::config 'ignore_pattern | join(",")')"
exec hass-configurator /etc/configurator.conf

View File

@@ -0,0 +1,2 @@
Host *
StrictHostKeyChecking no