Adding preview environment
This commit is contained in:
parent
98b3013e3e
commit
d151e37e2e
2
Gemfile
2
Gemfile
@ -59,7 +59,7 @@ group :test do
|
||||
gem 'database_cleaner'
|
||||
end
|
||||
|
||||
group :staging, :production do
|
||||
group :staging, :production, :preview do
|
||||
gem 'rails_12factor'
|
||||
gem 'capistrano'
|
||||
gem 'rvm-capistrano'
|
||||
|
@ -511,7 +511,7 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def is_production?
|
||||
Rails.env == 'production'
|
||||
Rails.env == 'production' || Rails.env == 'preview'
|
||||
end
|
||||
|
||||
def is_test?
|
||||
|
@ -1,3 +0,0 @@
|
||||
class Translation < I18n::Backend::ActiveRecord::Translation
|
||||
has_paper_trail
|
||||
end
|
@ -2,6 +2,12 @@ development:
|
||||
enabled: false
|
||||
host: bikebike.org
|
||||
|
||||
preview:
|
||||
enabled: true
|
||||
host: preview-cdn.bikebike.org
|
||||
protocol: https
|
||||
fallback_protocol: http
|
||||
|
||||
production:
|
||||
enabled: true
|
||||
host: cdn.bikebike.org
|
||||
|
@ -1,5 +1,7 @@
|
||||
CarrierWave.configure do |config|
|
||||
if Rails.env == "production"
|
||||
config.asset_host = "https://cdn.bikebike.org"
|
||||
elsif Rails.env == "preview"
|
||||
config.asset_host = "https://preview-cdn.bikebike.org"
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user