Lissy93 / dashy

🚀 A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
https://dashy.to
MIT License
18.19k stars 1.37k forks source link

[QUESTION] Deploying with prebuilt config #111

Closed mfitzgerald2 closed 3 years ago

mfitzgerald2 commented 3 years ago

Hello!

I am trying to deploy the software via copying the dist folder over to my web host after building with yarn build and it works, just not reading in the configuration file, and all updates trigger a 404, it is just showing the default startup header with 4 links. Is there any way for me to solve this?

Thank you!

Lissy93 commented 3 years ago

Hi @mfitzgerald2 - thanks for your question :)

Could you clarify weather it works prior to updating your config file?

In terms of making updates to the compiled app, and changes not showing up when you're hosting it through a CDN, this is actually the expected behavior, and stems from how the Vue CLI works. The built app is effectively just static JS, and so it needs to be re-compiled for changes to take effect. There are several ways to overcome this:

However the situation you described with just the startup page showing definitely sounds like a bug to me. Would you mind sharing the output of your browser console (Open dev tools/ F12, and go to the console tab). That'll help me determine what's causing this.

mfitzgerald2 commented 3 years ago

Thanks for the reply! Everything works fine locally.

Here is the output:

(index):1 Refused to apply style from 'https://home2.[domain].net/#' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
(index):1 Uncaught (in promise) Event
dashy.8602f152.js:1 Error during service worker registration: TypeError: Failed to register a ServiceWorker for scope ('https://home2.[domain].net/') with script ('https://home2.[domain].net/service-worker.js'): ServiceWorker script evaluation failed
error @ dashy.8602f152.js:1
(index):1 Refused to apply style from 'https://home2.[domain].net/#' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
DevTools failed to load source map: Could not load content for https://home2.[domain].net/js/dashy.8602f152.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
Lissy93 commented 3 years ago

Thanks for that info, I think I see the issue, looks like the document root is misconfigured, so all the web assets are returning a 404, so I think it's an issue on my end -I'll look into this tomorrow and see what I can do :)

mfitzgerald2 commented 3 years ago

Wonderful, let me know if you need any more information on my end!

Lissy93 commented 3 years ago

Hey @mfitzgerald2 - I've been unable to recreate this, have tried several different web servers and CDN's, and so far everything is working. Would you mind sharing a few more details around your specific setup?

mfitzgerald2 commented 3 years ago

I found my solution, it was my fault. The server I was copied /dist over to didn't have Node installed.

Lissy93 commented 3 years ago

Great, I'm glad it's working now. Thanks for letting me know, I'll take note of this incase anyone has a similar issue in the future :)