-
Notifications
You must be signed in to change notification settings - Fork 888
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
Media isn't working locally when DEBUG is turned off #151
Comments
I observed same thing- with debug off, media URLs are broken |
Can someone help me with this? |
bump... |
What I know is that static assets are not processed when django sets debug to false |
It’s the expected behavior, serving assets is a convenience feature for local development. With DEBUG disabled, you’re responsible for serving the media files. Performance-wise, it does not make sense to use the GraphQL server to serve static assets. Please use Nginx, CloudFront, or any other CDN. |
Sorry, I just realized it’s about the platform repository. This is in fact unexpected and something we need to fix. |
Is there a plan to fix this issue from over a year ago or is it still recommended to host this externally? |
How do I configure the saleor locally when DEBUG is off?
I made the following changes,
Generated and added secret_key and RSA_key in backend.env
Added the following variables to the API service
Outcome:
localhost:8000 stopped working, while localhost:8000/graphql is working fine.
Unable to see the media uploaded as a path to the media upload is localhost:8000
I have set up a saleor using the steps mentioned here -> https://saleor.io/open-source/
Kindly advise to make it work with docker-compose and DEBUG off.
Saleor version -> 3.2.0
The text was updated successfully, but these errors were encountered: