katbin/config/dev.secret.sample.exs
Akshit Garg 12ec98d15e
refactor(config): use secret files in dev mode
- Refactor `config/dev.exs` to use `config/dev.secret.exs` instead of
  fetching the SMTP information from the environment and using hardcoded
  database credentials. This is useful when different developers have
  different database credentials and they use different SMTP adapters
- Add a sample `dev.secret.exs` in `config/dev.secret.sample.exs`. Also
  gitignore the origin `dev.secret.exs` file
- Add instructions on how to setup the config file for development in
  `README.md`
- Add `Plug.Swoosh.MailboxPreview` plug on "/mailbox" route in
  development mode for easier development with e-mails

Signed-off-by: Akshit Garg <garg.akshit@gmail.com>
2021-08-21 16:47:31 +05:30

25 lines
549 B
Elixir

import Mix.Config
# Configure your database
config :ketbin, Ketbin.Repo,
username: "postgres",
password: "postgres",
database: "ketbin_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
smtp_relay = "<Your SMTP Relay Here>"
username = "<Your SMTP username here>"
password = "<Your SMTP password here>"
# configure mailer
config :ketbin, Ketbin.Mailer,
adapter: Swoosh.Adapters.SMTP,
relay: smtp_relay,
username: username,
password: password,
tls: :always,
auth: :always,
port: 587