diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 47e586a26a..06f8b5484b 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## ✨ 1.8.9 - All New Interactive Config Editor [PR #298](https://github.com/Lissy93/dashy/pull/298) +- Builds a new UI-based config editor +- Support for sections, items, app config and page info +- Live preview, and undoing of local changes +- Export config or write changes to disk through UI + ## ✨ 1.8.8 - Improved Item Targets [PR #292](https://github.com/Lissy93/dashy/pull/292) - Adds support for `_top` and `_parent` anchor targets on items, Re: #289 - Adds `appConfig.defaultOpeningMethod` option to specify default target diff --git a/README.md b/README.md index ea5ad6f831..2303055476 100644 --- a/README.md +++ b/README.md @@ -71,14 +71,14 @@ - 🔎 Instant search by name, domain and tags + customizable hotkeys & keyboard shortcuts - 🎨 Multiple built-in color themes, with UI color editor and support for custom CSS -- 🧸 Many options for icons, including Font-Awesome, homelab icons, auto-fetching favicon, images and emojis -- 🚦 Service status feature for each of your apps / links, for basic availability and uptime monitoring +- 🧸 Many icon options- Font-Awesome, homelab icons, auto-fetching favicon, images, emojis, etc +- 🚦 Status monitoring for each of your apps / links, for basic availability and uptime checking - 💂 Optional authentication with multi-user access, configurable privileges and SSO support -- 🌎 Multi-language support, with more languages being added regularly -- ☁ Optional encrypted off-site cloud backup and restore feature available -- 💼 A workspace view, for easily switching between multiple apps at once +- 🌎 Multi-language support, with 10+ human-translated languages, and more on the way +- ☁ Optional, encrypted, free off-site cloud backup and restore feature available +- 💼 A workspace view, for easily switching between multiple apps at simultaneously - 🛩️ A minimal view, for use as a fast-loading browser startpage -- 🖱️ Choose how to launch apps, either new tab, same tab, a pop-up modal or in the workspace view +- 🖱️ Choose app launch method, either new tab, same tab, a pop-up modal or in the workspace view - 📏 Customizable layout, sizes, text, component visibility, sort order, behavior etc - 🖼️ Option for full-screen background image, custom nav-bar links, html footer, title, etc - 🚀 Easy to setup with Docker, or on bare metal, or with 1-Click cloud deployment @@ -87,7 +87,7 @@ - 🤏 Small bundle size, fully responsive UI and PWA for basic offline access - 🆓 100% free and open source - 🔐 Strong focus on privacy -- 🌈 Plus lots more... +- 🌈 Plus loads more... ## Demo ⚡ @@ -534,7 +534,7 @@ If you're using Dashy, and would like to help support it's development, then tha Several areas that we need a bit of help with at the moment are: - Translating - Help make Dashy available to non-native English speakers by [adding youre language](./docs/multi-language-support.md#adding-a-new-language) - Donate a small amount, by [Sponsoring @Lissy93 on GitHub](https://github.com/sponsors/Lissy93) and receive some extra perks! -- Complete a [short survey](https://n9fy6xak9yd.typeform.com/to/gl0L68ou), to have your say about future features +- Complete a [short survey](https://survey.typeform.com/to/gl0L68ou), to have your say about future features - Share your dashboard in the [Showcase](https://github.com/Lissy93/dashy/blob/master/docs/showcase.md#dashy-showcase-), to provide inspiration for others - Join the [discussion](https://github.com/Lissy93/dashy/discussions), help answer other users questions, suggest features, share tips and ask questions - Spread the word, by sharing Dashy or a screenshot of your dashboard, to help new users discover it diff --git a/docs/contributing.md b/docs/contributing.md index 66a8124ad3..0f242c3848 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -13,7 +13,7 @@ If you speak another language, then adding translations would be really helpful, ## Take a 2-minute survey Help improve Dashy by taking a very short, 6-question survey. This will give me a better understanding of what is important to you, so that I can make Dashy better in the future :) -[![Take the Survey](https://img.shields.io/badge/Take_the-Survey-%231a86fd?style=for-the-badge&logo=buddy)](https://n9fy6xak9yd.typeform.com/to/gl0L68ou) +[![Take the Survey](https://img.shields.io/badge/Take_the-Survey-%231a86fd?style=for-the-badge&logo=buddy)](https://survey.typeform.com/to/gl0L68ou) ## Share your dashboard Dashy now has a [Showcase](https://github.com/Lissy93/dashy/blob/master/docs/showcase.md#dashy-showcase-) where you can show off a screenshot of your dashboard, and get inspiration from other users. I also really enjoy seeing how people are using Dashy. To [submit your dashboard](https://github.com/Lissy93/dashy/blob/master/docs/showcase.md#submitting-your-dashboard), please either open a PR or raise an issue. diff --git a/docs/management.md b/docs/management.md index f77880649f..e43e9db7a4 100644 --- a/docs/management.md +++ b/docs/management.md @@ -1,6 +1,6 @@ # Management -_The following article explains aspects of app management, and is useful to know for when self-hosting. It covers everything from keeping the app up-to-date, secure, backed up, to other topics like auto-starting, monitoring, log management, web server configuration and using custom environments. Most of it is aimed at running the Dashy (or any other app) in a container, but some of it also applies to bare metal setups too. It's like a top-15 list of need-to-know knowledge for self-hosting._ +_The following article explains aspects of app management, and is useful to know for when self-hosting. It covers everything from keeping the Dashy (or any other app) up-to-date, secure, backed up, to other topics like auto-starting, monitoring, log management, web server configuration and using custom environments. It's like a top-20 list of need-to-know knowledge for self-hosting._ ## Contents - [Providing Assets](#providing-assets) @@ -16,8 +16,11 @@ _The following article explains aspects of app management, and is useful to know - [Managing with Compose](#managing-containers-with-docker-compose) - [Environmental Variables](#passing-in-environmental-variables) - [Securing Containers](#container-security) +- [Remote Access](#remote-access) +- [Custom Domain](#custom-domain) - [Web Server Configuration](#web-server-configuration) -- [Running a Modified Apps](#running-a-modified-version-of-the-app) +- [Running a Modified App](#running-a-modified-version-of-the-app) +- [Building your Own Container](#building-your-own-container) --- @@ -37,9 +40,9 @@ In Dashy, commonly configured resources include: --- ## Running Commands -The project has a few commands that can be used for various tasks, you can find a list of these either in the [Developing Docs](/docs/developing.md#project-commands), or by looking at the [`package.json`](https://github.com/Lissy93/dashy/blob/master/package.json#L5). These can be used by running `yarn [command-name]`. + If you're running an app in Docker, then commands will need to be passed to the container to be executed. This can be done by preceding each command with `docker exec -it [container-id]`, where container ID can be found by running `docker ps`. For example `docker exec -it 26c156c467b4 yarn build`. You can also enter the container, with `docker exec -it [container-id] /bin/ash`, and navigate around it with normal Linux commands. - If you're using Docker, then you'll need to execute them within the container. This can be done by preceding each command with `docker exec -it [container-id]`, where container ID can be found by running `docker ps`. For example `docker exec -it 26c156c467b4 yarn build`. You can also enter the container, with `docker exec -it [container-id] /bin/ash`, and navigate around it with normal Linux commands. + Dashy has several commands that can be used for various tasks, you can find a list of these either in the [Developing Docs](/docs/developing.md#project-commands), or by looking at the [`package.json`](https://github.com/Lissy93/dashy/blob/master/package.json#L5). These can be used by running `yarn [command-name]`. **[⬆️ Back to Top](#management)** @@ -48,7 +51,7 @@ The project has a few commands that can be used for various tasks, you can find Healthchecks are configured to periodically check that Dashy is up and running correctly on the specified port. By default, the health script is called every 5 minutes, but this can be modified with the `--health-interval` option. You can check the current container health with: `docker inspect --format "{{json .State.Health }}" [container-id]`, and a summary of health status will show up under `docker ps`. You can also manually request the current application status by running `docker exec -it [container-id] yarn health-check`. You can disable healthchecks altogether by adding the `--no-healthcheck` flag to your Docker run command. -To restart unhealthy containers automatically, check out [Autoheal](https://hub.docker.com/r/willfarrell/autoheal/). This image watches for unhealthy containers, and automatically triggers a restart. (This is a stand in for Docker's `--exit-on-unhealthy` that was proposed, but [not merged](https://github.com/moby/moby/pull/22719)). +To restart unhealthy containers automatically, check out [Autoheal](https://hub.docker.com/r/willfarrell/autoheal/). This image watches for unhealthy containers, and automatically triggers a restart. (This is a stand in for Docker's `--exit-on-unhealthy` that was proposed, but [not merged](https://github.com/moby/moby/pull/22719)). There's also [Deunhealth](https://github.com/qdm12/deunhealth), which is super light-weight, and doesn't require network access. ``` docker run -d \ @@ -271,6 +274,22 @@ If you've got many environmental variables, you might find it useful to put them ## Container Security +- [Keep Docker Up-To-Date](#keep-docker-up-to-date) +- [Set Resource Quotas](#set-resource-quotas) +- [Don't Run as Root](#dont-run-as-root) +- [Specify a User](#specify-a-user) +- [Limit Capabilities](#limit-capabilities) +- [Prevent new Privilages being Added](#prevent-new-privilages-being-added) +- [Disable Inter-Container Communication](#disable-inter-container-communication) +- [Don't Expose the Docker Daemon Socket](#dont-expose-the-docker-daemon-socket) +- [Use Read-Only Volumes](#use-read-only-volumes) +- [Set the Logging Level](#set-the-logging-level) +- [Verify Image before Pulling](#verify-image-before-pulling) +- [Specify the Tag](#specify-the-tag) +- [Container Security Scanning](#container-security-scanning) +- [Registry Security](#registry-security) +- [Security Modules](#security-modules) + ### Keep Docker Up-To-Date To prevent known container escape vulnerabilities, which typically end in escalating to root/administrator privileges, patching Docker Engine and Docker Machine is crucial. For more info, see the [Docker Installation Docs](https://docs.docker.com/engine/install/). @@ -392,6 +411,174 @@ Docker supports several modules that let you write your own security profiles. [Seccomp](https://en.wikipedia.org/wiki/Seccomp) (Secure Computing Mode) is a sandboxing facility in the Linux kernel that acts like a firewall for system calls (syscalls). It uses Berkeley Packet Filter (BPF) rules to filter syscalls and control how they are handled. These filters can significantly limit a containers access to the Docker Host’s Linux kernel - especially for simple containers/applications. It requires a Linux-based Docker host, with secomp enabled, and you can check for this by running `docker info | grep seccomp`. A great resource for learning more about this is [DockerLabs](https://training.play-with-docker.com/security-seccomp/). +**[⬆️ Back to Top](#management)** + +--- + +## Remote Access + +- [WireGuard](#wireguard) +- [Reverse SSH Tunnel](#reverse-ssh-tunnel) + +### WireGuard + +Using a VPN is one of the easiest ways to provide secure, full access to your local network from remote locations. [WireGuard](https://www.wireguard.com/) is a reasonably new open source VPN protocol, that was designed with ease of use, performance and security in mind. Unlike OpenVPN, it doesn't need to recreate the tunnel whenever connection is dropped, and it's also much easier to setup, using shared keys instead. + +- **Install Wireguard** - See the [Install Docs](https://www.wireguard.com/install/) for download links + instructions + - On Debian-based systems, it's `sudo apt install wireguard` +- **Generate a Private Key** - Run `wg genkey` on the Wireguard server, and copy it to somewhere safe for later +- **Create Server Config** - Open or create a file at `/etc/wireguard/wg0.conf` and under `[Interface]` add the following (see example below): + - `Address` - as a subnet of all desired IPs + - `PrivateKey` - that you just generated + - `ListenPort` - Default is `51820`, but can be anything +- **Get Client App** - Download the [WG client app](https://www.wireguard.com/install/) for your platform (Linux, Windows, MacOS, Android or iOS are all supported) +- **Create new Client Tunnel** - On your client app, there should be an option to create a new tunnel, when doing so a client private key will be generated (but if not, use the `wg genkey` command again), and keep it somewhere safe. A public key will also be generated, and this will go in our saver config +- **Add Clients to Server Config** - Head back to your `wg0.conf` file on the server, create a `[Peer]` section, and populate the following info + - `AllowedIPs` - List of IP address inside the subnet, the client should have access to + - `PublicKey` - The public key for the client you just generated +- **Start the Server** - You can now start the WG server, using: `wg-quick up wg0` on your server +- **Finish Client Setup** - Head back to your client device, and edit the config file, leave the private key as is, and add the following fields: + - `PublicKey` - The public key of the server + - `Address` - This should match the `AllowedIPs` section on the servers config file + - `DNS` - The DNS server that'll be used when accessing the network through the VPN + - `Endpoint` - The hostname or IP + Port where your WG server is running (you may need to forward this in your firewall's settings) +- **Done** - Your clients should now be able to connect to your WG server :) Depending on your networks firewall rules, you may need to port forward the address of your WG server + +**Example Server Config** + +```ini +# Server file +[Interface] +# Which networks does my interface belong to? Notice: /24 and /64 +Address = 10.5.0.1/24, 2001:470:xxxx:xxxx::1/64 +PrivateKey = xxx +ListenPort = 51820 + +# Peer 1 +[Peer] +PublicKey = xxx +# Which source IPs can I expect from that peer? Notice: /32 and /128 +AllowedIps = 10.5.0.35/32, 2001:470:xxxx:xxxx::746f:786f/128 + +# Peer 2 +[Peer] +PublicKey = xxx +# Which source IPs can I expect from that peer? This one has a LAN which can +# access hosts/jails without NAT. +# Peer 2 has a single IP address inside the VPN: it's 10.5.0.25/32 +AllowedIps = 10.5.0.25/32,10.21.10.0/24,10.21.20.0/24,10.21.30.0/24,10.31.0.0/24,2001:470:xxxx:xxxx::ca:571e/128 +``` + +**Example Client Config** + +```ini +[Interface] +# Which networks does my interface belong to? Notice: /24 and /64 +Address = 10.5.0.35/24, 2001:470:xxxx:xxxx::746f:786f/64 +PrivateKey = xxx + +# Server +[Peer] +PublicKey = xxx +# I want to route everything through the server, both IPv4 and IPv6. All IPs are +# thus available through the Server, and I can expect packets from any IP to +# come from that peer. +AllowedIPs = 0.0.0.0/0, ::0/0 +# Where is the server on the internet? This is a public address. The port +# (:51820) is the same as ListenPort in the [Interface] of the Server file above +Endpoint = 1.2.3.4:51820 +# Usually, clients are behind NAT. to keep the connection running, keep alive. +PersistentKeepalive = 15 +``` + + +A useful tool for getting WG setup is [Algo](https://github.com/trailofbits/algo). It includes scripts and docs which cover almost all devices, platforms and clients, and has best practices implemented, and security features enabled. All of this is better explained in [this blog post](https://blog.trailofbits.com/2016/12/12/meet-algo-the-vpn-that-works/). + + +### Reverse SSH Tunnel + +SSH (or [Secure Shell](https://en.wikipedia.org/wiki/Secure_Shell)) is a secure tunnel that allows you to connect to a remote host. Unlike the VPN methods, an SSH connection does not require an intermediary, and will not be affected by your IP changing. However it only allows you to access a single service at a time. SSH was really designed for terminal access, but because of the latter mentioned benefits it's useful to setup, as a fallback option. + +Directly SSH'ing into your home, would require you to open a port (usually 22), which would be terrible for security, and is not recommended. However a reverse SSH connection is initiated from inside your network. Once the connection is established, the port is redirected, allowing you to use the established connection to SSH into your home network. + +The issue you've probably spotted, is that most public, corporate, and institutional networks will block SSH connections. To overcome this, you'd have to establish a server outside of your homelab that your homelab's device could SSH into to establish the reverse SSH connection. You can then connect to that remote server (the _mothership_), which in turn connects to your home network. + +Now all of this is starting to sound like quite a lot of work, but this is where services like [remot3.it](https://remote.it/) come in. They maintain the intermediary mothership server, and create the tunnel service for you. It's free for personal use, secure and easy. There are several similar services, such as [RemoteIoT](https://remoteiot.com/), or you could create your own on a cloud VPS (see [this tutorial](https://gist.github.com/nileshtrivedi/4c615e8d3c1bf053b0d31176b9e69e42) for more info on that). + +Before getting started, you'll need to head over to [Remote.it](https://app.remote.it/auth/#/sign-up) and create an account. + +Then setup your local device: +1. If you haven't already done so, you'll need to enable and configure SSH. + - This is out-of-scope of this article, but I've explained it in detail in [this post](https://notes.aliciasykes.com/22798/my-server-setup#configure-ssh). +2. Download the Remote.it install script from their [GitHub](https://github.com/remoteit/installer) + - `curl -LkO https://raw.githubusercontent.com/remoteit/installer/master/scripts/auto-install.sh` +3. Make it executable, with `chmod +x ./auto-install.sh`, and then run it with `sudo ./auto-install.sh` +4. Finally, configure your device, by running `sudo connectd_installer` and following the on-screen instructions + +And when you're ready to connect to it: +1. Login to [app.remote.it](https://app.remote.it/), and select the name of your device +2. You should see a list of running services, click SSH +3. You'll then be presented with some SSH credentials that you can now use to securely connect to your home, via the Remote.it servers + +Done :) + +**[⬆️ Back to Top](#management)** + +--- + +## Custom Domain + +- [Using DNS](#using-nginx) +- [Using NGINX](#using-dns) + +### Using DNS +For locally running services, a domain can be set up directly in the DNS records. This method is really quick and easy, and doesn't require you to purchase an actual domain. Just update your networks DNS resolver, to point your desired URL to the local IP where Dashy (or any other app) is running. For example, a line in your hosts file might look something like: `192.168.0.2 dashy.homelab.local`. + +If you're using Pi-Hole, a similar thing can be done in the `/etc/dnsmasq.d/03-custom-dns.conf` file, add a line like: `address=/dashy.example.com/192.168.2.0` for each of your services. + +If you're running OPNSense/ PfSense, then this can be done through the UI with Unbound, it's explained nicely in [this article](https://homenetworkguy.com/how-to/use-custom-domain-name-in-internal-network/), by Dustin Casto. + +### Using NGINX +If you're using NGINX, then you can use your own domain name, with a config similar to the below example. + +``` +upstream dashy { + server 127.0.0.1:32400; +} + +server { + listen 80; + server_name dashy.mydomain.com; + + # Setup SSL + ssl_certificate /var/www/mydomain/sslcert.pem; + ssl_certificate_key /var/www/mydomain/sslkey.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; + ssl_session_timeout 5m; + ssl_prefer_server_ciphers on; + + location / { + proxy_pass http://dashy; + proxy_redirect off; + proxy_buffering off; + proxy_set_header host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; + } +} +``` +Similarly, a basic `Caddyfile` might look like: + +``` +dashy.example.com { + reverse_proxy / nginx:80 +} +``` + +For more info, [this guide](https://thehomelab.wiki/books/dns-reverse-proxy/page/create-domain-records-to-point-to-your-home-server-on-cloudflare-using-nginx-progy-manager) on Setting up Domains with NGINX Proxy Manager and CloudFlare may be useful. + **[⬆️ Back to Top](#management)** --- @@ -411,6 +598,11 @@ Note, that if you choose not to use `server.js` to serve up the app, you will lo - Writing config file to disk from the UI - Website status indicators, and ping checks +Example Configs +- [NGINX](#nginx) +- [Apache](#apache) +- [cPanel](#cpanel) + ### NGINX Create a new file in `/etc/nginx/sites-enabled/dashy` @@ -475,9 +667,17 @@ Then restart Apache, with `sudo systemctl restart apache2` If you'd like to make any code changes to the app, and deploy your modified version, this section briefly explains how. -The first step is to fork the project on GitHub, and clone it to your local system. Next, install the dependencies (`yarn`), and start the development server (`yarn dev`) and visit `localhost:8080` in your browser. You can then make changes to the codebase, and see the live app update in real-time. Once you've finished, running `yarn build` will build the app for production, and output the assets into `./dist` which can then be deployed using a web server, CDN or the built-in Node server with `yarn start`. For more info on all of this, take a look at the [Developing Docs](/docs/developing.md). +The first step is to fork the project on GitHub, and clone it to your local system. Next, install the dependencies (`yarn`), and start the development server (`yarn dev`) and visit `localhost:8080` in your browser. You can then make changes to the codebase, and see the live app update in real-time. Once you've finished, running `yarn build` will build the app for production, and output the assets into `./dist` which can then be deployed using a web server, CDN or the built-in Node server with `yarn start`. For more info on all of this, take a look at the [Developing Docs](/docs/developing.md). To build your own Docker container from the modified app, see [Building your Own Container](#building-your-own-container) + +**[⬆️ Back to Top](#management)** + +--- -You probably want to deploy your app with Docker, and this can be done as follows: +## Building your Own Container + +Similar to above, you'll first need to fork and clone Dashy to your local system, and then install dependencies. + +Then, either use Dashy's default [`Dockerfile`](https://github.com/Lissy93/dashy/blob/master/Dockerfile) as is, or modify it according to your needs. To build and deploy locally, first build the app with: `docker build -t dashy .`, and then start the app with `docker run -p 8080:80 --name my-dashboard dashy`. Or modify the `docker-compose.yml` file, replacing `image: lissy93/dashy` with `build: .` and run `docker compose up`. @@ -487,3 +687,5 @@ You may wish to upload your image to a container registry for easier access. Not You can push your build image, by running: `docker push ghcr.io/OWNER/IMAGE_NAME:latest`. You will first need to authenticate, this can be done by running `echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin`, where `CR_PAT` is an environmental variable containing a token generated from your GitHub account. For more info, see the [Container Registry Docs](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry). **[⬆️ Back to Top](#management)** + +--- \ No newline at end of file diff --git a/docs/quick-start.md b/docs/quick-start.md index 67f8c3f463..afa68eef1e 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -127,3 +127,15 @@ Don't have a server? No problem! You can run Dashy for free on Netlify (as well 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 + +--- + +## Alternative Deployment Method 3 - Cloud Services + +Dashy supports 1-Click deployments on several popular cloud platforms. To spin up a new instance, just click a link below: +- [ Deploy to Netlify](https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/dashy) +- [ Deploy to Heroku](https://heroku.com/deploy?template=https://github.com/Lissy93/dashy) +- [ Deploy to Vercel](https://vercel.com/new/project?template=https://github.com/lissy93/dashy) +- [ Deploy to Render](https://render.com/deploy?repo=https://github.com/lissy93/dashy/tree/deploy_render) +- [ Deploy to GCP](https://deploy.cloud.run/?git_repo=https://github.com/lissy93/dashy.git) +- [ Deploy to PWD](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml) \ No newline at end of file diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index aed8cf7f81..70c5253917 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -78,6 +78,24 @@ auth: --- +## Config Not Updating + +Dashy has the option to save settings and config locally, in browser storage. Anything here will take precedence over whatever is in your config file, sometimes with unintended consequences. If you've updated the config file manually, and are not seeing changes reflected in the UI, then try visiting the site in Incognito mode. If that works, then the solution is just to clear local storage. This can be done from the config menu, under "Clear Local Settings". + +--- + +## Config Still not Updating + +Sometimes your text editor updates files [inode](https://linuxhandbook.com/inode-linux/), meaning changes will not be picked up by the Docker container. This [article](https://medium.com/@jonsbun/why-need-to-be-careful-when-mounting-single-files-into-a-docker-container-4f929340834) explains things further. + +--- + +## Styles and Assets not Updating + +If you find that your styles and other visual assets work when visiting `ip:port` by not `dashy.domain.com`, then this is usually caused by caching. In your browser, do a hard-refresh (Ctrl + F5). If you use Cloudflare, then you can clear the cache through the management console, or set the cache level to Bypass for certain files, under the Rules tab. + +--- + ## 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. diff --git a/netlify.toml b/netlify.toml index 79c7438a73..d0b6089787 100644 --- a/netlify.toml +++ b/netlify.toml @@ -16,6 +16,12 @@ STATUSKIT_SUPPORT_CONTACT_LINK = "https://github.com/lissy93/dashy" STATUSKIT_RESOURCES_LINK = "https://dashy.to/docs" +# For router history mode, ensure pages land on index +[[redirects]] + from = "/*" + to = "/index.html" + status = 200 + # Redirect the Node endpoints to serverless functions [[redirects]] from = "/status-check" diff --git a/package.json b/package.json index 485ce0e4c3..a48dcd73d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Dashy", - "version": "1.8.8", + "version": "1.8.9", "license": "MIT", "main": "server", "scripts": { @@ -16,6 +16,7 @@ "dependency-audit": "npx improved-yarn-audit --ignore-dev-deps" }, "dependencies": { + "@formschema/native": "^2.0.0-beta.5", "@sentry/tracing": "^6.13.1", "@sentry/vue": "^6.13.1", "ajv": "^8.6.3", @@ -36,6 +37,7 @@ "vue": "^2.6.10", "vue-i18n": "^8.25.1", "vue-js-modal": "^2.0.0-rc.6", + "vue-json-tree-view": "^2.1.6", "vue-material-tabs": "0.1.5", "vue-router": "^3.0.3", "vue-select": "^3.13.0", diff --git a/services/config-validator.js b/services/config-validator.js index bc6545e3d9..b56c4d3548 100644 --- a/services/config-validator.js +++ b/services/config-validator.js @@ -19,6 +19,9 @@ const ajv = new Ajv(validatorOptions); /* Message printed when validation was successful */ const successMsg = () => '\x1b[1m\x1b[32mNo issues found, your configuration is valid :)\x1b[0m\n'; +/* Just a wrapper to system's console.log */ +const logToConsole = (msg) => { console.log(msg); }; + /* Formats error message. ready for printing to the console */ const errorMsg = (output) => { const warningFont = '\x1b[103m\x1b[34m'; @@ -46,14 +49,14 @@ const setIsValidVariable = (isValid) => { /* Start the validation */ const validate = (config) => { - console.log('\nChecking config file against schema...'); + logToConsole('\nChecking config file against schema...'); const valid = ajv.validate(schema, config); if (valid) { setIsValidVariable(true); - console.log(successMsg()); + logToConsole(successMsg()); } else { setIsValidVariable(false); - console.log(errorMsg(ajv.errors)); + logToConsole(errorMsg(ajv.errors)); } }; @@ -62,11 +65,11 @@ try { validate(config); } catch (e) { // Something went very wrong... setIsValidVariable(false); - console.log(bigError()); - console.log('Please ensure that your config file is present, ' + logToConsole(bigError()); + logToConsole('Please ensure that your config file is present, ' + 'has the correct access rights and is parsable. ' + 'If this warning persists, it may be an issue with the ' + 'validator function. Please raise an issue, and include the following stack trace:\n'); console.warn('\x1b[33mStack Trace for config-validator.js:\x1b[0m\n', e); - console.log('\n\n'); + logToConsole('\n\n'); } diff --git a/services/update-checker.js b/services/update-checker.js index 8f5038881a..5160fa7721 100644 --- a/services/update-checker.js +++ b/services/update-checker.js @@ -4,6 +4,10 @@ const currentVersion = require('../package.json').version; const packageUrl = 'https://raw.githubusercontent.com/Lissy93/dashy/master/package.json'; +const logToConsole = (msg) => { + console.log(msg); // eslint-disable-line no-console +}; + const makeMsg = (latestVersion) => { const parse = (version) => parseInt(version.replace(/\./g, ''), 10); const difference = parse(latestVersion) - parse(currentVersion); @@ -20,9 +24,9 @@ const makeMsg = (latestVersion) => { axios.get(packageUrl).then((response) => { if (response && response.data && response.data.version) { - console.log(`\nUsing Dashy V-${currentVersion}. Update Check Complete`); - console.log(makeMsg(response.data.version)); + logToConsole(`\nUsing Dashy V-${currentVersion}. Update Check Complete`); + logToConsole(makeMsg(response.data.version)); } }).catch(() => { - console.log('Unable to check for updates'); + logToConsole('Unable to check for updates'); }); diff --git a/src/App.vue b/src/App.vue index d9619e04b9..d1f0e76149 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,6 @@