From 6cefe2b9dca692985638845b6188f139a61ca768 Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Mon, 21 May 2018 22:28:18 +0300 Subject: [PATCH 1/9] Rename gunicorn script to start --- .../compose/production/django/Dockerfile | 10 +++++----- .../compose/production/django/{gunicorn => start} | 0 {{cookiecutter.project_slug}}/production.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename {{cookiecutter.project_slug}}/compose/production/django/{gunicorn => start} (100%) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 04ac0d55e..bcebd4b59 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -19,15 +19,15 @@ COPY ./requirements /requirements RUN pip install --no-cache-dir -r /requirements/production.txt \ && rm -rf /requirements -COPY ./compose/production/django/gunicorn /gunicorn -RUN sed -i 's/\r//' /gunicorn -RUN chmod +x /gunicorn -RUN chown django /gunicorn - COPY ./compose/production/django/entrypoint /entrypoint RUN sed -i 's/\r//' /entrypoint RUN chmod +x /entrypoint RUN chown django /entrypoint + +COPY ./compose/production/django/start /start +RUN sed -i 's/\r//' /start +RUN chmod +x /start +RUN chown django /start {% if cookiecutter.use_celery == "y" %} COPY ./compose/production/django/celery/worker/start /start-celeryworker RUN sed -i 's/\r//' /start-celeryworker diff --git a/{{cookiecutter.project_slug}}/compose/production/django/gunicorn b/{{cookiecutter.project_slug}}/compose/production/django/start similarity index 100% rename from {{cookiecutter.project_slug}}/compose/production/django/gunicorn rename to {{cookiecutter.project_slug}}/compose/production/django/start diff --git a/{{cookiecutter.project_slug}}/production.yml b/{{cookiecutter.project_slug}}/production.yml index 51c896275..c76197513 100644 --- a/{{cookiecutter.project_slug}}/production.yml +++ b/{{cookiecutter.project_slug}}/production.yml @@ -17,7 +17,7 @@ services: env_file: - ./.envs/.production/.django - ./.envs/.production/.postgres - command: /gunicorn + command: /start postgres: build: From 39c825a262ccec637d4c5d96e81fb22e9aefe44e Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Mon, 21 May 2018 22:36:50 +0300 Subject: [PATCH 2/9] Fix latest Caddy version --- .../compose/production/caddy/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/caddy/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/caddy/Dockerfile index 8cbbf1df7..c32efb3ee 100644 --- a/{{cookiecutter.project_slug}}/compose/production/caddy/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/caddy/Dockerfile @@ -1,3 +1,3 @@ -FROM abiosoft/caddy:0.11 +FROM abiosoft/caddy:0.11.0 COPY ./compose/production/caddy/Caddyfile /etc/Caddyfile From c3b9f72f31b1af960f18c042f30630e33e1a7d68 Mon Sep 17 00:00:00 2001 From: Michel Sassano Date: Fri, 25 May 2018 08:21:22 +0200 Subject: [PATCH 3/9] Remove openssl to fix unsatisfiable constraints error with libressl (#1661) Removed the openssl-dev package from the Django Dockerfiles (local and production) to fix the unsatisfiable constraints error. The error appears because you can't have openssl and libressl installed at the same time. One of the package used by the template/project installs libressl which create an error when trying to install openssl. Thx to @browniebroke --- {{cookiecutter.project_slug}}/compose/local/django/Dockerfile | 2 +- .../compose/production/django/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index df9561f71..274249548 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -9,7 +9,7 @@ RUN apk update \ # Pillow dependencies && apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \ # CFFI dependencies - && apk add libffi-dev openssl-dev py-cffi \ + && apk add libffi-dev py-cffi \ # Translations dependencies && apk add gettext \ # https://docs.djangoproject.com/en/dev/ref/django-admin/#dbshell diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index bcebd4b59..7ae8a7cb9 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -9,7 +9,7 @@ RUN apk update \ # Pillow dependencies && apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \ # CFFI dependencies - && apk add libffi-dev openssl-dev py-cffi + && apk add libffi-dev py-cffi RUN addgroup -S django \ && adduser -S -G django django From 39d897169c6985b6b97c39aa20324364b704acf7 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 25 May 2018 09:31:33 +0200 Subject: [PATCH 4/9] Update pytest to 3.6.0 (#1662) * Update pytest from 3.5.1 to 3.6.0 * Update pytest from 3.5.1 to 3.6.0 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index eedbfad06..b428b6cb0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.0.0 -pytest==3.5.1 +pytest==3.6.0 pytest-cookies==0.3.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 958dba1bd..4dee0421f 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.7.4 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -pytest==3.5.1 # https://github.com/pytest-dev/pytest +pytest==3.6.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From 688cd45d1e648ec4be75faacfca97f9c9b896280 Mon Sep 17 00:00:00 2001 From: Nikita Shupeyko Date: Fri, 25 May 2018 10:31:52 +0300 Subject: [PATCH 5/9] Split issue templates by categories (#1645) * Add bug report template * Add feature proposal template * Add improvement template * Add question template * Bug -> Bug Report * Add regression template * Minor enhancements * Alter the old issue template * Add more question resources * Add paid support template * Address feedback from @browniebroke * Update Paid Support Request template * Remove a trailing linebreak from the Paid Support Request template * Introduce a pull request template --- .github/ISSUE_TEMPLATE.md | 33 +------------------------- .github/ISSUE_TEMPLATE/bug.md | 23 ++++++++++++++++++ .github/ISSUE_TEMPLATE/feature.md | 24 +++++++++++++++++++ .github/ISSUE_TEMPLATE/improvement.md | 24 +++++++++++++++++++ .github/ISSUE_TEMPLATE/paid-support.md | 10 ++++++++ .github/ISSUE_TEMPLATE/question.md | 6 +++++ .github/ISSUE_TEMPLATE/regression.md | 28 ++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 27 +++++++++++++++++++++ 8 files changed, 143 insertions(+), 32 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug.md create mode 100644 .github/ISSUE_TEMPLATE/feature.md create mode 100644 .github/ISSUE_TEMPLATE/improvement.md create mode 100644 .github/ISSUE_TEMPLATE/paid-support.md create mode 100644 .github/ISSUE_TEMPLATE/question.md create mode 100644 .github/ISSUE_TEMPLATE/regression.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 37a905b9d..b232b6e34 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,32 +1 @@ -**Note: for support questions, please use the `cookiecutter-django` tag on stackoverflow**. This repository's issues are reserved for feature requests and bug reports. - -* **I'm submitting a ... ** - - [ ] bug report - - [ ] feature request - - [ ] support request => Please do not submit support request here, see note at the top of this template. - - -* **Do you want to request a *feature* or report a *bug*?** - - - -* **What is the current behavior?** - - - -* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem** - - -* **What is the expected behavior?** - - - -* **What is the motivation / use case for changing the behavior?** - - - -* **Please tell us about your environment:** - - - -* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc) +## [Make sure to follow one of the issue templates we've got](https://github.com/pydanny/cookiecutter-django/issues/new/choose), otherwise the issue might be closed immeditely diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 000000000..75f6a19c6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,23 @@ +--- +name: Bug Report +about: Report a bug +--- + +## What happened? + + + + +## What should've happened instead? + + + + +## Steps to reproduce + +[//]: # (Any or all of the following:) +[//]: # (* Host system configuration: OS, Docker & friends' versions etc.) +[//]: # (* Project generation options) +[//]: # (* Logs) + + diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md new file mode 100644 index 000000000..b0d560d81 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -0,0 +1,24 @@ +--- +name: New Feature Proposal +about: Propose a new feature +--- + +## Description + +[//]: # (What's it you're proposing? How should it be implemented?) + + + + +## Rationale + +[//]: # (Why should this feature be implemented?) + + + + +## Use case(s) / visualization(s) + +[//]: # ("Better to see something once than to hear about it a thousand times.") + + diff --git a/.github/ISSUE_TEMPLATE/improvement.md b/.github/ISSUE_TEMPLATE/improvement.md new file mode 100644 index 000000000..572652373 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/improvement.md @@ -0,0 +1,24 @@ +--- +name: Improvement Suggestion +about: Let us know how we could improve +--- + +## Description + +[//]: # (What's it you're proposing? How should it be implemented?) + + + + +## Rationale + +[//]: # (Why should this feature be implemented?) + + + + +## Use case(s) / visualization(s) + +[//]: # ("Better to see something once than to hear about it a thousand times.") + + diff --git a/.github/ISSUE_TEMPLATE/paid-support.md b/.github/ISSUE_TEMPLATE/paid-support.md new file mode 100644 index 000000000..7cd2c4a57 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/paid-support.md @@ -0,0 +1,10 @@ +--- +name: Paid Support Request +about: Ask Core Team members to help you out +--- + +Provided your question goes beyound [regular support](https://github.com/pydanny/cookiecutter-django/issues/new?template=question.md), and/or the task at hand is of timely/high priority nature use the below information to reach out for contributors directly. + +* Daniel Roy Greenfeld, Project Lead ([GitHub](https://github.com/pydanny), [Patreon](https://www.patreon.com/danielroygreenfeld)): expertise in Django and AWS ELB. + +* Nikita Shupeyko, Core Developer ([GitHub](https://github.com/webyneter)): expertise in Django, Docker, and Heroku. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 000000000..0c0f3d891 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,6 @@ +--- +name: Question +about: Please, ask your question on StackOverflow or Gitter +--- + +First, make sure to examine [the docs](https://cookiecutter-django.readthedocs.io/en/latest/). If that doesn't help post a question on [StackOverflow](https://stackoverflow.com/questions/tagged/cookiecutter-django) tagged with `cookiecutter-django`. Finally, feel free to join [Gitter](https://gitter.im/pydanny/cookiecutter-django) and ask around. diff --git a/.github/ISSUE_TEMPLATE/regression.md b/.github/ISSUE_TEMPLATE/regression.md new file mode 100644 index 000000000..80384004b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/regression.md @@ -0,0 +1,28 @@ +--- +name: Regression Report +about: Let us know if something that'd been working has broke +--- + +## What happened before? + + + + +## What happens now? + + + + +## Last stable commit / Since when? + + + + +## Steps to reproduce + +[//]: # (Any or all of the following:) +[//]: # (* Host system configuration: OS, Docker & friends' versions etc.) +[//]: # (* Project generation options) +[//]: # (* Logs) + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..8dbff6c25 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,27 @@ +[//]: # (Thank you for helping us out: your efforts mean great deal to the project and the community as a whole!) + +[//]: # (Before you proceed:) + +[//]: # (1. Make sure to add yourself to `CONTRIBUTORS.rst` through this PR provided you're contributing here for the first time) +[//]: # (2. Don't forget to update the `docs/` presuming others would benefit from a concise description of whatever that you're proposing) + + +## Description + +[//]: # (What's it you're proposing?) + + + + +## Rationale + +[//]: # (Why does the project need that?) + + + + +## Use case(s) / visualization(s) + +[//]: # ("Better to see something once than to hear about it a thousand times.") + + From ea9a781cc88db7964077aca870d6e8d1e2b7ea58 Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Fri, 25 May 2018 12:07:17 +0300 Subject: [PATCH 6/9] Install Mailgun's (and potentially, other ESPs') dependencies with Anymail Rationale: this is a [generic way](https://github.com/anymail/django-anymail#anymail-1-2-3) of handling Anymail ESP dependencies --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index e36dc78a2..9ddb7d15f 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -14,4 +14,4 @@ raven==6.8.0 # https://github.com/getsentry/raven-python # Django # ------------------------------------------------------------------------------ django-storages[boto3]==1.6.6 # https://github.com/jschneier/django-storages -django-anymail==2.2 # https://github.com/anymail/django-anymail +django-anymail[mailgun]==2.2 # https://github.com/anymail/django-anymail From 77f61de23655811b2d77caa84df3e852e92b23c8 Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Fri, 25 May 2018 12:55:27 +0300 Subject: [PATCH 7/9] chown django /start-(celerybeat|celeryworker) in production Django --- .../compose/production/django/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 7ae8a7cb9..b204a4810 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -32,10 +32,12 @@ RUN chown django /start COPY ./compose/production/django/celery/worker/start /start-celeryworker RUN sed -i 's/\r//' /start-celeryworker RUN chmod +x /start-celeryworker +RUN chown django /start-celeryworker COPY ./compose/production/django/celery/beat/start /start-celerybeat RUN sed -i 's/\r//' /start-celerybeat RUN chmod +x /start-celerybeat +RUN chown django /start-celerybeat {% endif %} COPY . /app From 225aca189c103bb733a6274bdf6010d815016364 Mon Sep 17 00:00:00 2001 From: msaizar Date: Sun, 27 May 2018 14:12:56 -0300 Subject: [PATCH 8/9] Added articles to README.rst (#1659) * Added articles to README.rst * Updated CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 2 ++ README.rst | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index a5ea2d937..0f6761ed5 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -120,6 +120,7 @@ Listed in alphabetical order. Lyla Fischer Malik Sulaimanov `@flyudvik`_ @flyudvik Martin Blech + Martin Saizar `@msaizar`_ Mathijs Hoogland `@MathijsHoogland`_ Matt Braymer-Hayes `@mattayes`_ @mattayes Matt Linares @@ -218,6 +219,7 @@ Listed in alphabetical order. .. _@kevgathuku: https://github.com/kevgathuku .. _@knitatoms: https://github.com/knitatoms .. _@krzysztofzuraw: https://github.com/krzysztofzuraw +.. _@msaizar: https://github.com/msaizar .. _@MathijsHoogland: https://github.com/MathijsHoogland .. _@mattayes: https://github.com/mattayes .. _@menzenski: https://github.com/menzenski diff --git a/README.rst b/README.rst index 9c1640712..7e24a8369 100644 --- a/README.rst +++ b/README.rst @@ -279,6 +279,8 @@ experience better. Articles --------- +* `cookiecutter-django with Nginx, Route 53 and ELB`_ - Feb. 12, 2018 +* `cookiecutter-django and Amazon RDS`_ - Feb. 7, 2018 * `Deploying Cookiecutter-Django with Docker-Compose`_ - Oct. 19, 2017 * `Using Cookiecutter to Jumpstart a Django Project on Windows with PyCharm`_ - May 19, 2017 * `Exploring with Cookiecutter`_ - Dec. 3, 2016 @@ -290,6 +292,8 @@ Articles Have a blog or online publication? Write about your cookiecutter-django tips and tricks, then send us a pull request with the link. +.. _`cookiecutter-django with Nginx, Route 53 and ELB`: https://msaizar.com/blog/cookiecutter-django-nginx-route-53-and-elb/ +.. _`cookiecutter-django and Amazon RDS`: https://msaizar.com/blog/cookiecutter-django-and-amazon-rds/ .. _`Deploying Cookiecutter-Django with Docker-Compose`: http://adamantine.me/2017/10/19/deploying-cookiecutter-django-with-docker-compose/ .. _`Exploring with Cookiecutter`: http://www.snowboardingcoder.com/django/2016/12/03/exploring-with-cookiecutter/ .. _`Using Cookiecutter to Jumpstart a Django Project on Windows with PyCharm`: https://joshuahunter.com/posts/using-cookiecutter-to-jumpstart-a-django-project-on-windows-with-pycharm/ From fe3f45ba7dbb52cb6018f538d02eefac059ca5b8 Mon Sep 17 00:00:00 2001 From: Nikita Shupeyko Date: Sun, 27 May 2018 22:36:13 +0300 Subject: [PATCH 9/9] Rename DJANGO_SENTRY_DSN env to SENTRY_DSN (#1663) Rationale: so that Heroku auto-provisioned Sentry addon, with its SENTRY_DSN config var is being connected to out-of-box --- docs/deployment-on-heroku.rst | 33 +++++++++++-------- docs/deployment-with-docker.rst | 2 +- docs/settings.rst | 2 +- .../.envs/.production/.django | 2 +- .../config/settings/production.py | 2 +- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/docs/deployment-on-heroku.rst b/docs/deployment-on-heroku.rst index 982168fc7..7006a2877 100644 --- a/docs/deployment-on-heroku.rst +++ b/docs/deployment-on-heroku.rst @@ -14,26 +14,31 @@ Run these commands to deploy the project to Heroku: heroku pg:promote DATABASE_URL heroku addons:create heroku-redis:hobby-dev - heroku addons:create mailgun - heroku config:set WEB_CONCURRENCY=4 - # Generating a 32 character-long random string without any of the visually similiar characters "IOl01": - heroku config:set DJANGO_ADMIN_URL="$(openssl rand -base64 4096 | tr -dc 'A-HJ-NP-Za-km-z2-9' | head -c 32)/" - heroku config:set DJANGO_SECRET_KEY="$(openssl rand -base64 64)" - heroku config:set DJANGO_SETTINGS_MODULE=config.settings.production - heroku config:set DJANGO_ALLOWED_HOSTS='.herokuapp.com' + # If using mailgun: + heroku addons:create mailgun:starter - heroku config:set DJANGO_AWS_ACCESS_KEY_ID=YOUR_AWS_ID_HERE - heroku config:set DJANGO_AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS_KEY_HERE - heroku config:set DJANGO_AWS_STORAGE_BUCKET_NAME=YOUR_AWS_S3_BUCKET_NAME_HERE - - # This is to be set only if you're using Sentry: - heroku config:set DJANGO_SENTRY_DSN=YOUR_SENTRY_DSN + heroku addons:create sentry:f1 heroku config:set PYTHONHASHSEED=random + heroku config:set WEB_CONCURRENCY=4 + heroku config:set DJANGO_DEBUG=False + heroku config:set DJANGO_SETTINGS_MODULE=config.settings.production + heroku config:set DJANGO_SECRET_KEY="$(openssl rand -base64 64)" + # Generating a 32 character-long random string without any of the visually similiar characters "IOl01": + heroku config:set DJANGO_ADMIN_URL="$(openssl rand -base64 4096 | tr -dc 'A-HJ-NP-Za-km-z2-9' | head -c 32)/" + heroku config:set DJANGO_ALLOWED_HOSTS= # Set this to your Heroku app url, e.g. 'bionic-beaver-28392.herokuapp.com' + + heroku config:set DJANGO_AWS_ACCESS_KEY_ID= # Assign with AWS_ACCESS_KEY_ID + heroku config:set DJANGO_AWS_SECRET_ACCESS_KEY= # Assign with AWS_SECRET_ACCESS_KEY + heroku config:set DJANGO_AWS_STORAGE_BUCKET_NAME= # Assign with AWS_STORAGE_BUCKET_NAME git push heroku master + heroku run python manage.py migrate - heroku run python manage.py check --deploy heroku run python manage.py createsuperuser + heroku run python manage.py collectstatic --no-input + + heroku run python manage.py check --deploy + heroku open diff --git a/docs/deployment-with-docker.rst b/docs/deployment-with-docker.rst index de0026a60..42798aae8 100644 --- a/docs/deployment-with-docker.rst +++ b/docs/deployment-with-docker.rst @@ -32,7 +32,7 @@ Configuring the Stack The majority of services above are configured through the use of environment variables. Just check out :ref:`envs` and you will know the drill. -To obtain logs and information about crashes in a production setup, make sure that you have access to an external Sentry instance (e.g. by creating an account with `sentry.io`_), and set the ``DJANGO_SENTRY_DSN`` variable. +To obtain logs and information about crashes in a production setup, make sure that you have access to an external Sentry instance (e.g. by creating an account with `sentry.io`_), and set the ``SENTRY_DSN`` variable. You will probably also need to setup the Mail backend, for example by adding a `Mailgun`_ API key and a `Mailgun`_ sender domain, otherwise, the account creation view will crash and result in a 500 error when the backend attempts to send an email to the account owner. diff --git a/docs/settings.rst b/docs/settings.rst index 60593a5d1..6e71a5151 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -44,7 +44,7 @@ Environment Variable Django Setting Development DJANGO_AWS_ACCESS_KEY_ID AWS_ACCESS_KEY_ID n/a raises error DJANGO_AWS_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY n/a raises error DJANGO_AWS_STORAGE_BUCKET_NAME AWS_STORAGE_BUCKET_NAME n/a raises error -DJANGO_SENTRY_DSN SENTRY_DSN n/a raises error +SENTRY_DSN SENTRY_DSN n/a raises error DJANGO_SENTRY_CLIENT SENTRY_CLIENT n/a raven.contrib.django.raven_compat.DjangoClient DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a logging.INFO MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error diff --git a/{{cookiecutter.project_slug}}/.envs/.production/.django b/{{cookiecutter.project_slug}}/.envs/.production/.django index 2e9eefea7..5cb90897b 100644 --- a/{{cookiecutter.project_slug}}/.envs/.production/.django +++ b/{{cookiecutter.project_slug}}/.envs/.production/.django @@ -37,7 +37,7 @@ WEB_CONCURRENCY=4 {% if cookiecutter.use_sentry == 'y' %} # Sentry # ------------------------------------------------------------------------------ -DJANGO_SENTRY_DSN= +SENTRY_DSN= {% endif %} # Redis diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 889ae179a..ecd517ddd 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -187,7 +187,7 @@ MIDDLEWARE = ['raven.contrib.django.raven_compat.middleware.SentryResponseErrorI # Sentry # ------------------------------------------------------------------------------ -SENTRY_DSN = env('DJANGO_SENTRY_DSN') +SENTRY_DSN = env('SENTRY_DSN') SENTRY_CLIENT = env('DJANGO_SENTRY_CLIENT', default='raven.contrib.django.raven_compat.DjangoClient') LOGGING = { 'version': 1,