From 0ef2d0b23c0a53178cb746a2e35559cb9ea86170 Mon Sep 17 00:00:00 2001 From: Trevor Vallender Date: Wed, 19 Jun 2024 16:28:39 +0100 Subject: [PATCH] Production email setup --- config/credentials.yml.enc | 2 +- config/environments/production.rb | 10 +++++++++- todo.md | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index 1e1250f..d2c7918 100644 --- a/config/credentials.yml.enc +++ b/config/credentials.yml.enc @@ -1 +1 @@ -RWzqbXYOBdxgpheefubYOD+li8SgrYjDuQjZ3SxRbSI8HhMmEi0iSuGUFBl/OlRTmhmUcswbpO4QXmcuS/Ej8dxz2WZ03RnozYO3ftYGSMQy23mqJx4WGxG+Z3p5hxSmeJ4bLoM91bQPkwYJGGi2ZLZXb6+QLopTtBHCZ17dmlvCE22F6zz70KZVgLN76jMTtjfLTQc5XrIdg23rFQfkgsSTrX9spKr/6mgUAILRQ/baPzlT43v9z13YfA8xe3BM/Giv7tBTmnZ6SVs12TT7jcsp5RfdWyxHHgpKUf0E1Mz5P98xOabo/pWYL3TQ8AzkW2y7G8q3WaR8FLpS80UOSBTgx0/iE6Josoc8Kql22VInLJMUz4+Haxt3t22dU2DE4ERmEjvhgCBTFgw6NyBy+tPxmdIh--mZf16ejQbkcvs4cT--V5RGldMxw37X+LXoyc8XYw== \ No newline at end of file +atKhynQXkpwmrzii63fd1Jb1JTP4VZVvVyMgI4/jBGtMjZ+8NPSJrwtxuEJB7WZ1Yf2lczk1DNX0aHDWwju9TsUyG0NP3YKIAViek6NWddyOwFKsRrRtvVwYO+KAr6futrfQScbVjb6486+HUl4cLMFuy1wzQPrmmA6c1MIAsHl52sF/CMo5CZfopw7y1db6mMU84cUk24Ni4om5deAZ5lWk9i5kthWo4XsUM0VmGUmdrX0Ut30IxoSmgwCOztus+kMJu/mzwmI65Z+h6edTWJHF1pJg8+7BFubd3Eh4QK6f0ZvUG5JT9ErBbiTNI1QUxxI5eijhBBsSBHeMyMsVV7OCc7zWV/dwvKIZs0SSq96T3FZJbBcmZ7Tf7iWHyUriDbl0ZXrL1KBq7lvGcSJn/yRCiM3CXzWbvAk+71MSttiP3U7ku2yk8iC/83Tb+GjjLwHA9K4cDP90oOMH6wfRc0zbGaatT1aQIL6EJOT6EbBDkE0GaEaHsF4kk7A=--t+nRneI0xx3h7kD+--ylF1ajEnHDWNkpZtAF1O6g== \ No newline at end of file diff --git a/config/environments/production.rb b/config/environments/production.rb index 81af9f7..28cc01f 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -74,6 +74,14 @@ Rails.application.configure do # config.active_job.queue_name_prefix = "forg_production" config.action_mailer.perform_caching = false + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = { + address: "smtp.eu.mailgun.org", + port: 587, + domain: ENV.fetch("APPLICATION_HOST"), + username: "postmaster@mail.ttcompanion.com", + password: Rails.application.credentials.dig(:mailgun, :password), + } # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. @@ -93,7 +101,7 @@ Rails.application.configure do config.hosts = [ "localhost", "ttcompanion.com", - /.*\.ttcompanion\.com/ + /.*\.ttcompanion\.com/, ] # Skip DNS rebinding protection for the default health check endpoint. # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } diff --git a/todo.md b/todo.md index b76d90b..c132427 100644 --- a/todo.md +++ b/todo.md @@ -1,3 +1,6 @@ +- set up email in prod +- disallow unverified accounts +- request invite - don't move down/up top/bottom features - auto save text fields - indicate save status on titlebar