Open machib77 opened 1 year ago
Hi,
Kind of late to respond, but this is the expectted behavior. When DEBUG=False
, Django does not serve static and media files. One possible way is to create staticfiles
and mediafiles
volumes inside Docker.
You can learn more about them in this tutorial: Dockerizing Django with Postgres, Gunicorn, and Nginx
After changing to "DJANGO_DEBUG=False" on the new file docker-compose-prod.yml, I spin down the Docker container and start it up again as instructed, and the page http://127.0.0.1:8000/debug behaves as expected, but the rest of the existing pages show problems:
Images won't load and on the books page the list looks cut off.