Just a little note to remind myself and anyone playing around with Django on Coolify: the default Nixpacks for Django will run migrations but not collectstatic. So if you have problems with your images or CSS not appearing, the quick solution is:
- Install whitenoise
- Set
STATIC_ROOT = BASE_DIR / "staticfiles"in yoursettings.pyfile - Add a
nixpacks.tomlfile in your Django base directory that overrides the default run command and adds acollectstaticstep
[start]
cmd = "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn app.wsgi"
Then redeploy and you should have your static files display again.


Leave a Reply