mirror of
https://github.com/Lissy93/dashy.git
synced 2024-11-23 12:43:52 +03:00
Updates documentation :)
This commit is contained in:
parent
0b1f66b7b7
commit
bc77fbdb71
23
README.md
23
README.md
@ -19,6 +19,7 @@
|
||||
- Customizable layout options, and item sizes
|
||||
- Quickly preview a website, by holding down the Alt key while clicking, to open it in a resizable pop-up modal
|
||||
- Many options for icons, including full Font-Awesome support and the ability to auto-fetch icon from URLs favicon
|
||||
- Option to show service status for each of your apps / links, for basic availability and uptime monitoring
|
||||
- Additional info for each item visible on hover (including opening method icon and description as a tooltip)
|
||||
- Option for full-screen background image, custom nav-bar links, and custom footer text
|
||||
- User preferences stored in local storage and applied on load
|
||||
@ -46,7 +47,7 @@
|
||||
|
||||
## Getting Started 🛫
|
||||
|
||||
> For full setup instructions, see: [**Getting Started**](./docs/getting-started.md)
|
||||
> For full setup instructions, see: [**Deployment**](./docs/deployment.md)
|
||||
|
||||
#### Deploying from Docker Hub 🐳
|
||||
|
||||
@ -104,7 +105,7 @@ You may find these [example config](https://gist.github.com/Lissy93/000f712a5ce9
|
||||
|
||||
## Theming 🎨
|
||||
|
||||
> For full configuration documentation, see: [**Theming**](./docs/theming.md)
|
||||
> For full theming documentation, see: [**Theming**](./docs/theming.md)
|
||||
|
||||
<p align="center">
|
||||
<a href="https://i.ibb.co/BVSHV1v/dashy-themes-slideshow.gif">
|
||||
@ -122,7 +123,7 @@ You can also apply custom CSS overrides directly through the UI (Under Config me
|
||||
|
||||
## Cloud Backup & Sync ☁
|
||||
|
||||
> For full documentation, see: [**Cloud Backup & Sync**](./docs/backup-restore.md)
|
||||
> For full backup documentation, see: [**Cloud Backup & Sync**](./docs/backup-restore.md)
|
||||
|
||||
Dashy has an **optional** built-in feature for securely backing up your config to a hosted cloud service, and then restoring it on another instance. This feature is totally optional, and if you do not enable it, then Dashy will not make any external network requests.
|
||||
|
||||
@ -136,7 +137,7 @@ All data is encrypted before being sent to the backend. In Dashy, this is done i
|
||||
|
||||
## Authentication 💂
|
||||
|
||||
> For full development documentation, see: [**Authentication**](./docs/authentication.md)
|
||||
> For full authentication documentation, see: [**Authentication**](./docs/authentication.md)
|
||||
|
||||
Dashy has a built-in login feature, which can be used for basic access control. To enable this feature, add an `auth` attribute under `appConfig`, containing an array of users, each with a username, SHA-256 hashed password and optional user type.
|
||||
|
||||
@ -146,7 +147,17 @@ appConfig:
|
||||
- user: alicia
|
||||
hash: 4D1E58C90B3B94BCAD9848ECCACD6D2A8C9FBC5CA913304BBA5CDEAB36FEEFA3
|
||||
```
|
||||
At present, access control is handles on the frontend, and therefore in security-critical applications, it is recommended to use VPN access for authentication.
|
||||
At present, access control is handled on the frontend, and therefore in security-critical situations, it is recommended to use an alternate method for authentication, such as [Authelia](https://www.authelia.com/), a VPN or web server and firewall rules.
|
||||
|
||||
**[⬆️ Back to Top](#dashy)**
|
||||
|
||||
---
|
||||
|
||||
## Status Indicators 🚦
|
||||
|
||||
> For full monitoring documentation, see: [**Status Indicators**](./docs/status-indicators.md)
|
||||
|
||||
Dashy has an optional feature that can display a small icon ([like this](./docs/assets/status-check-demo.gif)) next to each of your running services, indicating it's current status. This is useful if you are using Dashy as your homelab's start page, as it gives you an overview of the health of each of your running services. By default, this feature is off, but you can enable it globally by setting `appConfig.statusCheck: true`, or enable/ disable it for an individual item, with `item[n].statusCheck`.
|
||||
|
||||
**[⬆️ Back to Top](#dashy)**
|
||||
|
||||
@ -210,7 +221,7 @@ For more general questions about any of the technologies used, [StackOverflow](h
|
||||
|
||||
## Documentation 📘
|
||||
|
||||
- [Getting Started](/docs/getting-started.md)
|
||||
- [Getting Started](/docs/deployment.md)
|
||||
- [Configuring](/docs/configuring.md)
|
||||
- [Developing](/docs/developing.md)
|
||||
- [Contributing](/docs/contributing.md)
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Getting Started
|
||||
# Deployment
|
||||
|
||||
- [Deployment](#deployment)
|
||||
- [Running the App](#running-the-app)
|
||||
- [Deploy with Docker](#deploy-with-docker)
|
||||
- [Deploy from Source](#deploy-from-source)
|
||||
- [Deploy to Cloud Service](#deploy-to-cloud-service)
|
||||
@ -17,7 +17,7 @@
|
||||
- [NGINX](#nginx)
|
||||
- [Apache](#apache)
|
||||
|
||||
## Deployment
|
||||
## Running the App
|
||||
|
||||
### Deploy with Docker
|
||||
|
||||
@ -154,7 +154,7 @@ yarn build
|
||||
surge ./dist
|
||||
```
|
||||
|
||||
**[⬆️ Back to Top](#getting-started)**
|
||||
**[⬆️ Back to Top](#deployment)**
|
||||
|
||||
---
|
||||
|
||||
@ -177,6 +177,7 @@ The following commands are defined in the [`package.json`](https://github.com/Li
|
||||
- **`yarn health-check`** - Checks that the application is up and running on it's specified port, and outputs current status and response times. Useful for integrating into your monitoring service, if you need to maintain high system availability
|
||||
- **`yarn build-watch`** - If you find yourself making frequent changes to your configuration, and do not want to have to keep manually rebuilding, then this option is for you. It will watch for changes to any files within the projects root, and then trigger a rebuild. Note that if you are developing new features, then `yarn dev` would be more appropriate, as it's significantly faster at recompiling (under 1 second), and has hot reloading, linting and testing integrated
|
||||
- **`yarn build-and-start`** - Builds the app, runs checks and starts the production server. Commands are run in parallel, and so is faster than running them in independently
|
||||
- **`yarn pm2-start`** - Starts the Node server using [PM2](https://pm2.keymetrics.io/), a process manager for Node.js applications, that helps them stay alive. PM2 has some built-in basic monitoring features, and an optional [management solution](https://pm2.io/). If you are running the app on bare metal, it is recommended to use this start command
|
||||
|
||||
### Healthchecks
|
||||
|
||||
@ -192,7 +193,7 @@ You can check the resource usage for your running Docker containers with `docker
|
||||
|
||||
You can also view logs, resource usage and other info as well as manage your Docker workflow in third-party Docker management apps. For example [Portainer](https://github.com/portainer/portainer) an all-in-one management web UI for Docker and Kubernetes, or [LazyDocker](https://github.com/jesseduffield/lazydocker) a terminal UI for Docker container management and monitoring.
|
||||
|
||||
**[⬆️ Back to Top](#getting-started)**
|
||||
**[⬆️ Back to Top](#deployment)**
|
||||
|
||||
---
|
||||
## Updating
|
||||
@ -230,8 +231,7 @@ For more information, see the [Watchtower Docs](https://containrrr.dev/watchtowe
|
||||
4. Re-build: `yarn build`
|
||||
5. Start: `yarn start`
|
||||
|
||||
|
||||
**[⬆️ Back to Top](#getting-started)**
|
||||
**[⬆️ Back to Top](#deployment)**
|
||||
|
||||
---
|
||||
|
||||
@ -241,8 +241,9 @@ _The following section only applies if you are not using Docker, and would like
|
||||
|
||||
Dashy ships with a pre-configured Node.js server, in [`server.js`](https://github.com/Lissy93/dashy/blob/master/server.js) which serves up the contents of the `./dist` directory on a given port. You can start the server by running `node server`. Note that the app must have been build (run `yarn build`), and you need [Node.js](https://nodejs.org) installed.
|
||||
|
||||
However, since Dashy is just a static web application, it can be served with whatever server you like. The following section outlines how you can configure a web server.
|
||||
If you wish to run Dashy from a sub page (e.g. `example.com/dashy`), then just set the `BASE_URL` environmental variable to that page name (in this example, `/dashy`), before building the app, and the path to all assets will then resolve to the new path, instead of `./`.
|
||||
|
||||
However, since Dashy is just a static web application, it can be served with whatever server you like. The following section outlines how you can configure a web server.
|
||||
### NGINX
|
||||
|
||||
Create a new file in `/etc/nginx/sites-enabled/dashy`
|
||||
@ -299,13 +300,13 @@ Then restart Apache, with `sudo systemctl restart apache2`
|
||||
8. If you need to change the port, click 'Add environmental variable', give it the name 'PORT', choose a port number and press 'Save'.
|
||||
9. Dashy should now be running at your selected path an on a given port
|
||||
|
||||
**[⬆️ Back to Top](#getting-started)**
|
||||
**[⬆️ Back to Top](#deployment)**
|
||||
|
||||
---
|
||||
|
||||
## Authentication
|
||||
|
||||
Dashy has built-in client-side authentication, but for security-critical situations, it is recommend to either use a VPN for access, or implement your own authentication using your cloud provider, web server or firewall rules. For more info, see **[Authentication Docs](/docs/authentication.md)**.
|
||||
Dashy has built-in authentication and login functionality. However, since this is handled on the client-side, if you are using Dashy in security-critical situations, it is recommended to use an alternate method for authentication, such as [Authelia](https://www.authelia.com/), a VPN or web server and firewall rules. For more info, see **[Authentication Docs](/docs/authentication.md)**.
|
||||
|
||||
|
||||
**[⬆️ Back to Top](#getting-started)**
|
||||
**[⬆️ Back to Top](#deployment)**
|
@ -47,6 +47,17 @@ Note:
|
||||
- If you are using NPM, replace `yarn` with `npm run`
|
||||
- If you are using Docker, precede each command with `docker exec -it [container-id]`. Container ID can be found by running `docker ps`
|
||||
|
||||
### Environmental Variables
|
||||
|
||||
- `PORT` - The port in which the application will run (defaults to `4000` for the Node.js server, and `80` within the Docker container)
|
||||
- `VUE_APP_DOMAIN` - The URL where Dashy is going to be accessible from. This should include the protocol, hostname and (if not 80 or 443), then the port too, e.g. `https://localhost:3000`, `http://192.168.1.2:4002` or `https://dashy.mydomain.com`
|
||||
|
||||
All environmental variables are optional. Currently there are not many environmental variables used, as most of the user preferences are stored under `appConfig` in the `conf.yml` file.
|
||||
|
||||
If you do add new variables, ensure that there is always a fallback (define it in [`defaults.js`](https://github.com/Lissy93/dashy/blob/master/src/utils/defaults.js)), so as to not cause breaking changes. Don't commit your `.env` file to git, but instead take a few moments to document what you've added under the appropriate section. Try and follow the concepts outlined in the [12 factor app](https://12factor.net/config), as these are good practices.
|
||||
|
||||
Any environmental variables used by the frontend are preceded with `VUE_APP_`. Vue will merge the contents of your `.env` file into the app in a similar way to the ['dotenv'](https://github.com/motdotla/dotenv) package, where any variables that you set on your system will always take preference over the contents of any `.env` file.
|
||||
|
||||
### Resources for Beginners
|
||||
New to Web Development? Glad you're here! Dashy is a pretty simple app, so it should make a good candidate for your first PR. Presuming that you already have a basic knowledge of JavaScript, the following articles should point you in the right direction for getting up to speed with the technologies used in this project:
|
||||
- [Introduction to Vue.js](https://v3.vuejs.org/guide/introduction.html)
|
||||
@ -79,7 +90,6 @@ The most significant things to note are:
|
||||
|
||||
For the full styleguide, see: [github.com/airbnb/javascript](https://github.com/airbnb/javascript)
|
||||
|
||||
|
||||
### Frontend Components
|
||||
|
||||
All frontend code is located in the `./src` directory, which is split into 5 sub-folders:
|
||||
@ -122,6 +132,9 @@ Running `yarn upgrade` will updated all dependencies based on the ranges specifi
|
||||
#### Performance - Lighthouse
|
||||
The easiest method of checking performance is to use Chromium's build in auditing tool, Lighthouse. To run the test, open Developer Tools (usually F12) --> Lighthouse and click on the 'Generate Report' button at the bottom.
|
||||
|
||||
#### Dependencies - BundlePhobia
|
||||
[BundlePhobia](https://bundlephobia.com/) is a really useful app that lets you analyze the cost of adding any particular dependency to an application
|
||||
|
||||
### Directory Structure
|
||||
|
||||
#### Files in the Root: `./`
|
||||
|
@ -1,6 +1,6 @@
|
||||
## Contents
|
||||
|
||||
- [Getting Started](/docs/getting-started.md)
|
||||
- [Deployment](/docs/deployment.md)
|
||||
- [Configuring](/docs/configuring.md)
|
||||
- [Developing](/docs/developing.md)
|
||||
- [Contributing](/docs/contributing.md)
|
||||
|
@ -1,6 +1,6 @@
|
||||
## User Guide
|
||||
|
||||
This article outlines how to use the application. If you are instead looking for deployment instructions, see [Getting Started](/docs/getting-started.md) and [Configuring](/docs/configuring.md)
|
||||
This article outlines how to use the application. If you are instead looking for deployment instructions, see [Deployment](/docs/deployment.md) and [Configuring](/docs/configuring.md)
|
||||
|
||||
### Contents
|
||||
- [Searching](#searching)
|
||||
@ -66,7 +66,7 @@ You can also use Alt + Click or Alt + Enter, to open an item in a popup window.
|
||||
|
||||
### Sections and Items
|
||||
|
||||
The main content in Dashy is split into sections, which contain icons. You can have as many sections as you need, and each section can have an unlimited amount of icons. Visually, the grid layout works better when sections have a similar number of icons.
|
||||
The main content in Dashy is defined as an array of sections, each of which contains an array of items. You can have as many sections as you need, and each section can have an unlimited amount of items. If you are using the grid layout, then it works better, visually if each of your sections have similar number of items.
|
||||
|
||||
Sections are collapsible, which is useful for those sections which contain less used applications, or are particularly long. The collapse state of a given section is remembered (stored in local storage), and applied on load.
|
||||
|
||||
@ -100,7 +100,7 @@ Sections also have several optional properties, which are specified under `secti
|
||||
|
||||
### Icons
|
||||
|
||||
Both sections and items can have an icon associated with them. There are several options for specifying icons. You can let the icon be automatically resolved and fetched from the items associated URL, by just setting the icon to `favicon`. You can use a font-awesome icon, by specifying it's name and category. Or you can pass in a URL, either to a locally hosted or remote image. For local images, you can put them in `./public/item-icons/` and then reference them just by the file name.
|
||||
Both sections and items can have an icon associated with them. There are several options for specifying icons. You can let the icon be automatically resolved and fetched from the items associated URL, by setting it's value to `favicon`. You can use a font-awesome icon, by specifying it's name and category, e.g. `fas fa-rocket`. Or you can pass in a URL, either to a locally hosted or remote image. For local images, you can put them in `./public/item-icons/` and then reference them just by the file name.
|
||||
|
||||
**[⬆️ Back to Top](#user-guide)**
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user