Open g-londhe opened 2 years ago
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