turn into normal docker image (alpine) instead of hass-addon

This commit is contained in:
Lysann Tranvouez 2026-01-09 21:47:47 +01:00
parent 3d8b323fb4
commit 1c3f0135f3
10 changed files with 61 additions and 164 deletions

39
plejd/entrypoint.sh Normal file
View file

@ -0,0 +1,39 @@
#! /bin/sh
if [ -z "${site}" ]; then
echo "Plejd site not set."
exit 1
fi
if [ -z "${username}" ]; then
echo "Plejd username not set."
exit 1
fi
if [ -z "${password}" ]; then
echo "Plejd password not set."
exit 1
fi
if [ -z "${mqttUsername}" ]; then
echo "Mqtt username not set"
exit 1
fi
if [ -z "${mqttPassword}" ]; then
echo "Mqtt password not set"
exit 1
fi
mkdir /data
mqttBroker="${mqttBroker:=mqtt://}" \
includeRoomsAsLights="${includeRoomsAsLights:=false}" \
preferCachedApiResponse="${preferCachedApiResponse:=false}" \
updatePlejdClock="${updatePlejdClock:=false}" \
logLevel="${logLevel:=info}" \
connectionTimout="${connectionTimout:=2}" \
writeQueueWaitTime="${writeQueueWaitTime:=400}" \
envsubst <"/plejd/options.json.template" >"/data/options.json"
node /plejd/main.js