From 8829333d6826272a0d00d1849795f7ff62ad20d2 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 5 Aug 2021 21:04:53 +0100 Subject: [PATCH 1/5] :whale: Adds Docker support for ARM-32v7 Architecture --- Dockerfile-arm32v7 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Dockerfile-arm32v7 diff --git a/Dockerfile-arm32v7 b/Dockerfile-arm32v7 new file mode 100644 index 00000000..2c49e078 --- /dev/null +++ b/Dockerfile-arm32v7 @@ -0,0 +1,30 @@ +FROM arm32v7/node:latest + +# Define some ENV Vars +ENV PORT 80 +ENV DIRECTORY /app +ENV IS_DOCKER true + +# Create and set the working directory +WORKDIR ${DIRECTORY} + +# Copy over both 'package.json' and 'package-lock.json' (if available) +COPY package*.json ./ + +# Install project dependencies +RUN yarn + +# Copy over all project files and folders to the working directory +COPY . . + +# Build initial app for production +RUN yarn build + +# Expose given port +EXPOSE ${PORT} + +# Finally, run start command to serve up the built application +CMD [ "yarn", "build-and-start"] + +# Run simple healthchecks every 5 mins, to check the Dashy's everythings great +HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check From 37214410d7c2c807e91218863fce3282f183da41 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 5 Aug 2021 21:05:18 +0100 Subject: [PATCH 2/5] :whale: Adds Docker support for ARM-64v8 Architecture --- Dockerfile-arm64v8 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Dockerfile-arm64v8 diff --git a/Dockerfile-arm64v8 b/Dockerfile-arm64v8 new file mode 100644 index 00000000..3cd8f48f --- /dev/null +++ b/Dockerfile-arm64v8 @@ -0,0 +1,30 @@ +FROM arm64v8/node:latest + +# Define some ENV Vars +ENV PORT 80 +ENV DIRECTORY /app +ENV IS_DOCKER true + +# Create and set the working directory +WORKDIR ${DIRECTORY} + +# Copy over both 'package.json' and 'package-lock.json' (if available) +COPY package*.json ./ + +# Install project dependencies +RUN yarn + +# Copy over all project files and folders to the working directory +COPY . . + +# Build initial app for production +RUN yarn build + +# Expose given port +EXPOSE ${PORT} + +# Finally, run start command to serve up the built application +CMD [ "yarn", "build-and-start"] + +# Run simple healthchecks every 5 mins, to check the Dashy's everythings great +HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check From 1b3876c7802f96e1dbe92aa8d06e0f65bddaa746 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 5 Aug 2021 22:00:29 +0100 Subject: [PATCH 3/5] :memo: Adds link to Vue styleguide --- docs/developing.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/developing.md b/docs/developing.md index ef9186bc..d9f07199 100644 --- a/docs/developing.md +++ b/docs/developing.md @@ -154,7 +154,7 @@ As well as Node, Git and Docker- you'll also need an IDE (e.g. [VS Code](https:/ ## Style Guide -Linting is done using [ESLint](https://eslint.org/), and using the [Vue.js Styleguide](https://github.com/vuejs/eslint-config-standard), which is very similar to the [AirBnB Stylguide](https://github.com/airbnb/javascript). You can run `yarn lint` to report and fix issues. While the dev server is running, issues will be reported to the console automatically. Any lint errors will trigger the build to fail. Note that all lint checks must pass before any PR can be merged. Linting is also run as a git pre-commit hook +Linting is done using [ESLint](https://eslint.org/), and using the [Vue.js Styleguide](https://github.com/vuejs/eslint-config-standard), which is very similar to the [AirBnB Stylguide](https://github.com/airbnb/javascript). You can run `yarn lint` to report and fix issues. While the dev server is running, issues will be reported to the console automatically, and any lint errors will trigger the build to fail. Note that all lint checks must pass before any PR can be merged. Linting is also run as a git pre-commit hook The most significant things to note are: - Indentation should be done with two spaces @@ -167,7 +167,9 @@ The most significant things to note are: - All multiline blocks must use braces - Avoid console statements in the frontend -For the full styleguide, see: [github.com/airbnb/javascript](https://github.com/airbnb/javascript) +Styleguides: +- Vue: [Vue styleguide](https://vuejs.org/v2/style-guide/) +- JavaScript: [github.com/airbnb/javascript](https://github.com/airbnb/javascript) --- From 48201582512f44ef9d46b6eb1db7d46aee98869a Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 5 Aug 2021 22:01:55 +0100 Subject: [PATCH 4/5] :memo: Adds docs for deployment to RPi and ARM-based architecutures --- docs/deployment.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/deployment.md b/docs/deployment.md index 036070ea..e91cf72f 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -25,6 +25,8 @@ Once you've got Dashy up and running, you'll want to configure it with your own ### Deploy with Docker +[![Dashy on Docker Hub](https://dockeri.co/image/lissy93/dashy)](https://hub.docker.com/r/lissy93/dashy) + Dashy has a built container image hosted on [Docker Hub](https://hub.docker.com/r/lissy93/dashy). You will need [Docker](https://docs.docker.com/get-docker/) installed on your system. @@ -43,10 +45,12 @@ Explanation of the above options: - `-v` Specify volumes, to pass data from your host system to the container, in the format of `[host-path]:[container-path]`, you can use this to pass your config file, directory of assets (like icons), custom CSS or web assets (like favicon.ico, manifest.json etc) - `--name` Give your container a human-readable name - `--restart=always` Spin up the container when the daemon starts, or after it has been stopped -- `lissy93/dashy:latest` This last option is the image the container should be built from, you can also use a specific version, by replacing `:latest` with one of tthe [tags](https://hub.docker.com/r/lissy93/dashy/tags) +- `lissy93/dashy:latest` This last option is the image the container should be built from, you can also use a specific version, by replacing `:latest` with one of the [tags](https://hub.docker.com/r/lissy93/dashy/tags) For all available options, and to learn more, see the [Docker Run Docs](https://docs.docker.com/engine/reference/commandline/run/) +If you're deploying Dashy on a modern ARM-based board, such as a Raspberry Pi (2+), then you'll need to use one of Dashy's ARM images. Set the base image + tag to either `lissy93/dashy:arm64v8` or `lissy93/dashy:arm32v7`, depending on your system architecture. + ### Using Docker Compose Using Docker Compose can be useful for saving your specific config in files, without having to type out a long run command each time. Save compose config as a YAML file, and then run `docker compose up` (optionally use the `-f` flag to specify file location, if it isn't located at `./docker-compose.yml`). From 0bb2c7e0343c7aa78cb453440fb3fd60a3979663 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 5 Aug 2021 22:02:50 +0100 Subject: [PATCH 5/5] :bookmark: Bumps to V 1.5.4 and updates changelog --- .github/CHANGELOG.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 27ba5d75..12cc322a 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 🐳 1.5.4 - Docker ARM Support [PR #122](https://github.com/Lissy93/dashy/pull/122) +- Adds Docker files for `arm64v8` and `arm32v7` in order to support Raspberry Pi and other modern ARM-based devices +- Publishes these images on DockerHub and sets up a workflow to submit a new container every time a release is made +- Adds documentation for running Dashy on RPi/ ARM-based devices, Re: #117 + ## 🩹 1.5.3 - UI Quick Fix [PR #121](https://github.com/Lissy93/dashy/pull/121) - Downgrades and pins vue-material-tabs to 0.1.5, to prevent breaking changes. Fixes #118 p1 - Sets auto-width for theme selector, so text doesn't wrap for long theme names. Fixes #119 diff --git a/package.json b/package.json index 22f2b65d..e40fc224 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Dashy", - "version": "1.5.3", + "version": "1.5.4", "license": "MIT", "main": "server", "scripts": {