diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 93a4f92..45c3772 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -13,8 +13,8 @@ on: description: "Docker image repository to publish to" required: false default: "" - pymc_console_version: - description: "PyMC Console release to bundle (latest or a tag such as v0.9.333)" + openhop_console_version: + description: "openHop Console release to bundle (latest or a tag such as v0.9.333)" required: false default: "latest" @@ -77,11 +77,11 @@ jobs: echo "Using image repository: ${image_repository}" echo "image_repository=${image_repository}" >> "$GITHUB_OUTPUT" - - name: Resolve bundled Console release + - name: Resolve bundled openHop Console release id: console_release shell: bash env: - REQUESTED_CONSOLE_VERSION: ${{ inputs.pymc_console_version || 'latest' }} + REQUESTED_CONSOLE_VERSION: ${{ inputs.openhop_console_version || 'latest' }} run: | set -euo pipefail @@ -95,7 +95,7 @@ jobs: cache_bust="${REQUESTED_CONSOLE_VERSION}" fi - echo "Bundling PyMC Console ${tag}" + echo "Bundling openHop Console ${tag}" echo "version=${REQUESTED_CONSOLE_VERSION}" >> "$GITHUB_OUTPUT" echo "cache_bust=${cache_bust}" >> "$GITHUB_OUTPUT" @@ -119,8 +119,8 @@ jobs: push: true build-args: | PACKAGE_VERSION=${{ steps.package_version.outputs.version }} - PYMC_CONSOLE_VERSION=${{ steps.console_release.outputs.version }} - PYMC_CONSOLE_CACHE_BUST=${{ steps.console_release.outputs.cache_bust }} + OPENHOP_CONSOLE_VERSION=${{ steps.console_release.outputs.version }} + OPENHOP_CONSOLE_CACHE_BUST=${{ steps.console_release.outputs.cache_bust }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha diff --git a/README.md b/README.md index ca943f7..479557f 100644 --- a/README.md +++ b/README.md @@ -429,12 +429,12 @@ that source as a directory, which breaks startup. docker compose up -d ``` -The Docker image bundles the optional PyMC Console frontend at +The Docker image bundles the optional openHop Console frontend at `/opt/pymc_console/web/html`. Local builds with `docker-compose.build.yml` -download the newest PyMC Console release by default. Set `PYMC_CONSOLE_VERSION` +download the newest openHop Console release by default. Set `OPENHOP_CONSOLE_VERSION` in `.env` to pin a release tag such as `v0.9.329`. -After the container starts, open Web Settings and choose `PyMC Console` as the +After the container starts, open Web Settings and choose `openHop Console` as the web frontend if you want the repeater to serve that UI. The existing `/api/check_pymc_console` endpoint should report that the Console path exists. diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 6ac020b..76e4337 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -10,4 +10,4 @@ services: DIALOUT_GID: ${DIALOUT_GID:-20} GPIO_GID: ${GPIO_GID:-986} SPI_GID: ${SPI_GID:-989} - PYMC_CONSOLE_VERSION: ${PYMC_CONSOLE_VERSION:-latest} + OPENHOP_CONSOLE_VERSION: ${OPENHOP_CONSOLE_VERSION:-${PYMC_CONSOLE_VERSION:-latest}} diff --git a/dockerfile b/dockerfile index 876a806..28d61c7 100644 --- a/dockerfile +++ b/dockerfile @@ -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" \ diff --git a/env.example b/env.example index bc317c0..c89b449 100644 --- a/env.example +++ b/env.example @@ -30,8 +30,8 @@ SPI_GID=989 PUID=15888 PGID=15888 -# Local build only. The Docker image bundles PyMC Console under +# Local build only. The Docker image bundles openHop Console under # /opt/pymc_console/web/html so it is available in Web Settings without a host -# bind mount. Use "latest" to pull the newest pyMC Console release at build +# bind mount. Use "latest" to pull the newest openHop Console release at build # time, or pin a tag such as v0.9.329. -PYMC_CONSOLE_VERSION=latest +OPENHOP_CONSOLE_VERSION=latest