Skip to content

Commit

Permalink
Merge pull request #130 from Luligu/dev
Browse files Browse the repository at this point in the history
Release 1.5.6
  • Loading branch information
Luligu authored Sep 13, 2024
2 parents e716a60 + 754efe0 commit 1489cef
Show file tree
Hide file tree
Showing 29 changed files with 458 additions and 280 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/docker-buildx-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build dev and Push Docker image dev, dev_alpine and dev_shelly_alpine to Docker Hub with buildx
name: Build Docker image dev and dev_shelly_alpine with buildx

on:
push:
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Echo main version ${{ env.VERSION }}
run: |
echo "Extracted version is: $VERSION ${{ env.VERSION }}"
- name: Run Docker Buildx on dev_shelly_alpine
run: |
docker buildx build \
Expand All @@ -53,14 +53,24 @@ jobs:
docker manifest inspect luligu/matterbridge:dev_shelly_alpine
timeout-minutes: 60

- name: Run Docker Buildx on dev_alpine
- name: Run Docker Buildx on dev_shelly_bullseye
run: |
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
-f docker/Dockerfile.alpine \
-t luligu/matterbridge:dev_alpine \
--platform linux/arm64 \
-f docker/Dockerfile.shelly.bullseye \
-t luligu/matterbridge:dev_shelly_bullseye \
--push .
docker manifest inspect luligu/matterbridge:dev_shelly_bullseye
timeout-minutes: 60

- name: Run Docker Buildx on dev_shelly_bookworm
run: |
docker buildx build \
--platform linux/arm64 \
-f docker/Dockerfile.shelly.bookworm \
-t luligu/matterbridge:dev_shelly_bookworm \
--push .
docker manifest inspect luligu/matterbridge:dev_alpine
docker manifest inspect luligu/matterbridge:dev_shelly_bookworm
timeout-minutes: 60

- name: Run Docker Buildx on dev
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@ If you like this project and find it useful, please consider giving it a star on

The Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository.

## [1.5.6] - 2024-09-13

### Added

- [matterbridge]: Updated to support ingress (will be released soon in the [Official Matterbridge Home Assistant Add-on](https://github.com/Luligu/matterbridge-home-assistant-addon)).
- [frontend]: Updated to support ingress.

### Changed

- [package]: Updated typescript to 5.6.2.
- [package]: Updated express to 4.21.0.
- [package]: Updated dependencies.

<a href="https://www.buymeacoffee.com/luligugithub">
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
</a>

## [1.5.5] - 2024-09-09

### Changed
Expand Down
30 changes: 0 additions & 30 deletions docker/Dockerfile.alpine

This file was deleted.

60 changes: 31 additions & 29 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,88 +1,90 @@
FROM node:20-bullseye-slim AS base
FROM node:22-bullseye-slim AS base

WORKDIR /app
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git && \
apt-get clean
apt-get clean && \
npm install -g npm@latest && \
node -v && \
npm -v


# && npm install -g npm@10.7.0

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

WORKDIR /matterbridge-example-accessory-platform
RUN GIT_SSL_NO_VERIFY=true git clone https://github.com/Luligu/matterbridge-example-accessory-platform.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm install && npm run build && npm pack

WORKDIR /matterbridge-example-dynamic-platform
RUN GIT_SSL_NO_VERIFY=true git clone https://github.com/Luligu/matterbridge-example-dynamic-platform.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm install && npm run build && npm pack
RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack && npm link

WORKDIR /matterbridge-zigbee2mqtt
RUN GIT_SSL_NO_VERIFY=true git clone -b dev https://github.com/Luligu/matterbridge-zigbee2mqtt.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm install && npm run build && npm pack
RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack

WORKDIR /matterbridge-somfy-tahoma
RUN GIT_SSL_NO_VERIFY=true git clone -b dev https://github.com/Luligu/matterbridge-somfy-tahoma.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm install && npm run build && npm pack
RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack

WORKDIR /matterbridge-shelly
RUN GIT_SSL_NO_VERIFY=true git clone -b dev https://github.com/Luligu/matterbridge-shelly.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm install && npm run build && npm pack
RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack

WORKDIR /matterbridge-example-accessory-platform
RUN GIT_SSL_NO_VERIFY=true git clone https://github.com/Luligu/matterbridge-example-accessory-platform.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack

WORKDIR /matterbridge-example-dynamic-platform
RUN GIT_SSL_NO_VERIFY=true git clone https://github.com/Luligu/matterbridge-example-dynamic-platform.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack

WORKDIR /matterbridge-eve-door
RUN GIT_SSL_NO_VERIFY=true git clone https://github.com/Luligu/matterbridge-eve-door.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm install && npm run build && npm pack
RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack

WORKDIR /matterbridge-eve-motion
RUN GIT_SSL_NO_VERIFY=true git clone https://github.com/Luligu/matterbridge-eve-motion.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm install && npm run build && npm pack
RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack

WORKDIR /matterbridge-eve-energy
RUN GIT_SSL_NO_VERIFY=true git clone https://github.com/Luligu/matterbridge-eve-energy.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm install && npm run build && npm pack
RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack

WORKDIR /matterbridge-eve-room
RUN GIT_SSL_NO_VERIFY=true git clone https://github.com/Luligu/matterbridge-eve-room.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm install && npm run build && npm pack
RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack

WORKDIR /matterbridge-eve-weather
RUN GIT_SSL_NO_VERIFY=true git clone https://github.com/Luligu/matterbridge-eve-weather.git .
COPY docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm install && npm run build && npm pack
RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack


FROM node:20-bullseye-slim AS release

FROM node:22-bullseye-slim AS release
WORKDIR /app

COPY --from=builder /app/*.tgz .
RUN npm -g install *.tgz
RUN rm *.tgz
RUN npm install -g npm@latest && npm -g install *.tgz && rm *.tgz

COPY --from=builder /matterbridge-example-accessory-platform/*.tgz .
COPY --from=builder /matterbridge-example-dynamic-platform/*.tgz .
COPY --from=builder /matterbridge-zigbee2mqtt/*.tgz .
COPY --from=builder /matterbridge-somfy-tahoma/*.tgz .
COPY --from=builder /matterbridge-shelly/*.tgz .
COPY --from=builder /matterbridge-example-accessory-platform/*.tgz .
COPY --from=builder /matterbridge-example-dynamic-platform/*.tgz .
COPY --from=builder /matterbridge-eve-door/*.tgz .
COPY --from=builder /matterbridge-eve-motion/*.tgz .
COPY --from=builder /matterbridge-eve-energy/*.tgz .
COPY --from=builder /matterbridge-eve-room/*.tgz .
COPY --from=builder /matterbridge-eve-weather/*.tgz .
RUN npm -g install *.tgz
RUN rm *.tgz
RUN npm install -g *.tgz && rm *.tgz && node -v && npm -v && npm list -g

CMD ["matterbridge", "-docker"]
45 changes: 34 additions & 11 deletions docker/Dockerfile.shelly.alpine
Original file line number Diff line number Diff line change
@@ -1,23 +1,46 @@
FROM node:20-alpine AS base
# FROM alpine:latest as base not working for linux/arm/v7
# FROM node:20-alpine as base not working for linux/arm/v7
FROM node:22-alpine AS base

WORKDIR /app
# RUN apk add --no-cache nodejs npm icu-data-full
# Install git and update npm
RUN apk update && \
apk add --no-cache git && \
npm install -g npm@latest && \
node -v && \
npm -v

# Build Matterbridge
WORKDIR /matterbridge
COPY ./package.json ./package-lock.json ./tsconfig.json ./
COPY ./src ./src
COPY ./frontend/build ./frontend/build
RUN npm install --no-audit --no-update-notifier --no-fund && \
RUN npm ci && \
npm run build && \
npm link
npm shrinkwrap --omit=dev && \
npm pack

# Install Matterbridge plugins
RUN npm -g install matterbridge-shelly
# Build shelly plugin
WORKDIR /matterbridge-shelly
RUN GIT_SSL_NO_VERIFY=true git clone -b dev https://github.com/Luligu/matterbridge-shelly.git .
COPY ./docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm ci && \
npm run build && \
npm shrinkwrap --omit=dev && \
npm pack


FROM node:22-alpine AS release
WORKDIR /app

COPY --from=base /matterbridge/*.tgz .
RUN npm install -g npm@latest && npm -g install *.tgz && rm *.tgz

COPY --from=base /matterbridge-shelly/*.tgz .
RUN npm -g install *.tgz && rm *.tgz

# Copy and execute the entrypoint script
COPY ./docker/shellyEntrypoint.sh ./
RUN chmod +x ./shellyEntrypoint.sh
RUN chmod +x ./shellyEntrypoint.sh && \
node -v && \
npm -v && \
npm list -g
ENTRYPOINT ["./shellyEntrypoint.sh"]

CMD ["matterbridge", "-docker"]
47 changes: 47 additions & 0 deletions docker/Dockerfile.shelly.bookworm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM node:22-bookworm-slim AS base

# Install git and update npm
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git && \
apt-get clean && \
npm install -g npm@latest && \
node -v && \
npm -v

# Build Matterbridge
WORKDIR /matterbridge
COPY ./package.json ./package-lock.json ./tsconfig.json ./
COPY ./src ./src
COPY ./frontend/build ./frontend/build
RUN npm ci && \
npm run build && \
npm shrinkwrap --omit=dev && \
npm pack

# Build shelly plugin
WORKDIR /matterbridge-shelly
RUN GIT_SSL_NO_VERIFY=true git clone -b dev https://github.com/Luligu/matterbridge-shelly.git .
COPY ./docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm ci && \
npm run build && \
npm shrinkwrap --omit=dev && \
npm pack


FROM node:22-bookworm-slim AS release
WORKDIR /app

COPY --from=base /matterbridge/*.tgz .
RUN npm install -g npm@latest && npm -g install *.tgz && rm *.tgz

COPY --from=base /matterbridge-shelly/*.tgz .
RUN npm -g install *.tgz && rm *.tgz

# Copy and execute the entrypoint script
COPY ./docker/shellyEntrypoint.sh ./
RUN chmod +x ./shellyEntrypoint.sh && \
node -v && \
npm -v && \
npm list -g
ENTRYPOINT ["./shellyEntrypoint.sh"]
CMD ["matterbridge", "-docker"]
47 changes: 47 additions & 0 deletions docker/Dockerfile.shelly.bullseye
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM node:22-bullseye-slim AS base

# Install git and update npm
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git && \
apt-get clean && \
npm install -g npm@latest && \
node -v && \
npm -v

# Build Matterbridge
WORKDIR /matterbridge
COPY ./package.json ./package-lock.json ./tsconfig.json ./
COPY ./src ./src
COPY ./frontend/build ./frontend/build
RUN npm ci && \
npm run build && \
npm shrinkwrap --omit=dev && \
npm pack

# Build shelly plugin
WORKDIR /matterbridge-shelly
RUN GIT_SSL_NO_VERIFY=true git clone -b dev https://github.com/Luligu/matterbridge-shelly.git .
COPY ./docker/link-matterbridge-docker-script.js ./link-matterbridge-script.js
RUN npm ci && \
npm run build && \
npm shrinkwrap --omit=dev && \
npm pack


FROM node:22-bullseye-slim AS release
WORKDIR /app

COPY --from=base /matterbridge/*.tgz .
RUN npm install -g npm@latest && npm -g install *.tgz && rm *.tgz

COPY --from=base /matterbridge-shelly/*.tgz .
RUN npm -g install *.tgz && rm *.tgz

# Copy and execute the entrypoint script
COPY ./docker/shellyEntrypoint.sh ./
RUN chmod +x ./shellyEntrypoint.sh && \
node -v && \
npm -v && \
npm list -g
ENTRYPOINT ["./shellyEntrypoint.sh"]
CMD ["matterbridge", "-docker"]
2 changes: 1 addition & 1 deletion docker/shellyEntrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ ! -f "$FLAG_FILE" ]; then
echo "Npm version:"
npm -v
echo "Adding matterbridge-shelly plugin..."
# Add your initialization commands here

matterbridge -add matterbridge-shelly

# Create the flag file to indicate initialization has been done
Expand Down
Loading

0 comments on commit 1489cef

Please sign in to comment.