-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Heroku deployment for Celery and Redis integration
- Loading branch information
1 parent
5b2b304
commit 17bfae0
Showing
3 changed files
with
91 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
web: gunicorn config.wsgi:application | ||
release: python manage.py collectstatic --noinput && python manage.py migrate | ||
worker: celery -A config.celery_app worker --loglevel=info | ||
beat: celery -A config.celery_app beat --loglevel=info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,47 @@ | ||
{ | ||
"environments": { | ||
"test": { | ||
"scripts": { | ||
"test": "python manage.py test" | ||
}, | ||
"buildpacks": [{ | ||
"url": "https://github.com/cyberdelia/heroku-geo-buildpack.git" | ||
}, | ||
{ | ||
"url": "heroku/python" | ||
} | ||
], | ||
"env": { | ||
"DJANGO_SETTINGS_MODULE": { | ||
"value": "config.settings.test" | ||
}, | ||
"LD_LIBRARY_PATH": { | ||
"value": "/app/lib" | ||
}, | ||
"BUILD_WITH_GEO_LIBRARIES": { | ||
"value": "1" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
{ | ||
"environments": { | ||
"test": { | ||
"scripts": { | ||
"test": "python manage.py test" | ||
}, | ||
"buildpacks": [ | ||
{ | ||
"url": "https://github.com/cyberdelia/heroku-geo-buildpack.git" | ||
}, | ||
{ | ||
"url": "heroku/python" | ||
} | ||
], | ||
"env": { | ||
"DJANGO_SETTINGS_MODULE": { | ||
"value": "config.settings.test" | ||
}, | ||
"LD_LIBRARY_PATH": { | ||
"value": "/app/lib" | ||
}, | ||
"BUILD_WITH_GEO_LIBRARIES": { | ||
"value": "1" | ||
} | ||
} | ||
}, | ||
"production": { | ||
"scripts": { | ||
"postdeploy": "python manage.py migrate && python manage.py load_redis_index" | ||
}, | ||
"env": { | ||
"DJANGO_SETTINGS_MODULE": { | ||
"value": "config.settings.production" | ||
}, | ||
"DATABASE_URL": { | ||
"value": "${DATABASE_URL}" | ||
}, | ||
"REDIS_URL": { | ||
"value": "${REDIS_URL}" | ||
}, | ||
"CELERY_BROKER_URL": { | ||
"value": "${CELERY_BROKER_URL}" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters