From 467ccee10cf7e5a93e92970227b9b8702cb4397a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Bogda=C5=82?= Date: Thu, 3 Sep 2015 20:52:59 +0200 Subject: [PATCH] Add heroku configuration file --- {{cookiecutter.repo_name}}/README.rst | 3 +++ {{cookiecutter.repo_name}}/app.json | 30 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 {{cookiecutter.repo_name}}/app.json diff --git a/{{cookiecutter.repo_name}}/README.rst b/{{cookiecutter.repo_name}}/README.rst index b6cf2ec6..5a35d1e0 100644 --- a/{{cookiecutter.repo_name}}/README.rst +++ b/{{cookiecutter.repo_name}}/README.rst @@ -205,6 +205,9 @@ We providing tools and instructions for deploying using Docker and Heroku. Heroku ^^^^^^ +.. image:: https://www.herokucdn.com/deploy/button.png + :target: https://heroku.com/deploy + Run these commands to deploy the project to Heroku: .. code-block:: bash diff --git a/{{cookiecutter.repo_name}}/app.json b/{{cookiecutter.repo_name}}/app.json new file mode 100644 index 00000000..1af80c5d --- /dev/null +++ b/{{cookiecutter.repo_name}}/app.json @@ -0,0 +1,30 @@ +{ + "name": "{{cookiecutter.repo_name}}", + "description": "{{cookiecutter.description}}", + "env": { + "BUILDPACK_URL": "https://github.com/heroku/heroku-buildpack-python", + "DJANGO_SETTINGS_MODULE": "config.settings.production", + "DJANGO_SECRET_KEY": { + "description": "A secret key for verifying the integrity of signed cookies.", + "generator": "secret" + }, + "DJANGO_ALLOWED_HOSTS": { + "description": "Comma-separated list of hosts", + "value": ".herokuapp.com" + }, + "DJANGO_AWS_ACCESS_KEY_ID": "", + "DJANGO_AWS_SECRET_ACCESS_KEY": "", + "DJANGO_AWS_STORAGE_BUCKET_NAME": "", + "DJANGO_MAILGUN_SERVER_NAME": "", + "DJANGO_MAILGUN_API_KEY": ""{% if cookiecutter.use_sentry == "y" -%}, + "DJANGO_SENTRY_DSN": ""{%- endif %} + }, + "scripts": { + "postdeploy": "python manage.py migrate" + }, + "addons": [ + "heroku-postgresql:hobby-dev", + "heroku-redis:hobby-dev", + "mailgun" + ] +}