Skip to content

Staticfiles on Heroku #673

Description

@sidkoul

Deploying to Heroku fails due to collectstatic stack dumping. Research how to configure STATIC_ROOT for production on Heroku.

https://devcenter.heroku.com/articles/django-app-configuration#static-assets-and-file-serving

$ python gobotany/manage.py collectstatic --noinput        
 Traceback (most recent call last):        
   File "gobotany/manage.py", line 10, in <module>        
...
  File "/app/.heroku/python/lib/python2.7/site-packages/django/contrib
      /staticfiles/storage.py", line 49, in path        
  raise ImproperlyConfigured("You're using the staticfiles app "        
  django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having 
  set the STATIC_ROOT setting to a filesystem path.
   Error while running '$ python gobotany/manage.py collectstatic --noinput'.
 See traceback above for details.
 You may need to update application code to resolve this error.
 Or, you can disable collectstatic for this application:

   $ heroku config:set DISABLE_COLLECTSTATIC=1

 https://devcenter.heroku.com/articles/django-assets
 Push rejected, failed to compile Python app.

! Push failed

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions