🔀 Merge pull request #122 from Lissy93/FEATURE/Arm-Docker-Support

[FEATURE] RPi Arm V7 & 8 Docker support Re: #117
This commit is contained in:
Alicia Sykes 2021-08-05 22:05:02 +01:00 committed by GitHub
commit 74ddc7f3f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 75 additions and 4 deletions

View File

@ -1,5 +1,10 @@
# Changelog # 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) ## 🩹 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 - 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 - Sets auto-width for theme selector, so text doesn't wrap for long theme names. Fixes #119

30
Dockerfile-arm32v7 Normal file
View File

@ -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

30
Dockerfile-arm64v8 Normal file
View File

@ -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

View File

@ -25,6 +25,8 @@ Once you've got Dashy up and running, you'll want to configure it with your own
### Deploy with Docker ### 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. 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) - `-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 - `--name` Give your container a human-readable name
- `--restart=always` Spin up the container when the daemon starts, or after it has been stopped - `--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/) 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
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`). 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`).

View File

@ -154,7 +154,7 @@ As well as Node, Git and Docker- you'll also need an IDE (e.g. [VS Code](https:/
## Style Guide ## 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: The most significant things to note are:
- Indentation should be done with two spaces - Indentation should be done with two spaces
@ -167,7 +167,9 @@ The most significant things to note are:
- All multiline blocks must use braces - All multiline blocks must use braces
- Avoid console statements in the frontend - 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)
--- ---

View File

@ -1,6 +1,6 @@
{ {
"name": "Dashy", "name": "Dashy",
"version": "1.5.3", "version": "1.5.4",
"license": "MIT", "license": "MIT",
"main": "server", "main": "server",
"scripts": { "scripts": {