ytsm icon indicating copy to clipboard operation
ytsm copied to clipboard

Missing JS and CSS files

Open darth2499 opened this issue 3 years ago • 3 comments

Hello,

I am running YTSM on an Unraid Docker. I understand you need to map some sort of static folder to get the JS and CSS to download properly, but the documentation is not very clear so I am having trouble trying to get this project running.

Currently, when I go to the website it looks like this. broken css

In the log you can clearly see the missing files. log

How would I go to properly map the folder so I can let these static files download? unraid

Thank you!

darth2499 avatar Aug 07 '20 03:08 darth2499

I also attempted to put symlinks to /static wherever I though the docker container was serving the app. Here is a screenshot of where I put static symlinks.

symlinks

DrDevinRX avatar Aug 07 '20 03:08 DrDevinRX

This is due to how django works. There are basically 2 options:

  • running django in debug mode (by setting the debug variable to true). This is the simplest solution, but not ideal for a production environment.

  • serving the static files using nginx/apache or some other web server. First, you need to run manage.py collectstatic, and then configure the web server to serve these files under /static.

Because this is a recurring issue, I will fix the docker image so it includes a web server like nginx.

chibicitiberiu avatar Aug 07 '20 08:08 chibicitiberiu

Thanks for the reply,

I have been running django in debug mode by setting the variable to True in the config.ini. This doesn't seem to make any difference. I am looking forward to the docker image with the Nginx web server and will let you know if that solves the issue.

darth2499 avatar Aug 07 '20 18:08 darth2499