Skip to content

Commit

Permalink
🔀 Merge pull request #326 from Lissy93/PERFORMANCE/server-speed-impro…
Browse files Browse the repository at this point in the history
…vments

[ARCHITECTURE] Performance and Speed Improvements
  • Loading branch information
Lissy93 committed Nov 10, 2021
2 parents 2543a89 + b0e6eff commit a88e899
Show file tree
Hide file tree
Showing 37 changed files with 973 additions and 894 deletions.
9 changes: 8 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@
# The port to expose the running application on
# PORT=4000

# If you've proved SSL certs, then can set HTTPS port
# SSL_PORT=4001

# The host that Dashy is running on, domain or IP
# HOST=localhost

# The default base path for serving up static assets
# BASE_URL=./

# Optionally, specify the path of SSL private + public keys
# SSL_PRIV_KEY_PATH=/etc/ssl/certs/dashy-priv.key
# SSL_PUB_KEY_PATH=/etc/ssl/certs/dashy-pub.pem

# Usually the same as BASE_URL, but accessible in frontend
# VUE_APP_DOMAIN=https://dashy.to

Expand All @@ -23,4 +30,4 @@
# IS_DOCKER=true

# Again, set automatically using package.json during build time
# VUE_APP_VERSION=1.7.0
# VUE_APP_VERSION=2.0.0
7 changes: 7 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## ⚡️ 1.9.2 - Native SSL Support + Performance Improvements [PR #326](https://github.com/Lissy93/dashy/pull/326)
- Updates the server to use Express, removing serve-static, connect and body-parser
- Adds native support for passing in self-signed SSL certificates and updates docs
- Updates router to lazy-load additional pages (minimal, workspace, etc)
- Changes default favicon API to allesedv, since faviconkit is down, and adds basic fallback
- Updates GH action build scripts to fallback on context token when running on fork

## 💄 1.9.1 - Editor and Theming Fixes and Improvements [PR #319](https://github.com/Lissy93/dashy/pull/319)
- Bug fixes for interactive editor: #310, #311, #312
- Adds option to modify text font through the UI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apply-done-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
steps:
- uses: logerfo/close-label@0.0.4
with:
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/assign-reviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
- name: Assign author
uses: technote-space/assign-author@v1
with:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/auto-rebase-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Rebase
uses: cirrus-actions/rebase@1.4
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/auto-tag-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v2
- uses: butlerlogic/action-autotag@stable
with:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
strategy: package
commit_message_template: "🔖 {{number}} {{message}} (by {{author}})\nSHA: {{sha}}\n."
mark-issue-fixed:
Expand All @@ -22,5 +22,5 @@ jobs:
- name: Label Fixed Issues
uses: gh-bot/fix-labeler@master
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
label: '✅ Fixed'
2 changes: 1 addition & 1 deletion .github/workflows/broadcast-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
steps:
- uses: jenschelkopf/broadcast-action@master
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.4
if: ${{ github.repository_owner === 'lissy93' }}
with:
branch: dev-demo
folder: dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-duplicate-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: wow-actions/potential-duplicates@v1
with:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
filter: ''
exclude: '[BUG] [QUESTION] [FEEDBACK] [SHOWCASE]'
label: '🕸️ Potential Duplicate'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-merge-conflicts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
- uses: mschilde/auto-label-merge-conflicts@master
with:
CONFLICT_LABEL_NAME: "🚫 Merge Conflicts"
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
MAX_RETRIES: 5
WAIT_MS: 5000
2 changes: 1 addition & 1 deletion .github/workflows/close-incomplete-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Automatically close issues that don't follow the issue template
uses: lucasbento/auto-close-issues@v1.0.2
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
github-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
closed-issues-label: '🙁 Auto-Closed'
issue-close-message: |
Hello @${issue.user.login} 👋
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Close Stale Issues
uses: actions/stale@v4
with:
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 5
operations-per-run: 30
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Close Issues without Response
uses: actions/stale@v4
with:
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
days-before-stale: 5
days-before-close: 3
operations-per-run: 30
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Notify Repo Owner to Respond
uses: actions/stale@v4
with:
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
days-before-stale: 7
days-before-close: 365
operations-per-run: 30
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-spell-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: peter-evans/create-pull-request@v3.10.1
if: startsWith(github.head_ref, 'AUTO/') == false
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
base: master
commit-message: ':pencil2: Auto-fix typos in text'
title: '[AUTO] Fix spelling and language'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/domain-expirey-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
if: ${{ steps.check-domain.outputs.paid-till-days-left && steps.check-domain.outputs.paid-till-days-left < 30 }}
uses: rishabhgupta/git-action-issue@v2
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
assignees: Lissy93
title: '[WEBSITE] Domain Expiring Soon'
body: >
Expand All @@ -33,7 +33,7 @@ jobs:
if: ${{ steps.check-domain.outputs.ssl-expire-days-left && steps.check-domain.outputs.ssl-expire-days-left < 14 }}
uses: rishabhgupta/git-action-issue@v2
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
assignees: Lissy93
title: '[WEBSITE] SSL Cert Expiring Soon'
body: >
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/generate-credits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: bubkoo/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
svgPath: docs/assets/CONTRIBUTORS.svg
affiliation: all
includeBots: false
Expand All @@ -30,12 +30,12 @@ jobs:
- name: Generate Sponsors in Readme 💖
uses: JamesIves/github-sponsors-readme-action@1.0.5
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
file: 'README.md'
- name: Generate Sponsors in Credits 💖
uses: JamesIves/github-sponsors-readme-action@1.0.5
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
file: 'docs/credits.md'
# Job #3 - Update the Credits page
insert-credits:
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Contribute List - Credits Page
uses: akhilmhdh/contributors-readme-action@v2.2
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
with:
image_size: 80
readme_path: docs/credits.md
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Sponsors List - Readme
uses: akhilmhdh/contributors-readme-action@v2.2
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
with:
image_size: 80
readme_path: README.md
Expand All @@ -74,7 +74,7 @@ jobs:
fetch-depth: 0
- uses: wow-actions/update-authors@v1
with:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
sort: commits
bots: true
path: .github/AUTHORS.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-spam-control.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: close
uses: uhyo/please-star-first@v1
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
message: |
Welcome to Dashy 👋
It's great to have you here, but unfortunately your ticket has been closed to prevent spam. Before reopening this issue, please ensure the following criteria are met.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-translator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: tomsun28/issues-translate-action@v2.5
with:
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
BOT_LOGIN_NAME: liss-bot
IS_MODIFY_TITLE: true
CUSTOM_BOT_NOTE: It looks like this issue isn't in English - not a problem, here's the translation! 🇬🇧
2 changes: 1 addition & 1 deletion .github/workflows/label-top-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Label Issues
uses: adamzolyak/top-issues-action@master
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
TOP_NUMBER_OF_ISSUES: 10
TOP_LABEL_NAME: "👍 Top 10 Issue!"
TOP_LABEL_COLOR: FBCA04
2 changes: 1 addition & 1 deletion .github/workflows/manage-pending-labels-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
uses: actions-cool/issues-helper@v2
with:
actions: remove-labels
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
labels: '🚏 Awaiting User Response,⚰️ Stale,👤 Awaiting Maintainer Response'
6 changes: 3 additions & 3 deletions .github/workflows/manage-pending-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions-cool/issues-helper@v2
with:
actions: remove-labels
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
labels: '🚏 Awaiting User Response,⚰️ Stale'

Expand All @@ -31,7 +31,7 @@ jobs:
uses: actions-cool/issues-helper@v2
with:
actions: add-labels
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
labels: '👤 Awaiting Maintainer Response'

Expand All @@ -43,6 +43,6 @@ jobs:
uses: actions-cool/issues-helper@v2
with:
actions: remove-labels
token: ${{ secrets.BOT_GITHUB_TOKEN }}
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
labels: '👤 Awaiting Maintainer Response'
2 changes: 1 addition & 1 deletion .github/workflows/mind-your-language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
- name: Profanity check step
uses: tailaiw/mind-your-language-action@v1.0.3
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/pr-labler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
if: github.event.action == 'opened'
uses: ffittschen/pr-branch-labeler@v1
with:
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/raise-issue-from-todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
uses: "alstr/todo-to-issue-action@v4.2"
id: "todo"
with:
TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release-commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: apexskier/github-release-commenter@v1
with:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
label-template: 🛩️ Released {release_tag}, 🔨 Fixed
comment-template: |
**The fix for this issue has now been released in {release_name} ✨**
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/repo-visualization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: lowlighter/metrics@latest
with:
token: ${{ secrets.LISSY93_PAT }}
committer_token: ${{ secrets.BOT_GITHUB_TOKEN }}
committer_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
committer_branch: master
committer_message: ':purple_heart: Adds repo metrics'
filename: docs/assets/repo-metrics.*
Expand All @@ -59,7 +59,7 @@ jobs:
uses: lowlighter/metrics@latest
with:
token: ${{ secrets.LISSY93_PAT }}
committer_token: ${{ secrets.BOT_GITHUB_TOKEN }}
committer_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
committer_branch: master
committer_message: ':purple_heart: Adds license metrics'
filename: docs/assets/license-metrics.*
Expand All @@ -76,7 +76,7 @@ jobs:
uses: lowlighter/metrics@latest
with:
token: ${{ secrets.LISSY93_PAT }}
committer_token: ${{ secrets.BOT_GITHUB_TOKEN }}
committer_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
committer_branch: master
committer_message: ':purple_heart: Adds contributor metrics'
filename: docs/assets/controbutor-metrics.*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/save-repo-analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
with:
repository: lissy93/dashy
databranch: DATA/repo-stats
ghtoken: ${{ secrets.BOT_GITHUB_TOKEN }}
ghtoken: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/wiki-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Upload Docs to GH Wiki
uses: docker://decathlon/wiki-page-creator-action:latest
env:
GH_PAT: ${{ secrets.BOT_GITHUB_TOKEN }}
GH_PAT: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
ACTION_MAIL: alicia-gh-bot@mail.as93.net
ACTION_NAME: liss-bot
OWNER: Lissy93
Expand Down
10 changes: 5 additions & 5 deletions docs/icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ Dashy can auto-fetch an icon for a given service, using it's favicon. Just set `

If the service is hosted under a local IP, then Dashy will attempt to find the favicon from `http://[ip]/favicon.ico`. This has two issues, favicons are not always hosted at the same location for every service, and often the default favicon is sometimes low resolution. Therefore for remote services, by default an API is used to return a high-quality icon for almost any online service.

The default favicon API is [Favicon Kit](https://faviconkit.com/), a free and reliable service for returning images from any given URL. However several other API's are supported. To change the API used, under `appConfig`, set `faviconApi` to one of the following values:
The default favicon API is [allesedv.com](https://favicon.allesedv.com/), but several other API's are supported. To change the API used, under `appConfig`, set `faviconApi` to one of the following values:

- `faviconkit` - [faviconkit.com](https://faviconkit.com/) (Recommend)
- `google` - Official Google favicon API service, good support for all sites, but poor quality
- `allesedv` - [allesedv.com](https://favicon.allesedv.com/) is a highly efficient IPv6-enabled service
- `faviconkit` - [faviconkit.com](https://faviconkit.com/) (Note: currently down, as of Nov 2021)
- `clearbit` - [Clearbit](https://clearbit.com/logo) returns high-quality logos from mainstream websites
- `google` - Official Google favicon API service, good support for all sites, but poor quality
- `webmasterapi` - [WebMasterAPI](https://www.webmasterapi.com/get-favicons)
- `allesedv` - [allesedv.com](https://favicon.allesedv.com/) is a highly efficient IPv6-enabled service

You can also force Dashy to always get favicons from the root of the domain, and not use an external service, by setting `appConfig.faviconApi` to `local`, although you may face the issue explained above.

Expand Down Expand Up @@ -80,7 +80,7 @@ sections:
---
## Generative Icons
To uses a unique and programmatically generated icon for a given service just set `icon: generative`. This is particularly useful when you have a lot of similar services with a different IP or port, and no specific icon. These icons are generated with [DiceBear](https://avatars.dicebear.com/), and use a hash of the services domain/ ip for entropy, so each domain will always have the same icon.
To uses a unique and programmatically generated icon for a given service just set `icon: generative`. This is particularly useful when you have a lot of similar services with a different IP or port, and no specific icon. These icons are generated with [DiceBear](https://avatars.dicebear.com/) (or [Evatar](https://evatar.io/) for fallback), and use a hash of the services domain/ ip for entropy, so each domain will have a unique icon.

<p align="center">
<img width="500" src="https://i.ibb.co/b2pC2CL/generative-icons-2.png" />
Expand Down
Loading

0 comments on commit a88e899

Please sign in to comment.