fix: update Docker image branding

This commit is contained in:
yellowcooln committed 2026-06-26 09:10:58 -04:00
1 parent fcaad1dacf
commit 4d095dad42
10 files changed
+49 -25

No files matched your search

+4 -4
View File
@@ -3,7 +3,7 @@
# Published image to run. Use a different repository or tag if you are testing # Published image to run. Use a different repository or tag if you are testing
# a fork or a specific release. # a fork or a specific release.
PYMC_REPEATER_IMAGE=pymcdev/openhop-repeater:main OPENHOP_REPEATER_IMAGE=openhop/openhop-repeater:main
# Storage defaults to Docker named volumes. This is the safest option for # Storage defaults to Docker named volumes. This is the safest option for
# Portainer and fresh installs because Docker preserves the image ownership. # Portainer and fresh installs because Docker preserves the image ownership.
@@ -12,8 +12,8 @@ PYMC_REPEATER_IMAGE=pymcdev/openhop-repeater:main
# sudo mkdir -p /opt/openhop-repeater/config /opt/openhop-repeater/data # sudo mkdir -p /opt/openhop-repeater/config /opt/openhop-repeater/data
# sudo chown -R 15888:15888 /opt/openhop-repeater/config /opt/openhop-repeater/data # sudo chown -R 15888:15888 /opt/openhop-repeater/config /opt/openhop-repeater/data
# Then uncomment and adjust these paths: # Then uncomment and adjust these paths:
# PYMC_CONFIG_VOLUME=/opt/openhop-repeater/config # OPENHOP_CONFIG_VOLUME=/opt/openhop-repeater/config
# PYMC_DATA_VOLUME=/opt/openhop-repeater/data # OPENHOP_DATA_VOLUME=/opt/openhop-repeater/data
# Serial/SPI/GPIO access uses the host's numeric group IDs. Check your host with: # Serial/SPI/GPIO access uses the host's numeric group IDs. Check your host with:
# getent group dialout # getent group dialout
@@ -29,6 +29,6 @@ GPIO_GID=986
SPI_GID=989 SPI_GID=989
# Local build only. These are used by docker-compose.build.yml if you build the # Local build only. These are used by docker-compose.build.yml if you build the
# image yourself instead of pulling PYMC_REPEATER_IMAGE. # image yourself instead of pulling OPENHOP_REPEATER_IMAGE.
PUID=15888 PUID=15888
PGID=15888 PGID=15888
+1 -1
View File
@@ -61,7 +61,7 @@ jobs:
elif [ "${{ github.repository }}" = "yellowcooln/openhop_repeater" ]; then elif [ "${{ github.repository }}" = "yellowcooln/openhop_repeater" ]; then
image_repository="yellowcooln/openhop-repeater" image_repository="yellowcooln/openhop-repeater"
else else
image_repository="pymcdev/openhop-repeater" image_repository="openhop/openhop-repeater"
fi fi
echo "Using image repository: ${image_repository}" echo "Using image repository: ${image_repository}"
+4 -4
View File
@@ -418,7 +418,7 @@ that source as a directory, which breaks startup.
### Setup ### Setup
1. Copy `.env.example` to `.env`. 1. Copy `.env.example` to `.env`.
2. Review `.env` and update `PYMC_REPEATER_IMAGE`, `DIALOUT_GID`, 2. Review `.env` and update `OPENHOP_REPEATER_IMAGE`, `DIALOUT_GID`,
`GPIO_GID`, or `SPI_GID` if needed. `GPIO_GID`, or `SPI_GID` if needed.
3. Configure `docker-compose.yml` for your hardware and device paths. 3. Configure `docker-compose.yml` for your hardware and device paths.
4. Uncomment the USB device mapping only if your host has that device path. 4. Uncomment the USB device mapping only if your host has that device path.
@@ -433,7 +433,7 @@ docker compose up -d
```yaml ```yaml
services: services:
openhop-repeater: openhop-repeater:
image: ${PYMC_REPEATER_IMAGE:-pymcdev/openhop-repeater:main} image: ${OPENHOP_REPEATER_IMAGE:-${PYMC_REPEATER_IMAGE:-openhop/openhop-repeater:main}}
container_name: openhop-repeater container_name: openhop-repeater
restart: unless-stopped restart: unless-stopped
ports: ports:
@@ -457,8 +457,8 @@ services:
- plugdev - plugdev
volumes: volumes:
- ${PYMC_CONFIG_VOLUME:-openhop-repeater-config}:/etc/openhop_repeater - ${OPENHOP_CONFIG_VOLUME:-${PYMC_CONFIG_VOLUME:-openhop-repeater-config}}:/etc/openhop_repeater
- ${PYMC_DATA_VOLUME:-openhop-repeater-data}:/var/lib/openhop_repeater - ${OPENHOP_DATA_VOLUME:-${PYMC_DATA_VOLUME:-openhop-repeater-data}}:/var/lib/openhop_repeater
volumes: volumes:
openhop-repeater-config: openhop-repeater-config:
+2 -2
View File
@@ -1247,12 +1247,12 @@ prepare_git_version() {
git -C "$SCRIPT_DIR" fetch --tags 2>/dev/null || true git -C "$SCRIPT_DIR" fetch --tags 2>/dev/null || true
git_version=$(python3 -m setuptools_scm 2>/dev/null || echo "1.0.5") git_version=$(python3 -m setuptools_scm 2>/dev/null || echo "1.0.5")
export SETUPTOOLS_SCM_PRETEND_VERSION="$git_version" export SETUPTOOLS_SCM_PRETEND_VERSION="$git_version"
export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYMC_REPEATER="$git_version" export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENHOP_REPEATER="$git_version"
info "Using version: $git_version" info "Using version: $git_version"
else else
git_version="1.0.5" git_version="1.0.5"
export SETUPTOOLS_SCM_PRETEND_VERSION="$git_version" export SETUPTOOLS_SCM_PRETEND_VERSION="$git_version"
export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYMC_REPEATER="$git_version" export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENHOP_REPEATER="$git_version"
info "Using fallback version: $git_version" info "Using fallback version: $git_version"
fi fi
+3 -3
View File
@@ -1,6 +1,6 @@
services: services:
openhop-repeater: openhop-repeater:
image: ${PYMC_REPEATER_IMAGE:-pymcdev/openhop-repeater:main} image: ${OPENHOP_REPEATER_IMAGE:-${PYMC_REPEATER_IMAGE:-openhop/openhop-repeater:main}}
container_name: openhop-repeater container_name: openhop-repeater
restart: unless-stopped restart: unless-stopped
ports: ports:
@@ -21,8 +21,8 @@ services:
- "${SPI_GID:-989}" - "${SPI_GID:-989}"
- plugdev - plugdev
volumes: volumes:
- ${PYMC_CONFIG_VOLUME:-openhop-repeater-config}:/etc/openhop_repeater - ${OPENHOP_CONFIG_VOLUME:-${PYMC_CONFIG_VOLUME:-openhop-repeater-config}}:/etc/openhop_repeater
- ${PYMC_DATA_VOLUME:-openhop-repeater-data}:/var/lib/openhop_repeater - ${OPENHOP_DATA_VOLUME:-${PYMC_DATA_VOLUME:-openhop-repeater-data}}:/var/lib/openhop_repeater
volumes: volumes:
openhop-repeater-config: openhop-repeater-config:
+1 -1
View File
@@ -3,7 +3,7 @@ set -eu
INSTALL_DIR="${INSTALL_DIR:-/opt/openhop_repeater}" INSTALL_DIR="${INSTALL_DIR:-/opt/openhop_repeater}"
CONFIG_DIR="${CONFIG_DIR:-/etc/openhop_repeater}" CONFIG_DIR="${CONFIG_DIR:-/etc/openhop_repeater}"
CONFIG_PATH="${PYMC_REPEATER_CONFIG:-${CONFIG_DIR}/config.yaml}" CONFIG_PATH="${OPENHOP_REPEATER_CONFIG:-${PYMC_REPEATER_CONFIG:-${CONFIG_DIR}/config.yaml}}"
EXAMPLE_PATH="${CONFIG_DIR}/config.yaml.example" EXAMPLE_PATH="${CONFIG_DIR}/config.yaml.example"
BUNDLED_EXAMPLE_PATH="${INSTALL_DIR}/config.yaml.example" BUNDLED_EXAMPLE_PATH="${INSTALL_DIR}/config.yaml.example"
RUNTIME_USER="${USER:-repeater}" RUNTIME_USER="${USER:-repeater}"
+1 -1
View File
@@ -17,7 +17,7 @@ ENV INSTALL_DIR=/opt/openhop_repeater \
HOME_DIR=/home/${USER} \ HOME_DIR=/home/${USER} \
PATH=/home/${USER}/.local/bin:${PATH} \ PATH=/home/${USER}/.local/bin:${PATH} \
PYTHONUNBUFFERED=1 \ PYTHONUNBUFFERED=1 \
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYMC_REPEATER=${PACKAGE_VERSION} \ SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENHOP_REPEATER=${PACKAGE_VERSION} \
PUID=${PUID} \ PUID=${PUID} \
PGID=${PGID} \ PGID=${PGID} \
DIALOUT_GID=${DIALOUT_GID} \ DIALOUT_GID=${DIALOUT_GID} \
+4 -4
View File
@@ -3,7 +3,7 @@
# Published image to run. Use a different repository or tag if you are testing # Published image to run. Use a different repository or tag if you are testing
# a fork or a specific release. # a fork or a specific release.
PYMC_REPEATER_IMAGE=pymcdev/openhop-repeater:main OPENHOP_REPEATER_IMAGE=openhop/openhop-repeater:main
# Storage defaults to Docker named volumes. This is the safest option for # Storage defaults to Docker named volumes. This is the safest option for
# Portainer and fresh installs because Docker preserves the image ownership. # Portainer and fresh installs because Docker preserves the image ownership.
@@ -12,8 +12,8 @@ PYMC_REPEATER_IMAGE=pymcdev/openhop-repeater:main
# sudo mkdir -p /opt/openhop-repeater/config /opt/openhop-repeater/data # sudo mkdir -p /opt/openhop-repeater/config /opt/openhop-repeater/data
# sudo chown -R 15888:15888 /opt/openhop-repeater/config /opt/openhop-repeater/data # sudo chown -R 15888:15888 /opt/openhop-repeater/config /opt/openhop-repeater/data
# Then uncomment and adjust these paths: # Then uncomment and adjust these paths:
# PYMC_CONFIG_VOLUME=/opt/openhop-repeater/config # OPENHOP_CONFIG_VOLUME=/opt/openhop-repeater/config
# PYMC_DATA_VOLUME=/opt/openhop-repeater/data # OPENHOP_DATA_VOLUME=/opt/openhop-repeater/data
# SPI/GPIO access uses the host's numeric group IDs. Check your host with: # SPI/GPIO access uses the host's numeric group IDs. Check your host with:
# getent group gpio # getent group gpio
@@ -26,6 +26,6 @@ GPIO_GID=986
SPI_GID=989 SPI_GID=989
# Local build only. These are used by docker-compose.build.yml if you build the # Local build only. These are used by docker-compose.build.yml if you build the
# image yourself instead of pulling PYMC_REPEATER_IMAGE. # image yourself instead of pulling OPENHOP_REPEATER_IMAGE.
PUID=15888 PUID=15888
PGID=15888 PGID=15888
+11 -4
View File
@@ -195,7 +195,10 @@ def get_node_info(config: Dict[str, Any]) -> Dict[str, Any]:
def load_config(config_path: Optional[str] = None) -> Dict[str, Any]: def load_config(config_path: Optional[str] = None) -> Dict[str, Any]:
if config_path is None: if config_path is None:
config_path = os.getenv("PYMC_REPEATER_CONFIG", "/etc/openhop_repeater/config.yaml") config_path = os.getenv(
"OPENHOP_REPEATER_CONFIG",
os.getenv("PYMC_REPEATER_CONFIG", "/etc/openhop_repeater/config.yaml"),
)
# Check if config file exists # Check if config file exists
if not Path(config_path).exists(): if not Path(config_path).exists():
@@ -301,10 +304,11 @@ def load_config(config_path: Optional[str] = None) -> Dict[str, Any]:
else: else:
config["repeater"]["identity_key"] = _load_or_create_identity_key() config["repeater"]["identity_key"] = _load_or_create_identity_key()
if os.getenv("PYMC_REPEATER_LOG_LEVEL"): env_log_level = os.getenv("OPENHOP_REPEATER_LOG_LEVEL", os.getenv("PYMC_REPEATER_LOG_LEVEL"))
if env_log_level:
if "logging" not in config: if "logging" not in config:
config["logging"] = {} config["logging"] = {}
config["logging"]["level"] = os.getenv("PYMC_REPEATER_LOG_LEVEL") config["logging"]["level"] = env_log_level
config = _load_policy_engine_config(config, config_path) config = _load_policy_engine_config(config, config_path)
@@ -323,7 +327,10 @@ def save_config(config_data: Dict[str, Any], config_path: Optional[str] = None)
True if successful, False otherwise True if successful, False otherwise
""" """
if config_path is None: if config_path is None:
config_path = os.getenv("PYMC_REPEATER_CONFIG", "/etc/openhop_repeater/config.yaml") config_path = os.getenv(
"OPENHOP_REPEATER_CONFIG",
os.getenv("PYMC_REPEATER_CONFIG", "/etc/openhop_repeater/config.yaml"),
)
try: try:
# Create backup of existing config # Create backup of existing config
+18 -1
View File
@@ -1,6 +1,6 @@
from types import SimpleNamespace from types import SimpleNamespace
from repeater.config import BaselineCrcCounterRadio from repeater.config import BaselineCrcCounterRadio, load_config
def test_baseline_crc_counter_radio_reports_delta_from_initial_raw_count(): def test_baseline_crc_counter_radio_reports_delta_from_initial_raw_count():
@@ -26,3 +26,20 @@ def test_baseline_crc_counter_radio_handles_delayed_modem_counter():
raw.crc_error_count = 148 raw.crc_error_count = 148
assert radio.crc_error_count == 3 assert radio.crc_error_count == 3
def test_load_config_prefers_openhop_env_names(tmp_path, monkeypatch):
legacy_path = tmp_path / "legacy.yaml"
openhop_path = tmp_path / "openhop.yaml"
legacy_path.write_text("repeater:\n identity_key: legacy\n", encoding="utf-8")
openhop_path.write_text("repeater:\n identity_key: openhop\n", encoding="utf-8")
monkeypatch.setenv("PYMC_REPEATER_CONFIG", str(legacy_path))
monkeypatch.setenv("OPENHOP_REPEATER_CONFIG", str(openhop_path))
monkeypatch.setenv("PYMC_REPEATER_LOG_LEVEL", "WARNING")
monkeypatch.setenv("OPENHOP_REPEATER_LOG_LEVEL", "DEBUG")
config = load_config()
assert config["repeater"]["identity_key"] == "openhop"
assert config["logging"]["level"] == "DEBUG"