Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/Add docker-compose file #15

Closed
wants to merge 3 commits into from
Closed

Feature/Add docker-compose file #15

wants to merge 3 commits into from

Conversation

alXmas
Copy link
Contributor

@alXmas alXmas commented Sep 8, 2019

Add docker-compose file and update Makefile

@@ -18,7 +18,7 @@
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = ENV.fetch('EMAIL_FROM')
config.mailer_sender = ENV.fetch('from') if Rails.env.production?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут есть 2 нюанса:

  1. EMAIL_FROM — хорошее название для переменной окружения. Зачем переименовывать?
    Переменные окружения же общие на всю систему + их принято называть БОЛЬШИМИ_БУКВАМИ.
  2. . If Rails.env.SOMETHING? — эта штука нужна очень редко. Чаще всего нужно просто пересмотреть подход и сконфигурировать по-другому. Бонус: как отправлять письма в тестах и девелопменте?

Copy link
Contributor Author

@alXmas alXmas Sep 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Поправил
  2. Вынес эту переменную в docker-compose.yml.
    Бонус:
    В девелопе письма ловлю MailCatcher
    В тестах запускаю мейлер и проверяю, что переданные параметры в мейлер были отправлены

@mokevnin
Copy link
Member

mokevnin commented Sep 8, 2019

Посмотри плс последний вебинар.

@mokevnin mokevnin closed this Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants