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

Missing JS and CSS files #93

Open
darth2499 opened this issue Aug 7, 2020 · 3 comments
Open

Missing JS and CSS files #93

darth2499 opened this issue Aug 7, 2020 · 3 comments

Comments

@darth2499
Copy link

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!

@DrDevinRX
Copy link

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

@chibicitiberiu
Copy link
Owner

chibicitiberiu commented Aug 7, 2020

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.

@darth2499
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants