Static files not working
This is related to a Django problem where Railway isn't collecting my static files on deployment, i know this is a common problem with Dajngo and is usually an easy fix but tried everything.
I using Whitenoise to serve them, it's installed, doubled checked. Static settings are pointing towards where they should...project structure is ..foo/static
In my settings...
I'm running collect static at build, files are in repo.
I realise this code be an issue with my code and unrelated to Railway, but i've checked everything.
id - 175edb31-fcdb-4550-a1d8-3f56f4ed6301
4 Replies
Project ID:
175edb31-fcdb-4550-a1d8-3f56f4ed6301
To add this is whatt i get in logs ....
0 static files copied to '/app/static'.
and i'm getting a 500 (Internal Server Error) when i try to connect to siteIt seems like your static files are being collected to the
/app/static
directory, but your settings are configured to use a different directory (os.path.join(BASE_DIR, "static")
).
Update your STATIC_ROOT
to match the directory where your static files are collected:
Tried, no luck, really lost on this. I'm pretty sure this is probably down to my codebase but i'm triple checking things my end again/
Ok, I knew it was down to me :)....i had a redundant .dockerignore file in my project which incuded /static/. After a few hours of head bashing I found it. Although i have another issue that can wait until tomorrow 🙂