mirror of
https://github.com/hassio-addons/addon-thelounge.git
synced 2025-05-04 19:11:27 +00:00
⬆️ Upgrade to base 3.0.0 and migrate to bashio
This commit is contained in:
parent
a2244c6529
commit
1e23014cbd
6 changed files with 28 additions and 52 deletions
|
@ -6,9 +6,10 @@ variables:
|
|||
ADDON_SLUG: "thelounge"
|
||||
ADDON_TARGET: "thelounge"
|
||||
|
||||
ADDON_ARMV7: "false"
|
||||
ADDON_LEGACY_TAGS: "true"
|
||||
|
||||
ADDON_AARCH64_BASE: "hassioaddons/base-aarch64:2.3.1"
|
||||
ADDON_AMD64_BASE: "hassioaddons/base-amd64:2.3.1"
|
||||
ADDON_ARMHF_BASE: "hassioaddons/base-armhf:2.3.1"
|
||||
ADDON_I386_BASE: "hassioaddons/base-i386:2.3.1"
|
||||
ADDON_AARCH64_BASE: "hassioaddons/base-aarch64:3.0.0"
|
||||
ADDON_AMD64_BASE: "hassioaddons/base-amd64:3.0.0"
|
||||
ADDON_ARMHF_BASE: "hassioaddons/base-armhf:3.0.0"
|
||||
ADDON_ARMV7_BASE: "hassioaddons/base-armv7:3.0.0"
|
||||
ADDON_I386_BASE: "hassioaddons/base-i386:3.0.0"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
ARG BUILD_FROM=hassioaddons/base:2.3.1
|
||||
ARG BUILD_FROM=hassioaddons/base:3.0.0
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
|
@ -6,8 +6,8 @@ FROM ${BUILD_FROM}
|
|||
# hadolint ignore=DL3003
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
nodejs-current=9.11.1-r2 \
|
||||
yarn=1.7.0-r0 \
|
||||
nodejs-current=11.3.0-r0 \
|
||||
yarn=1.12.3-r0 \
|
||||
\
|
||||
&& yarn global add thelounge@3.0.1 \
|
||||
\
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"args": {},
|
||||
"build_from": {
|
||||
"aarch64": "hassioaddons/base-aarch64:2.3.1",
|
||||
"amd64": "hassioaddons/base-amd64:2.3.1",
|
||||
"armhf": "hassioaddons/base-armhf:2.3.1",
|
||||
"i386": "hassioaddons/base-i386:2.3.1"
|
||||
"aarch64": "hassioaddons/base-aarch64:3.0.0",
|
||||
"amd64": "hassioaddons/base-amd64:3.0.0",
|
||||
"armhf": "hassioaddons/base-armhf:3.0.0",
|
||||
"i386": "hassioaddons/base-i386:3.0.0"
|
||||
},
|
||||
"squash": false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,26 +1,7 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: The Lounge
|
||||
# This checks if all user configuration requirements are met
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
# Check SSL requirements, if enabled
|
||||
if hass.config.true 'ssl'; then
|
||||
if ! hass.config.has_value 'certfile'; then
|
||||
hass.die 'SSL is enabled, but no certfile was specified'
|
||||
fi
|
||||
|
||||
if ! hass.config.has_value 'keyfile'; then
|
||||
hass.die 'SSL is enabled, but no keyfile was specified'
|
||||
fi
|
||||
|
||||
if ! hass.file_exists "/ssl/$(hass.config.get 'certfile')"; then
|
||||
hass.die 'The configured certfile is not found'
|
||||
fi
|
||||
|
||||
if ! hass.file_exists "/ssl/$(hass.config.get 'keyfile')"; then
|
||||
hass.die 'The configured keyfile is not found'
|
||||
fi
|
||||
fi
|
||||
# Check SSL settings
|
||||
bashio::config.require.ssl
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: The Lounge
|
||||
# This adds the default user and installs any requested themes
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
export THELOUNGE_HOME=/data/thelounge
|
||||
|
||||
if ! hass.directory_exists "/data/thelounge"; then
|
||||
hass.log.info "Creating default hassio user.."
|
||||
if ! bashio::fs.directory_exists "/data/thelounge"; then
|
||||
bashio::log.info "Creating default hassio user.."
|
||||
mkdir -p /data/thelounge/users
|
||||
cp /etc/thelounge/users/hassio.json /data/thelounge/users
|
||||
else
|
||||
for theme in $(hass.config.get "themes")
|
||||
for theme in $(bashio::config "themes")
|
||||
do
|
||||
/usr/local/bin/thelounge install "$theme"
|
||||
done
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: The Lounge
|
||||
# Runs The Lounge server
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
export THELOUNGE_HOME=/data/thelounge
|
||||
|
||||
hass.log.info "Starting The Lounge server.."
|
||||
bashio::log.info "Starting The Lounge server.."
|
||||
|
||||
exec /usr/local/bin/thelounge start \
|
||||
-c port=15100 \
|
||||
-c https.enable="$(hass.config.get 'ssl')" \
|
||||
-c https.ca="/ssl/$(hass.config.get 'certfile')" \
|
||||
-c https.certificate="/ssl/$(hass.config.get 'certfile')" \
|
||||
-c https.key="/ssl/$(hass.config.get 'keyfile')" \
|
||||
-c https.enable="$(bashio::config 'ssl')" \
|
||||
-c https.ca="/ssl/$(bashio::config 'certfile')" \
|
||||
-c https.certificate="/ssl/$(bashio::config 'certfile')" \
|
||||
-c https.key="/ssl/$(bashio::config 'keyfile')" \
|
||||
-c fileUpload=true \
|
||||
-c prefetch=true \
|
||||
-c prefetchStorage=true \
|
||||
-c theme="$(hass.config.get 'default_theme')"
|
||||
-c theme="$(bashio::config 'default_theme')"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue