Skip to content

Commit 8af1b32

Browse files
committed
Prepare
1 parent 0302cfa commit 8af1b32

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

config/environments/local_production.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@
9191
config.logger = ActiveSupport::TaggedLogging.new(logger)
9292
end
9393

94-
# Timber.io logger
95-
send_logs_to_timber = ENV["SEND_LOGS_TO_TIMBER"] || "true" # <---- production should send timber logs by default
94+
# Install the Timber.io logger
95+
send_logs_to_timber = ENV["SEND_LOGS_TO_TIMBER"] || "false" # <---- set to false to stop sending dev logs to Timber.io
9696
log_device = send_logs_to_timber == "true" ? Timber::LogDevices::HTTP.new(ENV["TIMBER"]) : STDOUT
9797
logger = Timber::Logger.new(log_device)
9898
logger.level = config.log_level
@@ -113,7 +113,7 @@
113113

114114
config.action_mailer.delivery_method = :smtp
115115
config.action_mailer.perform_deliveries = true
116-
config.action_mailer.default_url_options = { host: ENV["APP_PROTOCOL"] + ENV["APP_DOMAIN"] }
116+
config.action_mailer.default_url_options = { host: config.app_domain }
117117
ActionMailer::Base.smtp_settings = {
118118
address: "smtp.sendgrid.net",
119119
port: "587",
@@ -126,6 +126,8 @@
126126

127127
config.middleware.use Rack::HostRedirect,
128128
"practicaldev.herokuapp.com" => "dev.to"
129+
130+
config.skylight.environments << "local_production"
129131
end
130132

131133
# rubocop:enable Metrics/BlockLength

config/initializers/airbrake.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
# environments.
4242
# NOTE: This option *does not* work if you don't set the 'environment' option.
4343
# https://github.com/airbrake/airbrake-ruby#ignore_environments
44-
c.ignore_environments = %w[test development]
44+
c.ignore_environments = %w[test development local_production]
4545

4646
# A list of parameters that should be filtered out of what is sent to
4747
# Airbrake. By default, all "password" attributes will have their contents

config/secrets.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
development:
1414
secret_key_base: a60edc976c913b19fd9fc8118936fbe1df2b07f4eecc5ad32f975e33cd4ea36b150c1ce933b681b90874a46568041629003dcbfc07238f7dca91741bcd1ec870
1515

16+
local_production:
17+
secret_key_base: a60edc976c913b19fd9fc8118936fbe1df2b07f4eecc5ad32f975e33cd4ea36b150c1ce933b681b90874a46568041629003dcbfc07238f7dca91741bcd1ec870
18+
1619
test:
1720
secret_key_base: 42dd7834039ebbea271af22635a6782ee15e519b14629c5276bfcdd4cff841e9926994784bb43a335a8f8c9739bb254ea3afe831839d4dc65654ec7516ec25f0
1821

config/webpacker.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,12 @@ production:
5454

5555
# Cache manifest.json for performance
5656
cache_manifest: true
57+
58+
local_production:
59+
<<: *default
60+
61+
# Production depends on precompilation of packs prior to booting for performance.
62+
compile: false
63+
64+
# Cache manifest.json for performance
65+
cache_manifest: true

0 commit comments

Comments
 (0)