Skip to content

anonymous /bootstrap.sh
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Django on Heroku with Celery and Sentry
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
Something went wrong with that request. Please try again.