From f25a3285a2eb43bf11f2951feed860797ded667b Mon Sep 17 00:00:00 2001 From: Torsten Date: Thu, 12 Jan 2023 21:57:25 +0200 Subject: [PATCH] configure host and mail --- config/application.rb | 3 ++- config/credentials.yml.enc | 2 +- config/environments/production.rb | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/config/application.rb b/config/application.rb index 25a10ee..1a171d8 100644 --- a/config/application.rb +++ b/config/application.rb @@ -18,12 +18,13 @@ require "rails/test_unit/railtie" # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) -module HubfeenixFi +module Volunteers class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 config.hosts << "green-machine.local" #our "staging" + config.hosts << "volunteers.hubfeenix.fi" #production # Configuration for the application, engines, and railties goes here. # diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index 842b392..544729d 100644 --- a/config/credentials.yml.enc +++ b/config/credentials.yml.enc @@ -1 +1 @@ -ZUMBx7dPhvXDpwPubRsF44jZzYuZRTZDUn8gWC5tGwFE0j9Yl8Dz8ihEBnX8jZFXV/8sxFF0xCe1Z/+RMnRVI3IpxrQptFN6fxVy+6jjHWKCCLF2M2EfiBhd46K+vM82v+g0lavDeo0ypianEkm0wZFrmfOFFZHO08x7+yXcYG13DxzpE8sqLMff4/w/xEs5U1pK1du0OgX0VHydL2tQI1OTqSLmqjQviAskHaNfZXTVYdi+48wbDehQ60jzLgE+5fjLFB9xEvWPPL1S/VINua/L7duHXlTc2WfewcBHk+gh5DoiTFMl8IaBvhtQS9c4/8k11CdlCgNd6qJv3xNwzHmXKdSL6hf48QZxrlTDn8CDnemayxX7T45lhTsaVcNODSAvUV/Y4o9nQj1TEw3AeYTY6poXAYHX5mVt--WMQ46bR6kf9MtLOZ--uEav+4njESNq1J0HIGoxVg== \ No newline at end of file +pf8uYnRH2+bs7dvQJF/yu/Ui4cvxDXWDb6qR8gQekr4PPP3+XPnVVUbJNv8i1cMrzLYDmzimWgFRyEj3DDJP4D2PJcoJQIf1qxwCMVZlUv4KntA51TrTsnTHbtQnxd5viJ4KNgQLX+mIlwqsSHpOUeQqVDHSLNrusjGMawpFDV2eZzh2kobC8yjRleAsafV3uw8rotltFIS1vtlaStKp4TCHV7sTk8JSIPnnGX78ny3ZPHl1G+5k5q0ZuqXhMibf1D/lma0liPv46dwtKRh9SWaFBlu5FiV9UXCOYsv4+w1QanZO1w8qJk2Cf2zQ/HfhZsNDfEMJPrdfxLsNsuoVHJ25wdP0HjRf3Yvmdo4RLdtYkWsdoX1fmBnY+yGWH/Y8QbHvUB6yw25uPjXCSYDoqJY7MVdsCHA8SJAeRB/+c6EFpUcDpu/2o/slRiQO0e3XULWc2M6L9896DUlweMPa7YjAbYFtMpDeABAra+u66oyNqEbGso6Ri1Jcbw==--I27jM0jCAyWmHv+Z--PJSDPmASIMO2Ie/NkbFofg== \ No newline at end of file diff --git a/config/environments/production.rb b/config/environments/production.rb index b74ecd3..06028d3 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -61,6 +61,25 @@ Rails.application.configure do # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false + + config.action_mailer.smtp_settings = { + :address => Rails.application.credentials.mail_server, + :port => 465, + :domain => Rails.application.credentials.domain_name, + :user_name => Rails.application.credentials.admin_email, + :password => Rails.application.credentials.admin_pass, + :ssl => true, + :tls => true, + :authentication => :login, + :enable_starttls_auto => true + } + + # ActionMailer Config + config.action_mailer.default_url_options = { :host => Rails.application.credentials.domain_name } + config.action_mailer.delivery_method = :smtp + config.action_mailer.perform_deliveries = true + config.action_mailer.raise_delivery_errors = true + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true