mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-10-30 19:51:59 +01:00
refactor: rename bundled openHop Console build settings
This commit is contained in:
1 parent
2d04085b76
commit
05db509a6f
5 files changed
+27
-27
No files matched your search
+13
-13
@@ -10,14 +10,14 @@ ARG GPIO_GID=986
|
||||
ARG SPI_GID=989
|
||||
ARG TARGETARCH
|
||||
ARG YQ_VERSION=v4.40.5
|
||||
ARG PYMC_CONSOLE_REPO=Treehouse-00/pymc_console-dist
|
||||
ARG PYMC_CONSOLE_VERSION=latest
|
||||
ARG PYMC_CONSOLE_CACHE_BUST=default
|
||||
ARG OPENHOP_CONSOLE_REPO=Treehouse-00/pymc_console-dist
|
||||
ARG OPENHOP_CONSOLE_VERSION=latest
|
||||
ARG OPENHOP_CONSOLE_CACHE_BUST=default
|
||||
|
||||
ENV INSTALL_DIR=/opt/openhop_repeater \
|
||||
CONFIG_DIR=/etc/openhop_repeater \
|
||||
DATA_DIR=/var/lib/openhop_repeater \
|
||||
PYMC_CONSOLE_WEB_DIR=/opt/pymc_console/web/html \
|
||||
OPENHOP_CONSOLE_WEB_DIR=/opt/pymc_console/web/html \
|
||||
HOME_DIR=/home/${USER} \
|
||||
PATH=/home/${USER}/.local/bin:${PATH} \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
@@ -53,21 +53,21 @@ RUN arch="${TARGETARCH:-}" \
|
||||
&& wget -qO /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY}" \
|
||||
&& chmod +x /usr/local/bin/yq
|
||||
|
||||
# Bundle the optional PyMC Console frontend so the web UI can select it without
|
||||
# requiring a host bind mount. Use PYMC_CONSOLE_VERSION=latest to pull the
|
||||
# Bundle the optional openHop Console frontend so the web UI can select it without
|
||||
# requiring a host bind mount. Use OPENHOP_CONSOLE_VERSION=latest to pull the
|
||||
# newest release at image build time, or pin a tag such as v0.9.329.
|
||||
RUN set -eux; \
|
||||
echo "Bundling PyMC Console cache key: ${PYMC_CONSOLE_CACHE_BUST}"; \
|
||||
mkdir -p "${PYMC_CONSOLE_WEB_DIR}"; \
|
||||
if [ "${PYMC_CONSOLE_VERSION}" = "latest" ]; then \
|
||||
console_url="https://github.com/${PYMC_CONSOLE_REPO}/releases/latest/download/pymc-ui-latest.tar.gz"; \
|
||||
echo "Bundling openHop Console cache key: ${OPENHOP_CONSOLE_CACHE_BUST}"; \
|
||||
mkdir -p "${OPENHOP_CONSOLE_WEB_DIR}"; \
|
||||
if [ "${OPENHOP_CONSOLE_VERSION}" = "latest" ]; then \
|
||||
console_url="https://github.com/${OPENHOP_CONSOLE_REPO}/releases/latest/download/pymc-ui-latest.tar.gz"; \
|
||||
else \
|
||||
console_url="https://github.com/${PYMC_CONSOLE_REPO}/releases/download/${PYMC_CONSOLE_VERSION}/pymc-ui-${PYMC_CONSOLE_VERSION}.tar.gz"; \
|
||||
console_url="https://github.com/${OPENHOP_CONSOLE_REPO}/releases/download/${OPENHOP_CONSOLE_VERSION}/pymc-ui-${OPENHOP_CONSOLE_VERSION}.tar.gz"; \
|
||||
fi; \
|
||||
wget -qO /tmp/pymc-console.tar.gz "${console_url}"; \
|
||||
tar -xzf /tmp/pymc-console.tar.gz -C "${PYMC_CONSOLE_WEB_DIR}"; \
|
||||
tar -xzf /tmp/pymc-console.tar.gz -C "${OPENHOP_CONSOLE_WEB_DIR}"; \
|
||||
rm /tmp/pymc-console.tar.gz; \
|
||||
test -f "${PYMC_CONSOLE_WEB_DIR}/index.html"
|
||||
test -f "${OPENHOP_CONSOLE_WEB_DIR}/index.html"
|
||||
|
||||
# Create the group and user in order to run without root privileges
|
||||
RUN groupadd --gid "$PGID" "$GROUP" \
|
||||
|
||||
Reference in new issue
Block a user