Coder Social home page Coder Social logo

Comments (3)

nickjj avatar nickjj commented on May 24, 2024 1

Ah I know what happened.

If you're going to set DEBUG=false you also need to set NODE_ENV=production. If you don't set node to production then Django's collectstatic won't find any assets since they won't get generated by Webpack and when you visit the home page you'll get a 500 which throws ValueError: Missing staticfiles manifest entry for 'css/app.css' because our template references that file.

You can find the real cause of the 500 with DEBUG=false if you goto the settings and put DEBUG_PROPAGATE_EXCEPTIONS = True.

To properly emulate production on a real server you'll want to run:

  • ./run clean
  • In the .env file comment out export DOCKER_WEB_VOLUME=.:/app
  • Rename docker-compose.override.yml to docker-compose.override.yml.bak (disable the Webpack watcher)
  • docker-compose down -v --remove-orphans
  • docker-compose build
  • docker-compose up

Now it should work.

It's really important to run the build command because that's going to ensure collectstatic gets run.

from docker-django-example.

nickjj avatar nickjj commented on May 24, 2024 1

I'm going to close this one since the above is very likely the case. Feel free to re-open it if it's not.

from docker-django-example.

nickjj avatar nickjj commented on May 24, 2024

Hi,

After setting that value did you run a docker-compose build before upping it?

from docker-django-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.