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