Skip to content

Commit

Permalink
Add MAILGUN_BASE_URI and document missing env var
Browse files Browse the repository at this point in the history
  • Loading branch information
simonprev committed Aug 25, 2023
1 parent 450902e commit bad8353
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,19 @@ Various login providers are included in Accent using Ueberauth to abstract servi

If you want to send emails, you’ll have to configure the following environment variables:

| Variable | Default | Description |
| ------------------ | ------- | --------------------------------------------------------- |
| `MAILER_FROM` | _none_ | The email address used to send emails. |
| `SENDGRID_API_KEY` | _none_ | Use SendGrid to send emails |
| `MANDRILL_API_KEY` | _none_ | Use Mandrill to send emails |
| `MAILGUN_API_KEY` | _none_ | Use Mailgun to send emails |
| `SMTP_ADDRESS` | _none_ | Use an SMTP server to send your emails. |
| `SMTP_API_HEADER` | _none_ | An optional API header that will be added to sent emails. |
| `SMTP_PORT` | _none_ | The port ex: (25, 465, 587). |
| `SMTP_PASSWORD` | _none_ | The password for authentification. |
| `SMTP_USERNAME` | _none_ | The username for authentification. |
| Variable | Default | Description |
| ------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `MAILER_FROM` | _none_ | The email address used to send emails. |
| `SENDGRID_API_KEY` | _none_ | Use SendGrid to send emails |
| `MANDRILL_API_KEY` | _none_ | Use Mandrill to send emails |
| `MAILGUN_API_KEY` | _none_ | Use Mailgun to send emails |
| `MAILGUN_DOMAIN` | none | Use a custom domain in Mailgun |
| `MAILGUN_BASE_URI` | none | [Send emails from a different server](https://hexdocs.pm/bamboo/Bamboo.MailgunAdapter.html#module-api-base-uri-configuration) |
| `SMTP_ADDRESS` | _none_ | Use an SMTP server to send your emails. |
| `SMTP_API_HEADER` | _none_ | An optional API header that will be added to sent emails. |
| `SMTP_PORT` | _none_ | The port ex: (25, 465, 587). |
| `SMTP_PASSWORD` | _none_ | The password for authentification. |
| `SMTP_USERNAME` | _none_ | The username for authentification. |

### Metrics and monitoring setup

Expand All @@ -183,6 +185,12 @@ If you want to track performance of Accent, you can configure NewRelic with the
| `NEW_RELIC_APP_NAME` | _none_ | Service APM name |
| `NEW_RELIC_LICENSE_KEY` | _none_ | License key |

Or use the built-in metrics UI from [TelemetryUI](https://hexdocs.pm/telemetry_ui):

| Variable | Default | Description |
| -------------------- | ------- | -------------------------------------------------------------------------- |
| `METRICS_BASIC_AUTH` | _none_ | username:password to HTTP basic auth login on the pre-configured dashboard |

### Kubernetes helm chart setup

You can setup the project with [a helm chart like this one](https://github.com/andreymaznyak/accent-helm-chart). This project uses [a fork by andreymaznyak](https://github.com/andreymaznyak/accent) and not this canonical repository. The specs and values may need to be updated if you use this repo.
Expand Down
3 changes: 2 additions & 1 deletion config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ cond do
config :accent, Accent.Mailer,
adapter: Bamboo.MailgunAdapter,
api_key: get_env("MAILGUN_API_KEY"),
domain: get_env("MAILGUN_DOMAIN")
domain: get_env("MAILGUN_DOMAIN"),
base_uri: get_env("MAILGUN_BASE_URI")

get_env("SMTP_ADDRESS") ->
config :accent, Accent.Mailer,
Expand Down

0 comments on commit bad8353

Please sign in to comment.