Created
June 2, 2011 17:19
-
-
Save anonymous/1004844 to your computer and use it in GitHub Desktop.
Django on Heroku with Celery and Sentry
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
virtualenv --no-site-packages . | |
source bin/activate | |
bin/pip install Django psycopg2 django-sentry | |
bin/pip freeze > requirements.txt | |
bin/django-admin.py startproject mysite | |
cat >.gitignore <<EOF | |
bin/ | |
include/ | |
lib/ | |
EOF | |
echo | |
cat >> mysite/settings.py <<EOF | |
INSTALLED_APPS = INSTALLED_APPS + ( | |
'django.contrib.admin', | |
'django.contrib.admindocs', | |
'indexer', | |
'paging', | |
'sentry', | |
'sentry.client', | |
) | |
MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ( | |
'sentry.client.middleware.Sentry404CatchMiddleware', | |
) | |
EOF | |
cat > Procfile <<EOF | |
web: bin/python mysite/manage.py runserver 0.0.0.0:\$PORT --noreload | |
worker: bin/python mysite/manage.py celeryd -E -B --loglevel=INFO | |
EOF | |
cat >> mysite/urls.py <<EOF | |
urlpatterns += patterns('', | |
url(r'^sentry/', include('sentry.urls')), | |
) | |
from django.contrib import admin | |
admin.autodiscover() | |
urlpatterns += patterns('', | |
url(r'^admin/doc/', include('django.contrib.admindocs.urls')), | |
url(r'^admin/', include(admin.site.urls)), | |
) | |
EOF | |
git add . | |
git commit -m 'startproject' | |
git push heroku master | |
heroku run bin/python mysite/manage.py syncdb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment