Fix ssl path for configurator (#183)

* Update map.py

* Update config.json

* Update Dockerfile
This commit is contained in:
Pascal Vizeli
2017-09-30 21:04:55 +02:00
committed by GitHub
parent 6c84c8bbd9
commit f0b0a69490
3 changed files with 8 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ ENV LANG C.UTF-8
ARG BUILD_VERSION ARG BUILD_VERSION
RUN apk add --no-cache python3 git curl \ RUN apk add --no-cache python3 git curl \
&& pip3 install GitPython \ && pip3 install GitPython \
&& curl -s -o /configurator.py https://raw.githubusercontent.com/danielperna84/hass-configurator/$BUILD_VERSION/configurator.py \ && curl -s -o /configurator.py https://raw.githubusercontent.com/danielperna84/hass-configurator/"$(echo "$BUILD_VERSION" | cut -d '-' -f 1)"/configurator.py \
&& sed -i "s/GIT = False/GIT = True/g" /configurator.py \ && sed -i "s/GIT = False/GIT = True/g" /configurator.py \
&& apk del curl && apk del curl

View File

@@ -1,6 +1,6 @@
{ {
"name": "Configurator", "name": "Configurator",
"version": "0.2.0", "version": "0.2.0-p1",
"slug": "configurator", "slug": "configurator",
"description": "Browser-based configuration file editor for Home Assistant.", "description": "Browser-based configuration file editor for Home Assistant.",
"url": "https://home-assistant.io/addons/configurator", "url": "https://home-assistant.io/addons/configurator",

View File

@@ -13,9 +13,12 @@ configurator = {
'BASEPATH': "/config", 'BASEPATH': "/config",
'HASS_API': options['homeassistant_api'], 'HASS_API': options['homeassistant_api'],
'HASS_API_PASSWORD': options['homeassistant_password'], 'HASS_API_PASSWORD': options['homeassistant_password'],
'CREDENTIALS': "{}:{}".format(options['username'], options['password']), 'CREDENTIALS':
'SSL_CERTIFICATE': options['certfile'] if options['ssl'] else None, "{}:{}".format(options['username'], options['password']),
'SSL_KEY': options['keyfile'] if options['ssl'] else None, 'SSL_CERTIFICATE':
"ssl/{}".format(options['certfile']) if options['ssl'] else None,
'SSL_KEY':
"ssl/{}".format(options['keyfile']) if options['ssl'] else None,
'ALLOWED_NETWORKS': options['allowed_networks'], 'ALLOWED_NETWORKS': options['allowed_networks'],
'BANNED_IPS': options['banned_ips'], 'BANNED_IPS': options['banned_ips'],
'IGNORE_PATTERN': options['ignore_pattern'], 'IGNORE_PATTERN': options['ignore_pattern'],