Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A release will trigger an automatic build of a multi-arch Docker image that can be used on most Docker platforms, including the Raspberry Pi.
- Loading branch information
Showing
12 changed files
with
168 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!docker/ | ||
!/*.tgz |
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,25 @@ | ||
name: Docker | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
- name: Login to DockerHub Registry | ||
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: crazy-max/ghaction-docker-buildx@v1 | ||
with: | ||
version: latest | ||
- name: Run Buildx | ||
run: docker buildx build --build-arg ROOM_ASSISTANT_VERSION=${{steps.get_version.outputs.VERSION}} --platform linux/386,linux/amd64,linux/arm/v7,linux/arm64 -t mkerix/room-assistant:${{steps.get_version.outputs.VERSION}} --push . |
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 |
---|---|---|
|
@@ -2,6 +2,8 @@ name: Documentation | |
|
||
on: | ||
push: | ||
paths: | ||
- 'docs/**' | ||
branches: | ||
- nextgen | ||
|
||
|
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,22 @@ | ||
FROM node:12-alpine as build | ||
ARG ROOM_ASSISTANT_VERSION=latest | ||
|
||
RUN apk add --no-cache python make g++ libusb-dev eudev-dev avahi-dev | ||
RUN npm install -g --unsafe-perm room-assistant@$ROOM_ASSISTANT_VERSION | ||
|
||
FROM node:12-alpine | ||
|
||
WORKDIR /room-assistant | ||
|
||
RUN apk add --no-cache supervisor bluez bluez-deprecated libusb avahi avahi-dev dmidecode \ | ||
&& mkdir -p /var/run/dbus \ | ||
&& setcap cap_net_raw+eip $(eval readlink -f `which node`) \ | ||
&& setcap cap_net_raw+eip $(eval readlink -f `which hcitool`) \ | ||
&& addgroup --gid 998 i2c \ | ||
&& addgroup node i2c \ | ||
&& ln -s /usr/local/lib/node_modules/room-assistant/bin/room-assistant.js /usr/local/bin/room-assistant | ||
COPY docker/supervisord.conf docker/entrypoint.sh /etc/ | ||
COPY --from=build /usr/local/lib/node_modules/room-assistant /usr/local/lib/node_modules/room-assistant | ||
|
||
ENTRYPOINT ["/bin/sh", "-c"] | ||
CMD ["/etc/entrypoint.sh"] |
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,23 @@ | ||
FROM node:12-alpine as build | ||
WORKDIR /room-assistant | ||
|
||
RUN apk add --no-cache python make g++ libusb-dev eudev-dev avahi-dev | ||
COPY ./*.tgz /room-assistant/ | ||
RUN npm install -g --unsafe-perm *.tgz | ||
|
||
FROM node:12-alpine | ||
|
||
WORKDIR /room-assistant | ||
|
||
RUN apk add --no-cache supervisor bluez bluez-deprecated libusb avahi avahi-dev dmidecode \ | ||
&& mkdir -p /var/run/dbus \ | ||
&& setcap cap_net_raw+eip $(eval readlink -f `which node`) \ | ||
&& setcap cap_net_raw+eip $(eval readlink -f `which hcitool`) \ | ||
&& addgroup --gid 998 i2c \ | ||
&& addgroup node i2c \ | ||
&& ln -s /usr/local/lib/node_modules/room-assistant/bin/room-assistant.js /usr/local/bin/room-assistant | ||
COPY docker/supervisord.conf docker/entrypoint.sh /etc/ | ||
COPY --from=build /usr/local/lib/node_modules/room-assistant /usr/local/lib/node_modules/room-assistant | ||
|
||
ENTRYPOINT ["/bin/sh", "-c"] | ||
CMD ["/etc/entrypoint.sh"] |
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,6 +1,13 @@ | ||
version: '3' | ||
services: | ||
mqtt: | ||
image: eclipse-mosquitto:1.6 | ||
ports: | ||
- 1883:1883 | ||
room-assistant: | ||
build: . | ||
network_mode: host | ||
environment: | ||
NODE_CONFIG: > | ||
{ | ||
"global": { | ||
"instanceName": "dev-instance", | ||
"integrations": [] | ||
} | ||
} |
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,6 @@ | ||
echo "Starting DBUS daemon..." | ||
dbus-uuidgen > /var/lib/dbus/machine-id | ||
dbus-daemon --config-file=/usr/share/dbus-1/system.conf | ||
|
||
echo "Starting supervisor..." | ||
exec supervisord -c /etc/supervisord.conf |
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,19 @@ | ||
[supervisord] | ||
nodaemon=true | ||
user=root | ||
|
||
[program:avahi-daemon] | ||
command=avahi-daemon | ||
priority=50 | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
|
||
[program:room-assistant] | ||
command=room-assistant | ||
user=node | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 |
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
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