Command heroku run python manage.py collectstatic returns me something like
163 static files copied to '/app/live-static-files/static-root',
509 post-processed.
Here are my settings:
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware', # White Noise
'django.contrib.sessions.middleware.SessionMiddleware',
...
]
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "live-static-files", "static-root")
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
MEDIA_URL = "/media/"
MEDIA_ROOT = os.path.join(BASE_DIR, "live-static-files", "media-root")
DISABLE_COLLECTSTATIC = 0
Through heroku run bash i go /app/live-static-files/static-root and see it's empty (the folder exists as it's in repo with .gitkeep) and server gives 500 error on all requests.
Now with heroku run bash i try python manage.py collectstatic and it works! But after heroku restart it's empty again.
Why Heroku tell that it copied statics, even tell the right path of the statics folder but in fact doesn't do that? Why it actually doesn't do that?