Skip to content

Commit 5364ce3

Browse files
committed
Re-enable sentry and bump gunicorn version
1 parent 6eda786 commit 5364ce3

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM python:3.4.5
2-
MAINTAINER Vicky Lee <vicky@twomeylee.name>
2+
LABEL maintainer="vicky@twomeylee.name"
33

44
COPY requirements.txt requirements.txt
55
RUN pip install -r requirements.txt
@@ -17,4 +17,4 @@ RUN python manage.py test --settings=codinggrace_django.settings \
1717
&& python manage.py collectstatic --settings=codinggrace_django.settings --noinput
1818

1919
EXPOSE 8000
20-
CMD ["gunicorn", "codinggrace_django.wsgi", "--bind", "0.0.0.0:8000", "--log-file=-"]
20+
CMD ["gunicorn", "codinggrace_django.wsgi", "--bind=0.0.0.0:8000", "--log-file=-", "--error-logfile=-", "--capture-output", "-w", "4"]

codinggrace_django/settings_heroku.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,15 @@
2626
TEMPLATE_DEBUG = False
2727

2828
SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]
29+
30+
import sentry_sdk
31+
from sentry_sdk.integrations.django import DjangoIntegration
32+
33+
sentry_sdk.init(
34+
dsn=os.environ["SENTRY_DSN"],
35+
integrations=[DjangoIntegration()],
36+
traces_sample_rate=1.0,
37+
# If you wish to associate users to errors (assuming you are using
38+
# django.contrib.auth) you may enable sending PII data.
39+
send_default_pii=True,
40+
)

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ django-grappelli==2.7.1
55
django-guardian==1.2.0
66
Django==1.8.4
77
git+https://github.com/kennethreitz/dj-static.git@b02979384d7c7a6944375c5959224bff40c2035a#egg=dj-static
8-
gunicorn==19.0.0
8+
gunicorn==20.0.4
99
iso8601==0.1.10
1010
mandrill==1.0.53
1111
Markdown==2.4.1
1212
oauthlib==0.6.3
1313
psycopg2==2.5.3
1414
pystache==0.5.4
1515
python3-openid==3.0.4
16-
raven==5.0.0
1716
requests-oauthlib==0.4.1
1817
requests==2.3.0
1918
six==1.7.2
2019
static==1.0.2
20+
sentry-sdk==0.19.4

0 commit comments

Comments
 (0)