From deefcbc0cffa8850b85e176c7905e08dd16bbcc4 Mon Sep 17 00:00:00 2001 From: Stephen Crosby Date: Wed, 16 Sep 2015 21:27:07 -0700 Subject: [PATCH] fixes #950 add email settings for heroku deploy --- app.json | 4 +++- docs/deployment/heroku.md | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app.json b/app.json index 8d0e424..c32d3a4 100644 --- a/app.json +++ b/app.json @@ -8,7 +8,9 @@ "GEMFILE_RUBY_VERSION": "2.2.3", "SECRET_KEY_BASE": { "generator": "secret" - } + }, + "EMAIL_DELIVERY_METHOD": "smtp", + "SMTP_SERVER": "smtp.sendgrid.net" }, "addons": [ "mongolab:sandbox", diff --git a/docs/deployment/heroku.md b/docs/deployment/heroku.md index bbfeafe..b506a71 100644 --- a/docs/deployment/heroku.md +++ b/docs/deployment/heroku.md @@ -31,12 +31,13 @@ git commit -m "Update db/seeds.rb with initial login" ### Create an app on Heroku and push the source code ```bash heroku apps:create -heroku addons:add mongolab:sandbox -heroku addons:add sendgrid:starter -heroku config:add GEMFILE_RUBY_VERSION=2.2.0 -heroku config:add SECRET_KEY_BASE="$(bundle exec rake secret)" -heroku config:add ERRBIT_HOST=some-hostname.example.com -heroku config:add ERRBIT_EMAIL_FROM=example@example.com +heroku addons:create mongolab:sandbox +heroku addons:create sendgrid:starter +heroku config:set GEMFILE_RUBY_VERSION=2.2.3 +heroku config:set SECRET_KEY_BASE="$(bundle exec rake secret)" +heroku config:set ERRBIT_HOST=some-hostname.example.com +heroku config:set ERRBIT_EMAIL_FROM=example@example.com +heroku config:set EMAIL_DELIVERY_METHOD=smtp SMTP_SERVER=smtp.sendgrid.net git push heroku master ``` @@ -54,19 +55,19 @@ Option 1. With the heroku-scheduler add-on (replacement for cron): ```bash # Install the heroku scheduler add-on -heroku addons:add scheduler:standard +heroku addons:create scheduler:standard # Go open the dashboard to schedule the job. You should use # 'rake errbit:db:clear_resolved' as the task command, and schedule it # at whatever frequency you like (once/day should work great). -heroku addons:open scheduler +heroku addons:create scheduler ``` Option 2. With the cron add-on: ```bash # Install the heroku cron addon, to clear resolved errors daily: -heroku addons:add cron:daily +heroku addons:create cron:daily ``` Option 3. Clear resolved errors manually: @@ -77,5 +78,5 @@ heroku run rake errbit:db:clear_resolved ### Add the deployment hook ```bash -heroku addons:add deployhooks:http --url="http://YOUR_ERRBIT_HOST/deploys.txt?api_key=YOUR_API_KEY" +heroku addons:create deployhooks:http --url="http://YOUR_ERRBIT_HOST/deploys.txt?api_key=YOUR_API_KEY" ``` -- libgit2 0.21.2