Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
fix: added workaround to enable homeassistant plugin before startup
Browse files Browse the repository at this point in the history
  • Loading branch information
t0bst4r committed Jun 2, 2024
1 parent 3da924d commit e1d437d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get Version
id: get_version
Expand Down
17 changes: 13 additions & 4 deletions docker/Dockerfile
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

0 comments on commit e1d437d

Please sign in to comment.