heroku-python / conda-buildpack

[DEPRECATED] Buildpack for Conda.
MIT License
157 stars 251 forks source link

Not compatible with whitenoise? #22

Closed davesque closed 8 years ago

davesque commented 8 years ago

I recently switched to using the conda buildpack and now my app no longer serves static files correctly (404 responses for static assets). I'm using whitenoise to serve static files. Any ideas about how I could troubleshoot this?

kennethreitz commented 8 years ago

This buildpack doesn't run collectstatic automatically for you.

davesque commented 8 years ago

I tried running collectstatic and it made no difference.

kennethreitz commented 8 years ago

How did you run it?

davesque commented 8 years ago

heroku run python manage.py collectstatic

kennethreitz commented 8 years ago

You need to add that as a part of your Procfile, unfortunately.

web: python manage.py collectstatic; mywebserver
davesque commented 8 years ago

Cool. That worked.

I actually had to use web: python manage.py collectstatic --noinput; webservercmd.

Are there any special considerations when using this approach or is it pretty standard to put collectstatic in the Procfile?

kennethreitz commented 8 years ago

No special considerations. It's pretty standard, as your web process requires that collectstatic be run before starting up. Ideally, this would happen in the buildpack (like it is in the Python buildpack), but this buildpack is far less fancy.

davesque commented 8 years ago

Cool, thx!