When deploying a Django app using dokku I am getting a following error
Collectstatic configuration error. To debug, run:
$ heroku run python ./manage.py collectstatic --noinput
I found no way to run heroku run python ./manage.py collectstatic --noinput
for a dokku container, but when I am trying dokku run my app python ./manage.py collectstatic --noinput
, the static files are successfully copied to the STATIC_ROOT
folder and no error message given.
I could solve the problem by placing collectstatic
command into Procfile
:
web: python manage.py collectstatic --noinput ; gunicorn myapp.wsgi
Still, I would love to know what was causing the problem and how can it be debugged. Any ideas?