Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Deploying with prebuilt config #111

Closed
mfitzgerald2 opened this issue Aug 1, 2021 · 7 comments
Closed

[QUESTION] Deploying with prebuilt config #111

mfitzgerald2 opened this issue Aug 1, 2021 · 7 comments
Assignees
Labels
🤷‍♂️ Question [ISSUE] Further information is requested

Comments

@mfitzgerald2
Copy link

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!

@mfitzgerald2 mfitzgerald2 added the 🤷‍♂️ Question [ISSUE] Further information is requested label Aug 1, 2021
@Lissy93
Copy link
Owner

Lissy93 commented Aug 1, 2021

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:

  • Option 1: The easiest method of deployment is always going to be to use Docker. It also gives you access to automatic rebuilds, and everything just works perfectly out of the box, as the environment provided by the Docker container is pre-configured.
  • Option 2: Run Dashy using the included Node.js server
  • Option 3: If neither of these is an option for you, and you need to regularly make changes to your config, then another approach would be to put the entire Dashy directory on your server, and point your web server to serve up ./dist folder- that way you can make changes to the config, run yarn build and have the dist directory updates.

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
Copy link
Author

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
Copy link
Owner

Lissy93 commented Aug 2, 2021

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
Copy link
Author

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

@Lissy93
Copy link
Owner

Lissy93 commented Aug 4, 2021

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?

  • What system that you are trying to run Dashy on (Win, Mac, Linux)
  • What web server that you are using?
  • Are you serving Dashy up from ./dist, right?
  • Anything else that you did?

@mfitzgerald2
Copy link
Author

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

@Lissy93
Copy link
Owner

Lissy93 commented Aug 4, 2021

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 :)

asterling8516 pushed a commit to asterling8516/dashy that referenced this issue Nov 23, 2023
Closes Lissy93#111

Signed-off-by: Bjorn Lammers <walkxnl@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷‍♂️ Question [ISSUE] Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants