-
Notifications
You must be signed in to change notification settings - Fork 51
Configuring FromThePage For Your Environment
-
Default URL Edit config/environments/production.rb change:
Rails.application.routes.default_url_options[:host] = 'fromthepage.com'
to reflect your server hostname -- URLs in status emails will use this for creating links to your server.
-
Securing with SSL After configuring your web server with an SSL certificate, uncomment the following line in config/environments/production.rb: config.force_ssl = true
-
SMTP configuration Edit config/environments/production.rb and add/change the config.action_mailer.smtp_settings
Here's the docs for the settings: http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
Here's two examples: first:
config.action_mailer.smtp_settings = {
:address => "smtp.domain.edu",
:port => 587, # ports 587 and 2525 are also supported with STARTTLS
:enable_starttls_auto => true, # detects and uses STARTTLS
:user_name => "[email protected]",
:password => "XXX", # SMTP password is any valid API key
:authentication => 'login', # Mandrill supports 'plain' or 'login'
:domain => 'fromthepage.ace.fordham.edu', # your domain to identify your server when connecting
:openssl_verify_mode => 'none'
}
config.action_mailer.default_url_options = { host: 'fromthepage.ace.domain.edu' }
second:
config.action_mailer.smtp_settings = {
:address => "smtp.host.com",
:port => 587, # ports 587 and 2525 are also supported with STARTTLS
:enable_starttls_auto => true, # detects and uses STARTTLS
:user_name => "SMTP_Injection", #
:password => "XXX", # SMTP password is any valid API key
:authentication => 'login', # 'plain' or 'login', see rails docs for other options
:domain => 'fromthepage.com', # your domain to identify your server when connecting
}
-
Edit config/initializers/01fromthepage.rb Change the email address for sending system emails.
Add the admin email who should get emails. The primary stakeholder is the right person to use here. -
cron jobs to be run for maintenance and email reporting
Guest Account Cleanup (must do to clean up guest accounts for anonymous users)
00 4 * * * /bin/bash -l -c 'cd /home/fromthepage/deployment/current && RAILS_ENV=production bundle exec rake fromthepage:guest_cleanup[1] >> /tmp/cron_log_file 2>&1'
Admin User Email (who is doing what on the system in the last X hours -- 24 here). This will go to the admin emails set in #3, but we strongly suggest it goes to your primary stakeholder (rather than a system administrator).
00 3 * * * /bin/bash -l -c 'cd /home/fromthepage/deployment/current && RAILS_ENV=production bundle exec rake fromthepage:email_stats[24] >> /tmp/cron_log_file 2>&1'
Nightly email of activity for a particular collection in FromThePage. You can specify the collection number (find it in the URL for the collection) and the email address the report should go to.
00 4 * * * /bin/bash -l -c 'cd /home/fromthepage/deployment/current && RAILS_ENV=production bundle exec rake fromthepage:contributor_stats[58,[email protected]] >> /tmp/cron_log_file 2>&1'