Support weewx-wdc custom skin.conf
This commit is contained in:
parent
f4209e881f
commit
895228eb38
2 changed files with 11 additions and 5 deletions
11
Dockerfile
11
Dockerfile
|
@ -11,6 +11,11 @@ RUN addgroup --system --gid 421 weewx &&\
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
COPY requirements.txt ./
|
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
|
# WeeWX setup
|
||||||
RUN wget -O "${ARCHIVE}" "http://www.weewx.com/downloads/released_versions/${ARCHIVE}" &&\
|
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 &&\
|
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 &&\
|
mkdir weewx-wdc && unzip weewx-wdc.zip -d weewx-wdc &&\
|
||||||
chown -R weewx:weewx ${WEEWX_HOME}
|
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}
|
WORKDIR ${WEEWX_HOME}
|
||||||
|
|
||||||
RUN bin/wee_extension --install /tmp/weewx-interceptor.zip &&\
|
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/neowx-material.zip &&\
|
||||||
bin/wee_extension --install /tmp/weewx-wdc &&\
|
bin/wee_extension --install /tmp/weewx-wdc &&\
|
||||||
mkdir user
|
mkdir user
|
||||||
|
|
||||||
COPY entrypoint.sh ./
|
COPY entrypoint.sh ./
|
||||||
COPY user/ ./bin/user/
|
COPY user/ ./bin/user/
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,11 @@ if [ "$(id -u)" = 0 ]; then
|
||||||
ln -s /data/neowx-material-skin.conf ./skins/neowx-material/skin.conf
|
ln -s /data/neowx-material-skin.conf ./skins/neowx-material/skin.conf
|
||||||
fi
|
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
|
if [ "${WEEWX_UID:-weewx}" != 0 ]; then
|
||||||
# drop privileges and restart this script
|
# drop privileges and restart this script
|
||||||
echo "Switching uid:gid to ${WEEWX_UID:-weewx}:${WEEWX_GID:-weewx}"
|
echo "Switching uid:gid to ${WEEWX_UID:-weewx}:${WEEWX_GID:-weewx}"
|
||||||
|
|
Reference in a new issue