---
# System prepended metadata

title: heroku ENV

---

heroku ENV
===
heroku config
查看目前設定

heroku config:set 金鑰名稱＝值
設定金鑰
heroku config:unset 金鑰名稱
移除金鑰
## email設定
到 config/environments/production.rb

```ruby
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.default_url_options = { host: '' }
  config.action_mailer.smtp_settings = {
    address:        "smtp.sendgrid.net",
    port:           587,
    domain:         '',
    authentication: "plain",
    user_name:      ENV["mailgun_user"],
    password:       ENV["sendgrid_secret"],
    enable_starttls_auto: true,
  }


```


EDITOR=vim rails credentials:edit

開啟master.key

