diff --git a/Procfile b/Procfile index ce3bd000..fdab899d 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ -release: ./release.sh +release: sh ./release.sh web: gunicorn project.wsgi --log-file - diff --git a/project/settings/dev.py b/project/settings/dev.py index 8338f4fb..e3bc257f 100644 --- a/project/settings/dev.py +++ b/project/settings/dev.py @@ -124,3 +124,4 @@ STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'dist', 'static'), ] +STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') diff --git a/project/settings/prod.py b/project/settings/prod.py index bef411ee..74dbbfb2 100644 --- a/project/settings/prod.py +++ b/project/settings/prod.py @@ -28,7 +28,6 @@ ########## STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' -STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') # Insert Whitenoise Middleware at top but below Security Middleware MIDDLEWARE.insert(1, 'whitenoise.middleware.WhiteNoiseMiddleware',) diff --git a/release.sh b/release.sh index b9a1d352..79408759 100644 --- a/release.sh +++ b/release.sh @@ -1,5 +1,7 @@ # Collect Static is Done Manually # because Heroku runs `collectstatic`` before `yarn build` # so dist is not ready +echo "Collecting Static..." python manage.py collectstatic --noinput +echo "Migrate..." python manage.py migrate