Compare commits

..

2 Commits

2 changed files with 49 additions and 1 deletions

View File

@ -30,6 +30,7 @@ RUN cd /usr/src/sispmctl;make; ls -al
RUN git clone https://github.com/fhem/fhem-mirror.git /fhem-src;cd /fhem-src;git checkout main RUN git clone https://github.com/fhem/fhem-mirror.git /fhem-src;cd /fhem-src;git checkout main
RUN git clone https://gitea.federationhq.de/byterazor/FHEM-NEWSISPM.git /NEWSISPM RUN git clone https://gitea.federationhq.de/byterazor/FHEM-NEWSISPM.git /NEWSISPM
RUN git clone https://gitea.federationhq.de/byterazor/FHEM-NTFY.git /FHEM-NTFY
# #
# the main fhem image # the main fhem image
@ -265,6 +266,8 @@ COPY --from=builder /usr/src/sispmctl/src/.libs/*.so* /usr/lib/
COPY --from=builder /usr/src/sispmctl/src/.libs/sispmctl /usr/bin/ COPY --from=builder /usr/src/sispmctl/src/.libs/sispmctl /usr/bin/
COPY --from=builder /fhem-src/fhem /opt/fhem COPY --from=builder /fhem-src/fhem /opt/fhem
COPY --from=builder /NEWSISPM/FHEM/* /opt/fhem/FHEM/ COPY --from=builder /NEWSISPM/FHEM/* /opt/fhem/FHEM/
COPY --from=builder /FHEM-NTFY/FHEM/* /opt/fhem/FHEM/
# update libraries # update libraries
RUN ldconfig RUN ldconfig

View File

@ -30,8 +30,31 @@ else
); );
EOF EOF
`" >> /opt/fhem/configDB.conf; `" >> /opt/fhem/configDB.conf;
elif [ "${CONFIG_DATABASE_ENGINE}" == "mysql" ] then
if [ -z ${CONFIG_DATABASE_USER} ]; then
echo "please provide CONFIG_DATABASE_USER "
exit 255
fi fi
if [ -z ${CONFIG_DATABASE_USER} ]; then
echo "please provide CONFIG_DATABASE_ "
exit 255
fi
echo "`cat <<EOF
%dbconfig= (
connection => "mysql:dbname=${CONFIG_DATABASE}",
user => "${CONFIG_DATABASE_USER}",
password => "${CONFIG_DATABASE_PASS}"
);
EOF
else
echo "unknown database engine provided in CONFIG_DATABASE_ENGINE"
exit 255
fi
fi fi
if [ -n "${USELOGDB}" ]; then if [ -n "${USELOGDB}" ]; then
@ -59,6 +82,28 @@ if [ -n "${USELOGDB}" ]; then
); );
EOF EOF
`" >> /opt/fhem/db.conf; `" >> /opt/fhem/db.conf;
elif [ "${LOG_DATABASE_ENGINE}" == "mysql" ] then
if [ -z ${LOG_DATABASE_USER} ]; then
echo "please provide LOG_DATABASE_USER "
exit 255
fi
if [ -z ${LOG_DATABASE_USER} ]; then
echo "please provide LOG_DATABASE_ "
exit 255
fi
echo "`cat <<EOF
%dbconfig= (
connection => "mysql:dbname=${LOG_DATABASE}",
user => "${LOG_DATABASE_USER}",
password => "${LOG_DATABASE_PASS}"
);
EOF
else
echo "unknown database engine provided in LOG_DATABASE_ENGINE"
exit 255
fi fi
fi fi