This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added workaround to enable homeassistant plugin before startup
- Loading branch information
Showing
2 changed files
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,26 @@ | ||
FROM node:20-alpine | ||
FROM --platform=linux/amd64 node:20-alpine as installer | ||
|
||
ENV MATTERBRIDGE_VERSION "1.2.19" | ||
ENV MATTERBRIDGE_HOME_ASSISTANT_VERSION "0.0.4" | ||
|
||
RUN npm install -g matterbridge@${MATTERBRIDGE_VERSION} | ||
RUN npm install -g matterbridge-home-assistant@${MATTERBRIDGE_HOME_ASSISTANT_VERSION} | ||
|
||
RUN mkdir -p /root/.matterbridge/storage/.matterbridge | ||
RUN echo '{"key":"globalModulesDirectory","value":"/usr/local/lib/node_modules"}' > /root/.matterbridge/storage/.matterbridge/d01917a070027b55bce538a96fa2004f061de6fe1644f402a321c6db8c71b9ba | ||
|
||
RUN matterbridge -add matterbridge-home-assistant | ||
|
||
FROM node:20-alpine | ||
|
||
ENV HOME_ASSISTANT_URL="" | ||
ENV HOME_ASSISTANT_ACCESS_TOKEN="" | ||
ENV HOME_ASSISTANT_CLIENT_CONFIG="{}" | ||
|
||
EXPOSE 8283 | ||
EXPOSE 8284 | ||
|
||
RUN npm install -g matterbridge@${MATTERBRIDGE_VERSION} | ||
RUN npm install -g matterbridge-home-assistant@${MATTERBRIDGE_HOME_ASSISTANT_VERSION} | ||
RUN matterbridge -add matterbridge-home-assistant | ||
COPY --from=installer /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
COPY --from=installer /root/.matterbridge /root/.matterbridge | ||
|
||
CMD matterbridge -bridge |