Comments (3)
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 outexport DOCKER_WEB_VOLUME=.:/app
- Rename
docker-compose.override.yml
todocker-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.
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.
Hi,
After setting that value did you run a docker-compose build
before upping it?
from docker-django-example.
Related Issues (20)
- New project name psql role doesn't exist HOT 5
- ERROR: Service 'css' failed to build : COPY failed: forbidden path outside the build context: HOT 4
- Celery worker crashes HOT 2
- adding separate frontend spa (react/vue/etc) HOT 5
- Service 'worker' failed to build : Build failed HOT 2
- tailwindcss --watch is not detecting changes HOT 8
- Update README.md about need to "chown 1000 ./public*" HOT 5
- Double public and public_collected directories HOT 6
- freeze no longer used. HOT 1
- unbound variable HOT 13
- HTML templates reloading issue (TailwindCSS) HOT 31
- IPDB debugging HOT 4
- Code reloading stopped working consistently when updating HTML templates HOT 4
- docker compose build : Unable to locate package build-essential HOT 3
- update docker compose sub commands HOT 4
- Add `LOG_LEVEL` env var? HOT 3
- Updating dependencies during development HOT 2
- Any interest in adding Sentry and/or Mailhog services? HOT 4
- [Error: EACCES: permission denied, mkdir '/app/public/css'] HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-django-example.