Fix CDN_HOST variable requirement

main
Eugen Rochko 2016-11-26 15:27:05 +01:00
parent 950312bada
commit 6c82dfcf5f
2 changed files with 5 additions and 3 deletions

View File

@ -12,8 +12,7 @@ LOCAL_DOMAIN=example.com
LOCAL_HTTPS=true LOCAL_HTTPS=true
# Application secrets # Application secrets
# These are arbitrary strings. They should be long and cryptographically secure. # Generate each with the `rake secret` task
# For Docker, `docker-compose run --rm web rake secret` will generate them.
PAPERCLIP_SECRET= PAPERCLIP_SECRET=
SECRET_KEY_BASE= SECRET_KEY_BASE=
@ -23,3 +22,6 @@ SMTP_PORT=587
SMTP_LOGIN= SMTP_LOGIN=
SMTP_PASSWORD= SMTP_PASSWORD=
SMTP_FROM_ADDRESS=notifications@example.com SMTP_FROM_ADDRESS=notifications@example.com
# Optional asset host for multi-server setups
# CDN_HOST=assets.example.com

View File

@ -13,7 +13,7 @@ Rails.application.configure do
# Full error reports are disabled and caching is turned on. # Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false config.consider_all_requests_local = false
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
config.action_controller.asset_host = ENV['CDN_HOST'] config.action_controller.asset_host = ENV['CDN_HOST'] if ENV.key?('CDN_HOST')
# Disable serving static files from the `/public` folder by default since # Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this. # Apache or NGINX already handles this.