Skip to content

Commit 4fa12c1

Browse files
committed
fix: install meshcentral to fixed path /opt/meshcentral
Node.js 24 on Alpine installs npm global packages to a different path than /usr/lib/node_modules. Using --prefix /opt/meshcentral gives a predictable install location. run.sh updated to use /opt/meshcentral/lib/node_modules/meshcentral. Bump version to 0.2.4.
1 parent c75bc5a commit 4fa12c1

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

meshcentral/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
ARG BUILD_FROM=ghcr.io/home-assistant/amd64-base:latest
22
FROM $BUILD_FROM
33

4-
# Install Node.js and jq (required for MeshCentral and config management)
4+
# Install Node.js and jq
55
RUN apk add --no-cache nodejs npm jq
66

7-
# Install MeshCentral
8-
RUN npm install -g meshcentral
7+
# Install MeshCentral to a fixed known path
8+
RUN npm install -g meshcentral --prefix /opt/meshcentral
99

1010
# Copy startup script
1111
COPY run.sh /run.sh

meshcentral/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "MeshCentral",
3-
"version": "0.2.3",
3+
"version": "0.2.4",
44
"slug": "meshcentral",
55
"description": "Self-hosted remote device management — monitor and control your PCs from Home Assistant",
66
"url": "https://github.com/andlo/ha-meshcentral-addon",

meshcentral/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,6 @@ fi
154154
# ── Start MeshCentral ─────────────────────────────────────────────────────────
155155

156156
bashio::log.info "Starting MeshCentral node process..."
157-
exec node /usr/lib/node_modules/meshcentral \
157+
exec node /opt/meshcentral/lib/node_modules/meshcentral \
158158
--datapath "${DATA_PATH}" \
159159
--filespath "${FILES_PATH}"

0 commit comments

Comments
 (0)