dotenv instead of Rails credentials
The deployment is done on a Dokku server. It sets the DATABASE_URL automatically.
This commit is contained in:
parent
85d12b5c77
commit
e4af4c21ae
6 changed files with 12 additions and 17 deletions
|
|
@ -1,4 +1,4 @@
|
|||
require "active_support/core_ext/integer/time"
|
||||
require 'active_support/core_ext/integer/time'
|
||||
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
|
@ -17,10 +17,10 @@ Rails.application.configure do
|
|||
|
||||
# Enable/disable Action Controller caching. By default Action Controller caching is disabled.
|
||||
# Run rails dev:cache to toggle Action Controller caching.
|
||||
if Rails.root.join("tmp/caching-dev.txt").exist?
|
||||
if Rails.root.join('tmp/caching-dev.txt').exist?
|
||||
config.action_controller.perform_caching = true
|
||||
config.action_controller.enable_fragment_cache_logging = true
|
||||
config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
|
||||
config.public_file_server.headers = { 'cache-control' => "public, max-age=#{2.days.to_i}" }
|
||||
else
|
||||
config.action_controller.perform_caching = false
|
||||
end
|
||||
|
|
@ -34,12 +34,12 @@ Rails.application.configure do
|
|||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
config.action_mailer.smtp_settings = {
|
||||
address: 'localhost',
|
||||
port: 25,
|
||||
address: 'localhost',
|
||||
port: 25,
|
||||
enable_starttls_auto: false
|
||||
}
|
||||
config.action_mailer.default_url_options = {
|
||||
host: "screenshots.debian.net",
|
||||
host: 'screenshots.debian.net',
|
||||
protocol: 'https'
|
||||
}
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ Rails.application.configure do
|
|||
config.action_mailer.perform_caching = false
|
||||
|
||||
# Set localhost to be used by links generated in mailer templates.
|
||||
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
|
||||
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
|
||||
|
||||
# Print deprecation notices to the Rails logger.
|
||||
config.active_support.deprecation = :log
|
||||
|
|
@ -77,8 +77,8 @@ Rails.application.configure do
|
|||
config.package_sources = [
|
||||
{
|
||||
description: 'Debian Unstable (Sid)', type: 'apt', url: 'http://ftp.de.debian.org/debian/dists/sid',
|
||||
architectures: ['i386' ,'amd64']
|
||||
#components: ['main','restricted','universe','multiverse']
|
||||
architectures: %w[i386 amd64]
|
||||
# components: ['main','restricted','universe','multiverse']
|
||||
}
|
||||
]
|
||||
|
||||
|
|
@ -101,4 +101,3 @@ Rails.application.configure do
|
|||
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
|
||||
# config.generators.apply_rubocop_autocorrect_after_generate!
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue