Skip to content

Commit

Permalink
Merge pull request #140 from Luligu/dev
Browse files Browse the repository at this point in the history
Docker
  • Loading branch information
Luligu authored Sep 21, 2024
2 parents 91615b2 + a960dbd commit 770b1f8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker-buildx-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: |
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
-f docker/Dockerfile.latest \
-f docker/Dockerfile.main \
-t luligu/matterbridge:latest \
-t luligu/matterbridge:${{ env.VERSION }} \
--push .
Expand Down
36 changes: 36 additions & 0 deletions docker/Dockerfile.main
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM node:22-bookworm-slim AS base
WORKDIR /app
# RUN npm install -g npm@10.7.0


FROM base AS builder
WORKDIR /app
COPY ./package.json ./
COPY ./tsconfig.json ./
COPY ./src ./src
COPY ./frontend/build ./frontend/build
RUN npm install && npm run build && npm link


FROM base AS release
WORKDIR /app
COPY --from=builder /app/package.json ./
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/frontend/build ./frontend/build
RUN npm link

# Install Matterbridge plugins
RUN npm -g install matterbridge-example-accessory-platform
RUN npm -g install matterbridge-example-dynamic-platform
RUN npm -g install matterbridge-zigbee2mqtt
RUN npm -g install matterbridge-somfy-tahoma
RUN npm -g install matterbridge-shelly
RUN npm -g install matterbridge-eve-door
RUN npm -g install matterbridge-eve-motion
RUN npm -g install matterbridge-eve-energy
RUN npm -g install matterbridge-eve-room
RUN npm -g install matterbridge-eve-weather

WORKDIR /app
CMD ["matterbridge", "-docker"]

0 comments on commit 770b1f8

Please sign in to comment.