-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from Luligu/dev
Docker
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
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 |
---|---|---|
@@ -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"] |