mirror of
https://github.com/Lissy93/dashy.git
synced 2024-12-18 22:41:33 +03:00
🔀 Merge pull request #168 from Lissy93/REFACTOR/deployment-files
[REFACTOR] - Reduce bundle size, update workflows, docs and app config
This commit is contained in:
commit
522bbca427
9
.dockerignore
Normal file
9
.dockerignore
Normal file
@ -0,0 +1,9 @@
|
||||
# Files specified here are not required for Docker
|
||||
# so ignoring them helps to reduce the container size
|
||||
# The Docker container MUST have the following files:
|
||||
# package.json yarn.lock server.js vue.config.js src/ services/
|
||||
|
||||
node_modules
|
||||
docs
|
||||
.git
|
||||
.github
|
5
.env
5
.env
@ -0,0 +1,5 @@
|
||||
# Store environmental variables here. All variables are optional.
|
||||
|
||||
# PORT=4000 # The port to expose the running application on
|
||||
# NODE_ENV=production # Can be either development, production or test
|
||||
# BASE_URL=/ # The default base path for serving up static assets
|
8
.github/CHANGELOG.md
vendored
8
.github/CHANGELOG.md
vendored
@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## ✨ 1.6.3 - Dependency and Build File Updates [PR #168](https://github.com/Lissy93/dashy/pull/168)
|
||||
- Removes any dependencies which are not 100% essential
|
||||
- Moves packages that are only used for building into devDependencies
|
||||
- Updates dependencies to latest version
|
||||
- Adds a .dockerignore, so that non-essential files are not included in the container
|
||||
- Updates deployment config files for Netlify, Heroku and GH actions
|
||||
- Made a brand new bug-report template, with input fields and validation!
|
||||
|
||||
## ✨ 1.6.2 - Support for Guest Access [PR #167](https://github.com/Lissy93/dashy/pull/167)
|
||||
- Adds functionality for optional read-only guest access to dashboards with authentication
|
||||
- Can be enabled by setting `appConfig.enableGuestAccess: true`
|
||||
|
22
.github/ISSUE_TEMPLATE/bug-report.md
vendored
22
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@ -1,22 +0,0 @@
|
||||
---
|
||||
name: "Bug Report \U0001F41B"
|
||||
about: Submit a bug report for an issue you've come across
|
||||
title: "[BUG]"
|
||||
labels: "\U0001F41B Bug"
|
||||
assignees: Lissy93
|
||||
|
||||
---
|
||||
|
||||
Thank you for taking the time to raise a bug, and sorry that you've had issues with Dashy 😟
|
||||
|
||||
**If applicable to your issue, please include:**
|
||||
- A description of the bug, including actual behavior and if applicable, expected behavior
|
||||
- Steps to reproduce
|
||||
- Info about your system (device, OS, browser and browser version)
|
||||
- Any console errors? If the issue happens at runtime, open up the dev tools [F12], and go to the Console tab. If the output is very long, please use [0bin](https://0bin.net/)
|
||||
- Any screenshots, if it is a frontend issue
|
||||
|
||||
**Before submitting, please ensure that:**
|
||||
- [ ] This issue has not already been raised
|
||||
- [ ] You are using the latest version of Dashy
|
||||
- [ ] You've included the relevant information above
|
60
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
60
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
name: Bug Report 🐛
|
||||
description: Report something that's not working the way it's (probably) intended to
|
||||
title: '[BUG] <title>'
|
||||
labels: '\U0001F41B Bug'
|
||||
body:
|
||||
- type: dropdown
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
description: Where are you running Dashy?
|
||||
options:
|
||||
- Self-Hosted (Docker)
|
||||
- Self-Hosted (Bare Metal)
|
||||
- Cloud Service (Static)
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: What version of Dashy are you running?
|
||||
placeholder: 1.6.9 ← should look like this (check config menu)
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: repro
|
||||
attributes:
|
||||
label: Describe the problem
|
||||
description: Please describe exactly what is not working, include the steps to reproduce, actual result and expected result
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Additional info
|
||||
description: Logs? Screenshots? Yes, please.
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: idiot-check
|
||||
attributes:
|
||||
label: Please tick the boxes
|
||||
description: Before submitting, please ensure that
|
||||
options:
|
||||
- label: You are using the latest, or recent version of Dashy
|
||||
required: true
|
||||
- label: You've checked that this [issue hasn't already been raised](https://github.com/Lissy93/dashy/issues?q=is%3Aissue)
|
||||
required: true
|
||||
- label: You've checked the [docs](https://github.com/Lissy93/dashy/tree/master/docs#readme) and [troubleshooting](https://github.com/Lissy93/dashy/blob/master/docs/troubleshooting.md#troubleshooting) guide
|
||||
required: true
|
||||
- label: You agree to the [code of conduct](https://github.com/Lissy93/dashy/blob/master/.github/CODE_OF_CONDUCT.md#contributor-covenant-code-of-conduct)
|
||||
required: true
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |-
|
||||
## Thanks 🙏
|
||||
Sorry you are having issues with Dashy, and thank you for raising this ticket - in doing so you are helping to make the app better for everyone 💪
|
||||
You should expect a reply within the next 48 hours :)
|
||||
validations:
|
||||
required: false
|
36
.github/LEGAL.md
vendored
36
.github/LEGAL.md
vendored
@ -14,7 +14,6 @@ The following 3rd-party software packages may be used by or distributed with **d
|
||||
| **[highlight.js (11.1.0)](#highlight.js-11-1-0)** | **Multi-license:** BSD-2-Clause _OR_ BSD-3-Clause, BSD-3-Clause |
|
||||
| **[js-yaml (4.1.0)](#js-yaml-4-1-0)** | MIT |
|
||||
| **[npm-run-all (4.1.5)](#npm-run-all-4-1-5)** | MIT |
|
||||
| **[prismjs (1.24.1)](#prismjs-1-24-1)** | MIT |
|
||||
| **[register-service-worker (1.7.2)](#register-service-worker-1-7-2)** | MIT |
|
||||
| **[remedial (1.0.8)](#remedial-1-0-8)** | **Multi-license:** Apache-2.0 _OR_ MIT |
|
||||
| **[serve-static (1.14.1)](#serve-static-1-14-1)** | MIT |
|
||||
@ -392,41 +391,6 @@ The following 3rd-party software packages may be used by or distributed with **d
|
||||
|
||||
---
|
||||
|
||||
#### **prismjs (1.24.1)**
|
||||
|
||||
- Declared License(s)
|
||||
|
||||
- MIT
|
||||
|
||||
- Attribution:
|
||||
MIT LICENSE
|
||||
|
||||
Copyright (c) 2012 Lea Verou
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
- Discovered License(s)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
#### **register-service-worker (1.7.2)**
|
||||
|
||||
- Declared License(s)
|
||||
|
18
.github/workflows/generate-credits.yml
vendored
18
.github/workflows/generate-credits.yml
vendored
@ -21,7 +21,23 @@ jobs:
|
||||
userNameHeight: 20
|
||||
svgWidth: 830
|
||||
commitMessage: ':blue_heart: Updates contributor SVG'
|
||||
# Job #2 - Update the Credits page
|
||||
# Job #2 - Fetches sponsors and inserts into readme and credits page
|
||||
insert-sponsors:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout 🛎️
|
||||
uses: actions/checkout@v2
|
||||
- name: Generate Sponsors in Readme 💖
|
||||
uses: JamesIves/github-sponsors-readme-action@1.0.5
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: 'README.md'
|
||||
- name: Generate Sponsors in Credits 💖
|
||||
uses: JamesIves/github-sponsors-readme-action@1.0.5
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: 'docs/credits.md'
|
||||
# Job #3 - Update the Credits page
|
||||
insert-credits:
|
||||
runs-on: ubuntu-latest
|
||||
name: Inserts contributors into credits.md
|
||||
|
23
.github/workflows/insert-sponsors.yml
vendored
23
.github/workflows/insert-sponsors.yml
vendored
@ -1,23 +0,0 @@
|
||||
# Generates a list of sponsors, and inserts it into specified files
|
||||
# where the `<!-- sponsors --><!-- sponsors -->` tag is
|
||||
name: Inserts Sponsors
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout 🛎️
|
||||
uses: actions/checkout@v2
|
||||
- name: Generate Sponsors in Readme 💖
|
||||
uses: JamesIves/github-sponsors-readme-action@1.0.5
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: 'README.md'
|
||||
- name: Generate Sponsors in Credits 💖
|
||||
uses: JamesIves/github-sponsors-readme-action@1.0.5
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: 'docs/credits.md'
|
14
.github/workflows/wiki-sync.yml
vendored
14
.github/workflows/wiki-sync.yml
vendored
@ -10,11 +10,11 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Sync Wiki
|
||||
uses: cmbrose/github-docs-to-wiki@v0.24
|
||||
uses: joeizzard/action-wiki-sync@master
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
defaultBranch: master
|
||||
rootDocsFolder: ./docs
|
||||
convertRootReadmeToHomePage: true
|
||||
useHeaderForWikiName: true
|
||||
customCommitMessageFormat: ':gem: Chore: Sync Docs to GH Wiki'
|
||||
username: example
|
||||
access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
wiki_folder: ./docs
|
||||
commit_username: 'liss-bot'
|
||||
commit_email: 'liss-bot@d0h.co'
|
||||
commit_message: '📕 Chore: Sync Wiki'
|
||||
|
3
Procfile
3
Procfile
@ -1 +1,4 @@
|
||||
# Heroku config - Specifies the commands to execute when the app starts
|
||||
# See docs for more info: https://devcenter.heroku.com/articles/procfile
|
||||
|
||||
web: node server.js
|
@ -137,7 +137,7 @@ The image defaults to `:latest`, but you can instead specify a specific version,
|
||||
|
||||
You will need [git](https://git-scm.com/downloads), the latest or LTS version of [Node.js](https://nodejs.org/) and (optionally) [Yarn](https://yarnpkg.com/) installed on your system.
|
||||
|
||||
- Get Code: `git clone git@github.com:Lissy93/dashy.git` and `cd dashy`
|
||||
- Get Code: `git clone https://github.com/Lissy93/dashy.git` and `cd dashy`
|
||||
- Configuration: Fill in you're settings in `./public/conf.yml`
|
||||
- Install dependencies: `yarn`
|
||||
- Build: `yarn build`
|
||||
@ -489,7 +489,6 @@ Huge thanks to the sponsors helping to support Dashy's development!
|
||||
Dashy was made possible thanks to the following packages and components. For more details on each, see [Dependency Credits](./docs/credits.md#dependencies-). Full credit to their respective authors.
|
||||
- Utils: [`crypto-js`](https://github.com/brix/crypto-js), [`axios`](https://github.com/axios/axios), [`ajv`](https://github.com/ajv-validator/ajv)
|
||||
- Components: [`vue-select`](https://github.com/sagalbot/vue-select) by @sagalbot, [`vue-js-modal`](https://github.com/euvl/vue-js-modal) by @euvl, [`v-tooltip`](https://github.com/Akryum/v-tooltip) by @Akryum, [`vue-material-tabs`](https://github.com/jairoblatt/vue-material-tabs) by @jairoblatt, [`JsonEditor`](https://github.com/josdejong/jsoneditor) by @josdejong, [`vue-toasted`](https://github.com/shakee93/vue-toasted) by @shakee93
|
||||
[`prism.js`](https://github.com/PrismJS/prism)
|
||||
- Core: Vue.js, TypeScript, SCSS, Node.js, ESLint
|
||||
- The backup & sync server uses [Cloudflare workers](https://workers.cloudflare.com/) plus [KV](https://developers.cloudflare.com/workers/runtime-apis/kv) and [web crypto](https://developers.cloudflare.com/workers/runtime-apis/web-crypto)
|
||||
- Services: The 1-Click demo uses [Play-with-Docker Labs](https://play-with-docker.com/). Code is hosted on [GitHub](https://github.com), Docker image is hosted on [DockerHub](https://hub.docker.com/), and the demos are hosted on [Netlify](https://www.netlify.com/).
|
||||
@ -505,7 +504,7 @@ Dashy was made possible thanks to the following packages and components. For mor
|
||||
Before getting started, you'll need [Git](https://git-scm.com/downloads), [Node](https://nodejs.org/en/download/) and optionally [Yarn](https://yarnpkg.com/) (run `npm i -g yarn`) installed.
|
||||
|
||||
To set up the development environment:
|
||||
1. Get Code: `git clone git@github.com:Lissy93/dashy.git` and `cd dashy`
|
||||
1. Get Code: `git clone https://github.com/Lissy93/dashy.git` and `cd dashy`
|
||||
2. Install dependencies: `yarn`
|
||||
3. Start dev server: `yarn dev`
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
<!-- readme: sponsors -end -->
|
||||
|
||||
## Contributors
|
||||
<!-- readme: contributors -start -->
|
||||
<!-- readme: contributors, BeginCI/-, deepsourcebot/- -start -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">
|
||||
@ -90,7 +90,8 @@
|
||||
</a>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!-- readme: contributors -end -->
|
||||
<!-- readme: contributors, BeginCI/-, deepsourcebot/- -end -->
|
||||
|
||||
|
||||
## Helpful Users
|
||||
<!-- readme: EVOTk,shadowking001,turnrye,Robert-Ernst,Niklashere,evroon,MilesTEG1 -start -->
|
||||
@ -190,8 +191,6 @@ At it's core, the application uses [Vue.js](https://github.com/vuejs/vue), as we
|
||||
- [`VJsoneditor`](https://github.com/yansenlei/VJsoneditor) - Interactive JSON editor component by @yansenlei `MIT`
|
||||
- Forked from [`JsonEditor`](https://github.com/josdejong/jsoneditor) by @josdejong `Apache-2.0 License`
|
||||
- [`vue-toasted`](https://github.com/shakee93/vue-toasted) - Toast notification component by @shakee93 `MIT`
|
||||
- [`vue-prism-editor`](https://github.com/koca/vue-prism-editor) - Lightweight code editor by @koca `MIT`
|
||||
- Forked from [`prism.js`](https://github.com/PrismJS/prism) `MIT`
|
||||
- [`vue-swatches`](https://github.com/saintplay/vue-swatches) - Color palete picker by @saintplay `MIT`
|
||||
|
||||
##### Backup & Sync Server
|
||||
|
@ -3,14 +3,14 @@
|
||||
Welcome to Dashy, so glad you're here :) Deployment is super easy, and there are several methods available depending on what type of system you're using. If you're self-hosting, then deploying with Docker (or similar container engine) is the recommended approach.
|
||||
|
||||
#### Quick Start
|
||||
If you want to skip the fuss, and [get straight down to it](./docs/quick-start.md), then you can spin up a new instance of Dashy by running:
|
||||
If you want to skip the fuss, and [get straight down to it](/docs/quick-start.md), then you can spin up a new instance of Dashy by running:
|
||||
```
|
||||
docker run -p 8080:80 lissy93/dashy
|
||||
```
|
||||
|
||||
See [Management Docs](./docs/management.md) for info about securing, monitoring, updating, health checks, auto starting, web server configuration, etc
|
||||
See [Management Docs](/docs/management.md) for info about securing, monitoring, updating, health checks, auto starting, web server configuration, etc
|
||||
|
||||
Once you've got Dashy up and running, you'll want to configure it with your own content, for this you can reference the [configuring docs](./docs/configuring.md).
|
||||
Once you've got Dashy up and running, you'll want to configure it with your own content, for this you can reference the [configuring docs](/docs/configuring.md).
|
||||
|
||||
## Deployment Methods
|
||||
|
||||
@ -110,7 +110,7 @@ If you are building from source, and would like to use one of the [other Dockerf
|
||||
|
||||
If you do not want to use Docker, you can run Dashy directly on your host system. For this, you will need both [git](https://git-scm.com/downloads) and the latest or LTS version of [Node.js](https://nodejs.org/) installed, and optionally [yarn](https://yarnpkg.com/)
|
||||
|
||||
1. Get Code: `git clone git@github.com:Lissy93/dashy.git` and `cd dashy`
|
||||
1. Get Code: `git clone https://github.com/Lissy93/dashy.git` and `cd dashy`
|
||||
2. Configuration: Fill in you're settings in `./public/conf.yml`
|
||||
3. Install dependencies: `yarn`
|
||||
4. Build: `yarn build`
|
||||
|
@ -18,7 +18,7 @@ You will need either the latest or LTS version of **[Node.js](https://nodejs.org
|
||||
|
||||
### Running the Project
|
||||
|
||||
1. Get Code: `git clone git@github.com:Lissy93/dashy.git`
|
||||
1. Get Code: `git clone https://github.com/Lissy93/dashy.git`
|
||||
2. Navigate into the directory: `cd dashy`
|
||||
3. Install dependencies: `yarn`
|
||||
4. Start dev server: `yarn dev`
|
||||
@ -231,7 +231,7 @@ Styleguides:
|
||||
│ │ ├── Nav.vue # Navigation bar, includes a list of links
|
||||
│ │ ╰── PageTitle.vue # Page title and sub-title, visible within the Header
|
||||
│ ╰── Settings # Components relating to the quick-settings, in the top-right
|
||||
│ ├── AppButtons.vue # Logout button and other app info
|
||||
│ ├── AuthButtons.vue # Logout button and other app info
|
||||
│ ├── ConfigLauncher.vue # Icon that when clicked will launch the Configuration component
|
||||
│ ├── CustomThemeMaker.vue # Color pickers for letting user build their own theme
|
||||
│ ├── ItemSizeSelector.vue # Set of buttons used to set and save item size
|
||||
|
@ -104,3 +104,25 @@ For more info, check out the [Documentation](https://github.com/Lissy93/dashy/tr
|
||||
Enjoy your dashboard :)
|
||||
|
||||
---
|
||||
|
||||
## Alternative Deployment Method 1 - From Source
|
||||
|
||||
You can also easily run the app on your system without Docker. For this [Git](https://git-scm.com/downloads), [Node.js](https://nodejs.org/), and [Yarn](https://yarnpkg.com/) are required.
|
||||
|
||||
```
|
||||
git clone https://github.com/Lissy93/dashy.git && cd dashy
|
||||
yarn # Install dependencies
|
||||
yarn build # Build the app
|
||||
yarn start # Start the app
|
||||
```
|
||||
Then edit `./public/conf.yml` and rebuild the app with `yarn build`
|
||||
|
||||
---
|
||||
|
||||
## Alternative Deployment Method 2 - Netlify
|
||||
|
||||
Don't have a server? No problem! You can run Dashy for free on Netlify (as well as many [other cloud providers](./docs/deployment.md#deploy-to-cloud-service)). All you need it a GitHub account.
|
||||
1. Fork Dashy's repository on GitHub
|
||||
2. [Log in](app.netlify.com/login/) to Netlify with GitHub
|
||||
3. Click "New site from Git" and select your forked repo, then click **Deploy**!
|
||||
4. You can then edit the config in `./public/conf.yml` in your repo, and Netlify will rebuild the app
|
||||
|
@ -1,24 +1,6 @@
|
||||
# Troubleshooting
|
||||
|
||||
This document contains common problems and their solutions.
|
||||
|
||||
## Yarn Error
|
||||
|
||||
For more info, see [Issue #1](https://github.com/Lissy93/dashy/issues/1)
|
||||
|
||||
First of all, check that you've got yarn installed correctly - see the [yarn installation docs](https://classic.yarnpkg.com/en/docs/install) for more info.
|
||||
|
||||
If you're getting an error about scenarios, then you've likely installed the wrong yarn... (you're [not](https://github.com/yarnpkg/yarn/issues/2821) the only one!). You can fix it by uninstalling, adding the correct repo, and reinstalling, for example, in Debian:
|
||||
- `sudo apt remove yarn`
|
||||
- `curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -`
|
||||
- `echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list`
|
||||
- `sudo apt update && sudo apt install yarn`
|
||||
|
||||
Alternatively, as a workaround, you have several options:
|
||||
- Try using [NPM](https://www.npmjs.com/get-npm) instead: So clone, cd, then run `npm install`, `npm run build` and `npm start`
|
||||
- Try using [Docker](https://www.docker.com/get-started) instead, and all of the system setup and dependencies will already be taken care of. So from within the directory, just run `docker build -t lissy93/dashy .` to build, and then use docker start to run the project, e.g: `docker run -it -p 8080:80 lissy93/dashy` (see the [deploying docs](https://github.com/Lissy93/dashy/blob/master/docs/deployment.md#deploy-with-docker) for more info)
|
||||
|
||||
---
|
||||
## `Refused to Connect` in Modal or Workspace View
|
||||
|
||||
This is not an issue with Dashy, but instead caused by the target app preventing direct access through embedded elements. It can be fixed by setting the [`X-Frame-Options`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) HTTP header set to `ALLOW [path to Dashy]` or `SAMEORIGIN`, as defined in [RFC-7034](https://datatracker.ietf.org/doc/html/rfc7034). These settings are usually set in the config file for the web server that's hosting the target application, here are some examples of how to enable cross-origin access with common web servers:
|
||||
@ -50,3 +32,64 @@ In Apache, you can use the [`mod_headers`](https://httpd.apache.org/docs/current
|
||||
```
|
||||
Header set X-Frame-Options: "ALLOW-FROM http://[dashy-location]/"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Yarn Error
|
||||
|
||||
For more info, see [Issue #1](https://github.com/Lissy93/dashy/issues/1)
|
||||
|
||||
First of all, check that you've got yarn installed correctly - see the [yarn installation docs](https://classic.yarnpkg.com/en/docs/install) for more info.
|
||||
|
||||
If you're getting an error about scenarios, then you've likely installed the wrong yarn... (you're [not](https://github.com/yarnpkg/yarn/issues/2821) the only one!). You can fix it by uninstalling, adding the correct repo, and reinstalling, for example, in Debian:
|
||||
- `sudo apt remove yarn`
|
||||
- `curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -`
|
||||
- `echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list`
|
||||
- `sudo apt update && sudo apt install yarn`
|
||||
|
||||
Alternatively, as a workaround, you have several options:
|
||||
- Try using [NPM](https://www.npmjs.com/get-npm) instead: So clone, cd, then run `npm install`, `npm run build` and `npm start`
|
||||
- Try using [Docker](https://www.docker.com/get-started) instead, and all of the system setup and dependencies will already be taken care of. So from within the directory, just run `docker build -t lissy93/dashy .` to build, and then use docker start to run the project, e.g: `docker run -it -p 8080:80 lissy93/dashy` (see the [deploying docs](https://github.com/Lissy93/dashy/blob/master/docs/deployment.md#deploy-with-docker) for more info)
|
||||
|
||||
---
|
||||
|
||||
## DockerHub `toomanyrequests`
|
||||
|
||||
This situation relates to error messages similar to one of the following, returned when pulling, updating or running the Docker container from Docker Hub.
|
||||
|
||||
```
|
||||
Continuing execution. Pulling image lissy93/dashy:release-1.6.0
|
||||
error pulling image configuration: toomanyrequests
|
||||
```
|
||||
or
|
||||
```
|
||||
You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
|
||||
```
|
||||
|
||||
When DockerHub returns one of these errors, or a `429` status, that means you've hit your rate limit. This was [introduced](https://www.docker.com/blog/scaling-docker-to-serve-millions-more-developers-network-egress/) last year, and prevents unauthenticated or free users from running docker pull more than 100 times per 6 hours.
|
||||
You can [check your rate limit status](https://www.docker.com/blog/checking-your-current-docker-pull-rate-limits-and-status/) by looking for the `ratelimit-remaining` header in any DockerHub responses.
|
||||
|
||||
#### Solution 1 - Use an alternate container registry
|
||||
- Dashy is also availible through GHCR, which at present does not have any hard limits. Just use `docker pull ghcr.io/lissy93/dashy:latest` to fetch the image
|
||||
- You can also build the image from source, by cloning the repo, and running `docker build -t dashy .` or use the pre-made docker compose
|
||||
|
||||
#### Solution 2 - Increase your rate limits
|
||||
- Logging in to DockerHub will increase your rate limit from 100 requests to 200 requests per 6 hour period
|
||||
- Upgrading to a Pro for $5/month will increase your image requests to 5,000 per day, and any plans above have no rate limits
|
||||
- Since rate limits are counted based on your IP address, proxying your requests, or using a VPN may work
|
||||
|
||||
---
|
||||
|
||||
## Config Validation Errors
|
||||
The configuration file is validated against [Dashy's Schema](https://github.com/Lissy93/dashy/blob/master/src/utils/ConfigSchema.json) using AJV.
|
||||
|
||||
First, check that your syntax is valid, using [YAML Validator](https://codebeautify.org/yaml-validator/) or [JSON Validator](https://codebeautify.org/jsonvalidator). If the issue persists, then take a look at the [schema](https://github.com/Lissy93/dashy/blob/master/src/utils/ConfigSchema.json), and verify that the field you are trying to add/ modify matches the required format. You can also use [this tool](https://www.jsonschemavalidator.net/s/JFUj7X9J) to validate your JSON config against the schema, or run `yarn validate-config`.
|
||||
|
||||
If you're trying to use a recently released feature, and are getting a warning, this is likely because you've not yet updated the the current latest version of Dashy.
|
||||
|
||||
If the issue still persists, you should raise an issue.
|
||||
|
||||
---
|
||||
|
||||
## Warnings in the Console during deploy
|
||||
Please acknowledge the difference between errors and warnings before raising an issue about messages in the console. It's not unusual to see warnings about a new version of a certain package being available, an asset bundle bing oversized or a service worker not yet having a cache. These shouldn't have any impact on the running application, so please don't raise issues about these unless it directly relates to a bug or issue you're experiencing. Errors on the other hand should not appear in the console, and they are worth looking into further.
|
||||
|
17
netlify.toml
17
netlify.toml
@ -1,10 +1,23 @@
|
||||
# Enables you to easily deploy a fork of Dashy to Netlify
|
||||
# without the need to configure anything in admin UI
|
||||
# Docs: https://www.netlify.com/docs/netlify-toml-reference/
|
||||
|
||||
# Essential site config
|
||||
[build]
|
||||
base = "/"
|
||||
command = "yarn build"
|
||||
publish = "dist"
|
||||
|
||||
# Site info, used for the 1-Click deploy page
|
||||
[template.environment]
|
||||
STATUSKIT_PAGE_TITLE = "Dashy"
|
||||
STATUSKIT_COMPANY_LOGO = "https://raw.githubusercontent.com/Lissy93/dashy/master/docs/assets/logo.png"
|
||||
STATUSKIT_SUPPORT_CONTACT_LINK = "https://dashy.as93.net"
|
||||
STATUSKIT_SUPPORT_CONTACT_LINK = "https://dashy.to"
|
||||
STATUSKIT_RESOURCES_LINK = "https://github.com/Lissy93/dashy/tree/master/docs"
|
||||
|
||||
|
||||
# Set any security headers here
|
||||
[[headers]]
|
||||
for = "/*"
|
||||
[headers.values]
|
||||
# Uncomment to enable Netlify user control. You must have a paid plan.
|
||||
# Basic-Auth = "someuser:somepassword anotheruser:anotherpassword"
|
16
package.json
16
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Dashy",
|
||||
"version": "1.6.2",
|
||||
"version": "1.6.3",
|
||||
"license": "MIT",
|
||||
"main": "server",
|
||||
"scripts": {
|
||||
@ -12,7 +12,8 @@
|
||||
"build-watch": "vue-cli-service build --watch --mode production",
|
||||
"build-and-start": "npm-run-all --parallel build-watch start",
|
||||
"validate-config": "node services/config-validator",
|
||||
"health-check": "node services/healthcheck"
|
||||
"health-check": "node services/healthcheck",
|
||||
"dependency-audit": "npx improved-yarn-audit --ignore-dev-deps"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sentry/tracing": "^6.10.0",
|
||||
@ -23,19 +24,15 @@
|
||||
"connect": "^3.7.0",
|
||||
"crypto-js": "^4.1.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prismjs": "^1.24.1",
|
||||
"register-service-worker": "^1.6.2",
|
||||
"remedial": "^1.0.8",
|
||||
"serve-static": "^1.14.1",
|
||||
"v-jsoneditor": "^1.4.2",
|
||||
"v-tooltip": "^2.1.3",
|
||||
"vue": "^2.6.10",
|
||||
"vue-cli-plugin-yaml": "^1.0.2",
|
||||
"vue-i18n": "^8.25.0",
|
||||
"vue-js-modal": "^2.0.0-rc.6",
|
||||
"vue-material-tabs": "0.1.5",
|
||||
"vue-prism-editor": "^1.2.2",
|
||||
"vue-router": "^3.0.3",
|
||||
"vue-select": "^3.12.1",
|
||||
"vue-swatches": "^2.1.1",
|
||||
@ -52,12 +49,13 @@
|
||||
"eslint": "^7.24.0",
|
||||
"eslint-config-airbnb": "^18.0.1",
|
||||
"eslint-plugin-vue": "^7.9.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"progress-bar-webpack-plugin": "^2.1.0",
|
||||
"sass": "^1.18.0",
|
||||
"sass": "^1.38.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"vue-cli-plugin-yaml": "^1.0.2",
|
||||
"vue-svg-loader": "^0.16.0",
|
||||
"vue-template-compiler": "^2.6.10",
|
||||
"webpack-build-notifier": "^2.3.0"
|
||||
"vue-template-compiler": "^2.6.10"
|
||||
},
|
||||
"gitHooks": {
|
||||
"pre-commit": "yarn lint"
|
||||
|
@ -7,8 +7,10 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" type="image/png" sizes="64x64" href="/web-icons/favicon-64x64.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/web-icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="64x64" href="<%= BASE_URL %>/web-icons/favicon-64x64.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="web-icons/favicon-32x32.png">
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<link rel="icon" type="image/png" href="<%= BASE_URL %>favicon.ico" />
|
||||
<title>Dashy</title>
|
||||
</head>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="css-editor-outer">
|
||||
<prism-editor class="my-editor" v-model="customCss" :highlight="highlighter" line-numbers />
|
||||
<textarea class="css-editor" v-model="customCss" />
|
||||
<button class="save-button" @click="save()">{{ $t('config.css-save-btn') }}</button>
|
||||
<p class="quick-note">
|
||||
<b>{{ $t('config.css-note-label') }}:</b>
|
||||
@ -12,28 +12,21 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { PrismEditor } from 'vue-prism-editor';
|
||||
import { highlight, languages } from 'prismjs/components/prism-core';
|
||||
import 'prismjs/components/prism-css';
|
||||
import 'prismjs/themes/prism-funky.css';
|
||||
import 'vue-prism-editor/dist/prismeditor.min.css';
|
||||
|
||||
import CustomThemeMaker from '@/components/Settings/CustomThemeMaker';
|
||||
import { getTheme } from '@/utils/ConfigHelpers';
|
||||
import { localStorageKeys } from '@/utils/defaults';
|
||||
|
||||
export default {
|
||||
name: 'JsonEditor',
|
||||
name: 'StyleEditor',
|
||||
props: {
|
||||
config: Object,
|
||||
},
|
||||
components: {
|
||||
CustomThemeMaker,
|
||||
PrismEditor,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
customCss: this.config.appConfig.customCss || '\n\n\n\n\n',
|
||||
customCss: this.config.appConfig.customCss || '\n\n',
|
||||
currentTheme: getTheme(),
|
||||
};
|
||||
},
|
||||
@ -61,9 +54,6 @@ export default {
|
||||
style.textContent = cleanedCss;
|
||||
document.head.append(style);
|
||||
},
|
||||
highlighter(code) {
|
||||
return highlight(code, languages.css);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -91,13 +81,22 @@ button.save-button {
|
||||
}
|
||||
}
|
||||
|
||||
.prism-editor-wrapper {
|
||||
min-height: 200px;
|
||||
border: 1px solid var(--transparent-70);
|
||||
.css-editor {
|
||||
margin: 1rem auto;
|
||||
padding: 0.5rem;
|
||||
width: 80%;
|
||||
height: 8rem;
|
||||
max-height: 16rem;
|
||||
min-height: 4rem;
|
||||
resize: vertical;
|
||||
outline: none;
|
||||
border: 1px solid var(--config-settings-color);
|
||||
border-radius: var(--curve-factor);
|
||||
width: 90%;
|
||||
margin: 0.5rem auto;
|
||||
background: var(--transparent-50);
|
||||
color: var(--config-settings-color);
|
||||
&:focus {
|
||||
box-shadow: 0 40px 70px -2px rgba(0, 0, 0, 0.6), 1px 1px 6px var(--config-settings-color);
|
||||
}
|
||||
}
|
||||
|
||||
p.quick-note {
|
||||
|
@ -1,11 +1,16 @@
|
||||
/**
|
||||
* Global config for the main Vue app. ES7 not supported here.
|
||||
* See docs for all config options: https://cli.vuejs.org/config
|
||||
*/
|
||||
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
|
||||
const WebpackBuildNotifierPlugin = require('webpack-build-notifier');
|
||||
|
||||
// Get current version
|
||||
process.env.VUE_APP_VERSION = require('./package.json').version;
|
||||
process.env.VUE_APP_VERSION = require('./package.json');
|
||||
|
||||
// Specify and export the main Vue app config
|
||||
module.exports = {
|
||||
publicPath: process.env.BASE_URL, // || './',
|
||||
publicPath: process.env.BASE_URL,
|
||||
integrity: true,
|
||||
chainWebpack: config => {
|
||||
config.module.rules.delete('svg');
|
||||
},
|
||||
@ -17,15 +22,11 @@ module.exports = {
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
// Display progress bar while building
|
||||
new ProgressBarPlugin(),
|
||||
new WebpackBuildNotifierPlugin({
|
||||
title: 'Dashy Build Complete',
|
||||
logo: './public/web-icons/dashy-logo.png',
|
||||
suppressSuccess: true,
|
||||
showDuration: true,
|
||||
}),
|
||||
],
|
||||
},
|
||||
// Specify resources for PWA / mobile support
|
||||
pwa: {
|
||||
name: 'Dashy',
|
||||
manifestPath: './manifest.json',
|
||||
@ -40,6 +41,7 @@ module.exports = {
|
||||
msTileImage: './web-icons/dashy-logo.png',
|
||||
},
|
||||
},
|
||||
// Specify page for app entry point
|
||||
pages: {
|
||||
dashy: {
|
||||
entry: 'src/main.js',
|
||||
|
Loading…
Reference in New Issue
Block a user