Archived
1
0
Fork 0

Support weewx-wdc custom skin.conf

This commit is contained in:
Daniel Kempkens 2022-07-10 19:12:38 +02:00
parent f4209e881f
commit 895228eb38
2 changed files with 11 additions and 5 deletions

View file

@ -11,6 +11,11 @@ RUN addgroup --system --gid 421 weewx &&\
WORKDIR /tmp
COPY requirements.txt ./
# Python setup
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install --no-cache-dir --requirement requirements.txt
# WeeWX setup
RUN wget -O "${ARCHIVE}" "http://www.weewx.com/downloads/released_versions/${ARCHIVE}" &&\
wget -O weewx-interceptor.zip https://github.com/matthewwall/weewx-interceptor/archive/master.zip &&\
@ -21,11 +26,6 @@ RUN wget -O "${ARCHIVE}" "http://www.weewx.com/downloads/released_versions/${ARC
mkdir weewx-wdc && unzip weewx-wdc.zip -d weewx-wdc &&\
chown -R weewx:weewx ${WEEWX_HOME}
# Python setup
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install --no-cache-dir --requirement requirements.txt
WORKDIR ${WEEWX_HOME}
RUN bin/wee_extension --install /tmp/weewx-interceptor.zip &&\
@ -33,6 +33,7 @@ RUN bin/wee_extension --install /tmp/weewx-interceptor.zip &&\
bin/wee_extension --install /tmp/neowx-material.zip &&\
bin/wee_extension --install /tmp/weewx-wdc &&\
mkdir user
COPY entrypoint.sh ./
COPY user/ ./bin/user/

View file

@ -28,6 +28,11 @@ if [ "$(id -u)" = 0 ]; then
ln -s /data/neowx-material-skin.conf ./skins/neowx-material/skin.conf
fi
if [ -e /data/weewx-wdc-skin.conf ]; then
rm -f ./skins/weewx-wdc/skin.conf
ln -s /data/weewx-wdc-skin.conf ./skins/weewx-wdc/skin.conf
fi
if [ "${WEEWX_UID:-weewx}" != 0 ]; then
# drop privileges and restart this script
echo "Switching uid:gid to ${WEEWX_UID:-weewx}:${WEEWX_GID:-weewx}"