Commit deefcbc0cffa8850b85e176c7905e08dd16bbcc4
1 parent
a28f0fb8
Exists in
master
and in
1 other branch
fixes #950 add email settings for heroku deploy
Showing
2 changed files
with
14 additions
and
11 deletions
Show diff stats
app.json
@@ -8,7 +8,9 @@ | @@ -8,7 +8,9 @@ | ||
8 | "GEMFILE_RUBY_VERSION": "2.2.3", | 8 | "GEMFILE_RUBY_VERSION": "2.2.3", |
9 | "SECRET_KEY_BASE": { | 9 | "SECRET_KEY_BASE": { |
10 | "generator": "secret" | 10 | "generator": "secret" |
11 | - } | 11 | + }, |
12 | + "EMAIL_DELIVERY_METHOD": "smtp", | ||
13 | + "SMTP_SERVER": "smtp.sendgrid.net" | ||
12 | }, | 14 | }, |
13 | "addons": [ | 15 | "addons": [ |
14 | "mongolab:sandbox", | 16 | "mongolab:sandbox", |
docs/deployment/heroku.md
@@ -31,12 +31,13 @@ git commit -m "Update db/seeds.rb with initial login" | @@ -31,12 +31,13 @@ git commit -m "Update db/seeds.rb with initial login" | ||
31 | ### Create an app on Heroku and push the source code | 31 | ### Create an app on Heroku and push the source code |
32 | ```bash | 32 | ```bash |
33 | heroku apps:create | 33 | heroku apps:create |
34 | -heroku addons:add mongolab:sandbox | ||
35 | -heroku addons:add sendgrid:starter | ||
36 | -heroku config:add GEMFILE_RUBY_VERSION=2.2.0 | ||
37 | -heroku config:add SECRET_KEY_BASE="$(bundle exec rake secret)" | ||
38 | -heroku config:add ERRBIT_HOST=some-hostname.example.com | ||
39 | -heroku config:add ERRBIT_EMAIL_FROM=example@example.com | 34 | +heroku addons:create mongolab:sandbox |
35 | +heroku addons:create sendgrid:starter | ||
36 | +heroku config:set GEMFILE_RUBY_VERSION=2.2.3 | ||
37 | +heroku config:set SECRET_KEY_BASE="$(bundle exec rake secret)" | ||
38 | +heroku config:set ERRBIT_HOST=some-hostname.example.com | ||
39 | +heroku config:set ERRBIT_EMAIL_FROM=example@example.com | ||
40 | +heroku config:set EMAIL_DELIVERY_METHOD=smtp SMTP_SERVER=smtp.sendgrid.net | ||
40 | git push heroku master | 41 | git push heroku master |
41 | ``` | 42 | ``` |
42 | 43 | ||
@@ -54,19 +55,19 @@ Option 1. With the heroku-scheduler add-on (replacement for cron): | @@ -54,19 +55,19 @@ Option 1. With the heroku-scheduler add-on (replacement for cron): | ||
54 | 55 | ||
55 | ```bash | 56 | ```bash |
56 | # Install the heroku scheduler add-on | 57 | # Install the heroku scheduler add-on |
57 | -heroku addons:add scheduler:standard | 58 | +heroku addons:create scheduler:standard |
58 | 59 | ||
59 | # Go open the dashboard to schedule the job. You should use | 60 | # Go open the dashboard to schedule the job. You should use |
60 | # 'rake errbit:db:clear_resolved' as the task command, and schedule it | 61 | # 'rake errbit:db:clear_resolved' as the task command, and schedule it |
61 | # at whatever frequency you like (once/day should work great). | 62 | # at whatever frequency you like (once/day should work great). |
62 | -heroku addons:open scheduler | 63 | +heroku addons:create scheduler |
63 | ``` | 64 | ``` |
64 | 65 | ||
65 | Option 2. With the cron add-on: | 66 | Option 2. With the cron add-on: |
66 | 67 | ||
67 | ```bash | 68 | ```bash |
68 | # Install the heroku cron addon, to clear resolved errors daily: | 69 | # Install the heroku cron addon, to clear resolved errors daily: |
69 | -heroku addons:add cron:daily | 70 | +heroku addons:create cron:daily |
70 | ``` | 71 | ``` |
71 | 72 | ||
72 | Option 3. Clear resolved errors manually: | 73 | Option 3. Clear resolved errors manually: |
@@ -77,5 +78,5 @@ heroku run rake errbit:db:clear_resolved | @@ -77,5 +78,5 @@ heroku run rake errbit:db:clear_resolved | ||
77 | 78 | ||
78 | ### Add the deployment hook | 79 | ### Add the deployment hook |
79 | ```bash | 80 | ```bash |
80 | -heroku addons:add deployhooks:http --url="http://YOUR_ERRBIT_HOST/deploys.txt?api_key=YOUR_API_KEY" | 81 | +heroku addons:create deployhooks:http --url="http://YOUR_ERRBIT_HOST/deploys.txt?api_key=YOUR_API_KEY" |
81 | ``` | 82 | ``` |