Skip to content

Commit 931915f

Browse files
authored
🔀 Merge pull request #1528 from Lissy93/FEAT/Dashy-V3
[FEAT] Remove the need for rebuild after config changes
2 parents 6f94ac8 + ff2be31 commit 931915f

File tree

97 files changed

+3270
-1796
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+3270
-1796
lines changed

.env

Lines changed: 59 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,59 @@
1-
# Store environmental variables here. All variables are optional.
2-
# Lines beginning in '#' are ignored.
3-
4-
# Can be either development, production or test
5-
# NODE_ENV=production
6-
7-
# The port to expose the running application on
8-
# PORT=4000
9-
10-
# If you've proved SSL certs, then can set HTTPS port
11-
# SSL_PORT=4001
12-
13-
# The host that Dashy is running on, domain or IP
14-
# HOST=localhost
15-
16-
# The default base path for serving up static assets
17-
# BASE_URL=./
18-
19-
# Optionally, specify the path of SSL private + public keys
20-
# SSL_PRIV_KEY_PATH=/etc/ssl/certs/dashy-priv.key
21-
# SSL_PUB_KEY_PATH=/etc/ssl/certs/dashy-pub.pem
22-
23-
# If SSL enabled, choose whether or not to redirect http to https
24-
# Defaults to true
25-
# REDIRECT_HTTPS=true
26-
27-
# Usually the same as BASE_URL, but accessible in frontend
28-
# VUE_APP_DOMAIN=https://dashy.to
29-
30-
# Should enable SRI for build script and link resources
31-
# INTEGRITY=true
32-
33-
# Computed automatically on build. Indicates if running in container
34-
# IS_DOCKER=true
35-
36-
# Again, set automatically using package.json during build time
37-
# VUE_APP_VERSION=2.0.0
38-
39-
# Directory for conf.yml backups
40-
# BACKUP_DIR=./public/
1+
# Store environmental variables here. All variables are optional.
2+
# Lines beginning in '#' are ignored.
3+
4+
# Can be either development, production or test
5+
# NODE_ENV=production
6+
7+
# The port to expose the running application on
8+
# PORT=4000
9+
10+
# If you've proved SSL certs, then can set HTTPS port
11+
# SSL_PORT=4001
12+
13+
# The host that Dashy is running on, domain or IP
14+
# HOST=localhost
15+
16+
# The default base path for serving up static assets
17+
# BASE_URL=./
18+
19+
# Optionally, specify the path of SSL private + public keys
20+
# SSL_PRIV_KEY_PATH=/etc/ssl/certs/dashy-priv.key
21+
# SSL_PUB_KEY_PATH=/etc/ssl/certs/dashy-pub.pem
22+
23+
# If SSL enabled, choose whether or not to redirect http to https
24+
# Defaults to true
25+
# REDIRECT_HTTPS=true
26+
27+
# The path to the user data directory
28+
# USER_DATA_DIR=user-data
29+
30+
# Override where the path to the configuration file is, can be a remote URL
31+
# VUE_APP_CONFIG_PATH=/conf.yml
32+
33+
# Usually the same as BASE_URL, but accessible in frontend
34+
# VUE_APP_DOMAIN=https://dashy.to
35+
36+
# Override the page title for the frontend app
37+
# VUE_APP_TITLE=''
38+
39+
# Set the default view to load on startup (can be `minimal`, `workspace` or `home`)
40+
# VUE_APP_STARTING_VIEW=home
41+
42+
# Set the Vue app routing mode (can be 'hash', 'history' or 'abstract')
43+
# VUE_APP_ROUTING_MODE=history
44+
45+
# Should enable SRI for build script and link resources
46+
# INTEGRITY=true
47+
48+
# Computed automatically on build. Indicates if running in container
49+
# IS_DOCKER=true
50+
51+
# Again, set automatically using package.json during build time
52+
# VUE_APP_VERSION=2.0.0
53+
54+
# Directory for conf.yml backups
55+
# BACKUP_DIR=./user-data/
56+
57+
# Setup any other user defined vars by prepending VUE_APP_ to the var name
58+
# VUE_APP_pihole_ip=http://your.pihole.ip
59+
# VUE_APP_pihole_key=your_pihole_secret_key

.github/AUTHORS.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,5 @@ Lissy93 <[email protected]> - 222 commits
163163
Alicia Bot <[email protected]> - 240 commits
164164
liss-bot <[email protected]> - 244 commits
165165
Alicia Sykes <[email protected]> - 439 commits
166-
Alicia Sykes <[email protected]> - 505 commits
167-
Alicia Sykes <[email protected]> - 1488 commits
166+
Alicia Sykes <[email protected]> - 471 commits
167+
Alicia Sykes <[email protected]> - 1488 commits

.github/workflows/auto-tag-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
bodyFile: ".github/LATEST_CHANGELOG.md"
3535
mark-issue-fixed:
3636
runs-on: ubuntu-latest
37+
if: ${{ github.event_name == 'issues' }}
3738
steps:
3839
- uses: actions/checkout@v2
3940
- name: Label Fixed Issues

.github/workflows/broadcast-message.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/dependency-updates-summary.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ jobs:
1515
collapsibleThreshold: '25'
1616
failOnDowngrade: 'false'
1717
path: 'yarn.lock'
18-
updateComment: 'true'

.github/workflows/generate-credits.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,3 @@ jobs:
6666
committer_username: liss-bot
6767
committer_email: [email protected]
6868

69-
make-author-list:
70-
runs-on: ubuntu-latest
71-
steps:
72-
- name: Checkout 🛎️
73-
uses: actions/checkout@v2
74-
with:
75-
fetch-depth: 0
76-
- uses: wow-actions/[email protected]
77-
with:
78-
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
79-
sort: commits
80-
bots: true
81-
path: .github/AUTHORS.txt
82-
commit: ':blue_heart: Makes author list'
83-
template: '{{name}} <{{email}}> - {{commits}} commits'

.github/workflows/release-commenter.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ jobs:
1010
- uses: apexskier/github-release-commenter@v1
1111
with:
1212
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
13-
label-template: 🛩️ Released {release_tag}, 🔨 Fixed
13+
label-template: 🛩️ Released {release_tag}
1414
comment-template: |
15-
**The fix for this issue has now been released in {release_name} ✨**
15+
**This has now been released in {release_name} ✨**
1616
1717
If you haven't done so already, please [update your instance](https://github.com/Lissy93/dashy/blob/master/docs/management.md#updating) to `{release_tag}` or later. See {release_link} for full info.
18-
19-
Feel free to reach out if you need any more support. If you are enjoying Dashy, consider [supporting the project](https://github.com/Lissy93/dashy/blob/master/docs/contributing.md#contributing).

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN yarn build --mode production
2828
FROM node:20.11.1-alpine3.19
2929

3030
# Define some ENV Vars
31-
ENV PORT=80 \
31+
ENV PORT=8080 \
3232
DIRECTORY=/app \
3333
IS_DOCKER=true
3434

@@ -40,8 +40,6 @@ RUN apk add --no-cache tzdata
4040

4141
# Copy built application from build phase
4242
COPY --from=BUILD_IMAGE /app ./
43-
# Ensure only one version of conf.yml exists
44-
RUN rm dist/conf.yml
4543

4644
# Finally, run start command to serve up the built application
4745
CMD [ "yarn", "build-and-start" ]

README.md

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,12 @@
66
<img width="120" src="https://i.ibb.co/yhbt6CY/dashy.png" />
77
<br/>
88
<b><a href="./docs/showcase.md">User Showcase</a></b> | <b><a href="https://demo.dashy.to">Live Demo</a></b> | <b><a href="./docs/quick-start.md">Getting Started</a></b> | <b><a href="https://dashy.to/docs">Documentation</a></b> | <b><a href="https://github.com/Lissy93/dashy">GitHub</a></b>
9-
<br/><br/>
10-
<a href="https://github.com/awesome-selfhosted/awesome-selfhosted#personal-dashboards">
11-
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome Self-Hosted">
12-
</a>
13-
<a href="./LICENSE">
14-
<img src="https://img.shields.io/badge/License-MIT-0aa8d2?logo=opensourceinitiative&logoColor=fff" alt="License MIT">
15-
</a>
16-
<a href="./.github/CHANGELOG.md">
17-
<img src="https://img.shields.io/github/package-json/v/lissy93/dashy?logo=azurepipelines&amp;color=0aa8d2" alt="Current Version">
18-
</a>
19-
<a href="https://hub.docker.com/r/lissy93/dashy">
20-
<img src="https://img.shields.io/docker/pulls/lissy93/dashy?logo=docker&color=0aa8d2&logoColor=fff" alt="Docker Pulls">
21-
</a>
22-
<a href="http://as93.link/dashy-build-status">
23-
<img src="https://badgen.net/github/status/lissy93/dashy?icon=github" alt="GitHub Status">
24-
</a>
25-
<a href="https://snyk.io/test/github/lissy93/dashy">
26-
<img src="https://snyk.io/test/github/lissy93/dashy/badge.svg" alt="Known Vulnerabilities">
27-
</a>
289
</p>
2910

11+
> [!NOTE]
12+
> Version [3.0.0](https://github.com/Lissy93/dashy/releases/tag/3.0.0) has been released, and requires some changes to your setup, see [#1529](https://github.com/Lissy93/dashy/discussions/1529) for details.
13+
14+
3015
<details>
3116
<summary><b>Table of Contents</b></summary>
3217
<p>
@@ -95,7 +80,7 @@
9580

9681
**Screenshots**: Checkout the [Showcase](./docs/showcase.md), to see example dashboards from the community
9782

98-
**Spin up your own demo**: [![One-Click Deploy with PWD](https://img.shields.io/badge/Play--with--Docker-Deploy-2496ed?style=flat-square&logo=docker)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml) or [`docker run -p 8080:80 lissy93/dashy`](./docs/quick-start.md)
83+
**Spin up your own demo**: [![One-Click Deploy with PWD](https://img.shields.io/badge/Play--with--Docker-Deploy-2496ed?style=flat-square&logo=docker)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml) or [`docker run -p 8080:8080 lissy93/dashy`](./docs/quick-start.md)
9984

10085

10186
<p align="center">
@@ -116,15 +101,15 @@
116101
You will need [Docker](https://docs.docker.com/get-docker/) installed on your system
117102

118103
```
119-
docker run -p 8080:80 lissy93/dashy
104+
docker run -p 8080:8080 lissy93/dashy
120105
```
121106

122107
Or
123108

124109
```docker
125110
docker run -d \
126-
-p 4000:80 \
127-
-v /root/my-local-conf.yml:/app/public/conf.yml \
111+
-p 4000:8080 \
112+
-v /root/my-local-conf.yml:/app/user-data/conf.yml \
128113
--name my-dashboard \
129114
--restart=always \
130115
lissy93/dashy:latest
@@ -140,7 +125,7 @@ See also: [examples with Docker Compose](./docs/deployment.md#using-docker-compo
140125
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.
141126

142127
- Clone the Repo: `git clone https://github.com/Lissy93/dashy.git` and `cd dashy`
143-
- Configuration: Fill in your settings in `./public/conf.yml`
128+
- Configuration: Fill in your settings in `./user-data/conf.yml`
144129
- Install dependencies: `yarn`
145130
- Build: `yarn build`
146131
- Run: `yarn start`
@@ -169,7 +154,7 @@ Dashy supports **1-Click deployments** on several popular cloud platforms. To sp
169154

170155
> For full configuration documentation, see: [**Configuring**](./docs/configuring.md)
171156
172-
Dashy is configured through a YAML file, located at `./public/conf.yml`. In addition, you can find a complete list of available options in the [Configuring Docs](./docs/configuring.md). The config can also be edited and saved directly through the UI.
157+
Dashy is configured through a YAML file, located at `./user-data/conf.yml`. In addition, you can find a complete list of available options in the [Configuring Docs](./docs/configuring.md). The config can also be edited and saved directly through the UI.
173158

174159
**[⬆️ Back to Top](#dashy)**
175160

@@ -581,7 +566,8 @@ Huge thanks to the sponsors helping to support Dashy's development!
581566
<br />
582567
<sub><b>Shrippen</b></sub>
583568
</a>
584-
</td>
569+
</td></tr>
570+
<tr>
585571
<td align="center">
586572
<a href="https://github.com/bile0026">
587573
<img src="https://avatars.githubusercontent.com/u/5022496?u=aec96ad173c0ea9baaba93807efa8a848af6595c&v=4" width="80;" alt="bile0026"/>
@@ -843,16 +829,25 @@ For more info, see TLDR Legal's [Explanation of MIT](https://tldrlegal.com/licen
843829
844830
---
845831
846-
847-
<p align="center">
848-
<br>
849-
<a href="https://dashboard.trackgit.com/token/ks0bx7bb14lsvbwoc3ik">
850-
<img src="https://us-central1-trackgit-analytics.cloudfunctions.net/token/ping/ks0bx7bb14lsvbwoc3ik?style=flat-square" />
851-
</a>
852-
<br><br>
853-
<a href="https://github.com/Lissy93/dashy">
854-
<img src="https://github.githubassets.com/images/icons/emoji/octocat.png" />
855-
</a>
856-
<br><br>
857-
<i>Thank you for Visiting</i>
832+
<!-- License + Copyright -->
833+
<p align="center">
834+
<i>© <a href="https://aliciasykes.com">Alicia Sykes</a> 2024</i><br>
835+
<i>Licensed under <a href="https://gist.github.com/Lissy93/143d2ee01ccc5c052a17">MIT</a></i><br>
836+
<a href="https://github.com/lissy93"><img src="https://i.ibb.co/4KtpYxb/octocat-clean-mini.png" /></a><br>
837+
<sup>Thanks for visiting :)</sup>
858838
</p>
839+
840+
<!-- Dinosaurs are Awesome -->
841+
<!--
842+
. - ~ ~ ~ - .
843+
.. _ .-~ ~-.
844+
//| \ `..~ `.
845+
|| | } } / \ \
846+
(\ \\ \~^..' | } \
847+
\`.-~ o / } | / \
848+
(__ | / | / `.
849+
`- - ~ ~ -._| /_ - ~ ~ ^| /- _ `.
850+
| / | / ~-. ~- _
851+
|_____| |_____| ~ - . _ _~_-_
852+
-->
853+

docker-compose.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,17 @@ services:
1212
# To build from source, replace 'image: lissy93/dashy' with 'build: .'
1313
# build: .
1414

15-
# Or, to use a Dockerfile for your archtecture, uncomment the following
16-
# context: .
17-
# dockerfile: ./docker/Dockerfile-arm32v7
18-
1915
# You can also use an image with a different tag, or pull from a different registry, e.g:
20-
# image: ghcr.io/lissy93/dashy or image: lissy93/dashy:arm64v8
16+
# image: ghcr.io/lissy93/dashy or image: lissy93/dashy:3.0.0
2117

2218
# Pass in your config file below, by specifying the path on your host machine
2319
# volumes:
24-
# - /path/to/my-config.yml:/app/public/conf.yml
25-
# - /path/to/item-icons:/app/public/item-icons
20+
# - /path/to/my-config.yml:/app/user-data/conf.yml
21+
# - /path/to/item-icons:/app/user-data/item-icons/
2622

2723
# Set port that web service will be served on. Keep container port as 80
2824
ports:
29-
- 4000:80
25+
- 4000:8080
3026

3127
# Set any environmental variables
3228
environment:

docker/docker-readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
**Screenshots**: Checkout the [Showcase](https://github.com/Lissy93/dashy/blob/master/docs/showcase.md), to see example dashboards from the community
5757

58-
**Spin up your own demo**: [![One-Click Deploy with PWD](https://img.shields.io/badge/Play--with--Docker-Deploy-2496ed?style=flat-square&logo=docker)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml) or [`docker run -p 8080:80 lissy93/dashy`](./docs/quick-start.md)
58+
**Spin up your own demo**: [![One-Click Deploy with PWD](https://img.shields.io/badge/Play--with--Docker-Deploy-2496ed?style=flat-square&logo=docker)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml) or [`docker run -p 8080:8080 lissy93/dashy`](./docs/quick-start.md)
5959

6060

6161
<p align="center">
@@ -69,7 +69,7 @@
6969

7070
## Getting Started 🛫
7171

72-
To deploy Dashy with Docker, just run `docker run -p 8080:80 lissy93/dashy`, then open `http://localhost:8080`
72+
To deploy Dashy with Docker, just run `docker run -p 8080:8080 lissy93/dashy`, then open `http://localhost:8080`
7373

7474
For full list of options and a Docker compose file, see the [Deployment Docs](https://github.com/Lissy93/dashy/blob/master/docs/deployment.md).
7575

docs/assets/CONTRIBUTORS.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/assets/repo-visualization.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/authentication.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,19 @@
2020

2121

2222
> [!IMPORTANT]
23-
> Dashy's built-in auth is not indented to protect a publicly hosted instance against unauthorized access. Instead you should use an auth provider compatible with your reverse proxy, or access Dashy via your VPN.
23+
> Dashy's built-in auth is not indented to protect a publicly hosted instance against unauthorized access. Instead you should use an auth provider compatible with your reverse proxy, or access Dashy via your VPN, or implement your own SSO logic.
2424
>
2525
> In cases where Dashy is only accessibly within your home network, and you just want to add a login page, then the built-in auth may be sufficient, but keep in mind that configuration can still be accessed.
2626
2727
## Built-In Auth
2828

2929
Dashy has a basic login page included, and frontend authentication. You can enable this by adding users to the `auth` section under `appConfig` in your `conf.yml`. If this section is not specified, then no authentication will be required to access the app, and the homepage will resolve to your dashboard.
3030

31+
> [!NOTE]
32+
> Since the auth is initiated in the main app entry point (for security), a rebuild is required to apply changes to the auth configuration.
33+
> You can trigger a rebuild through the UI, under Config --> Rebuild, or by running `yarn build` in the root directory.
34+
35+
3136
### Setting Up Authentication
3237

3338
The `auth` property takes an array of users. Each user needs to include a username, hash and optional user type (`admin` or `normal`). The hash property is a [SHA-256 Hash](https://en.wikipedia.org/wiki/SHA-2) of your desired password.
@@ -263,7 +268,7 @@ In NGINX you can specify [control access](https://docs.nginx.com/nginx/admin-gui
263268

264269
```text
265270
server {
266-
listen 80;
271+
listen 8080;
267272
server_name www.dashy.example.com;
268273
location / {
269274
root /path/to/dashy/;

docs/backup-restore.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Cloud Backup and Restore
22

3+
Beyond the cloud backup/restore service, there are several other self-hosted options you can use to backup Dashy, and any other Docker container data. These are outlined in the Management docs, at: [Docker Backup Options](/docs/management.md#backing-up).
4+
35
Dashy has a 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.
46

57
This is useful not only for backing up your configuration off-site, but it also enables Dashy to be used without having write a YAML config file, and makes it possible to use a public hosted instance, without the need to self-host.

0 commit comments

Comments
 (0)