diff options
author | Ian Baum <ibaum@gitlab.com> | 2017-12-07 15:11:39 -0600 |
---|---|---|
committer | Ian Baum <ibaum@gitlab.com> | 2017-12-07 15:11:39 -0600 |
commit | 49d887f5a55d1f6ddf933488c808cea1eaa92819 (patch) | |
tree | 476168f8914a75670819390d12fddfbb7c0758c0 | |
parent | 1f366444c4164e57a6850d1bfa9f1d6a044d3b7d (diff) | |
download | gitlab-ce-40031-include-assset_sync-gem.tar.gz |
Update asset_sync initializer40031-include-assset_sync-gem
* Rename file to allow for configuration to be available via environment
variables
* Keep it disabled by default
-rw-r--r-- | config/initializers/asset_sync.rb | 41 | ||||
-rw-r--r-- | config/initializers/asset_sync_disable_by_default.rb | 5 |
2 files changed, 5 insertions, 41 deletions
diff --git a/config/initializers/asset_sync.rb b/config/initializers/asset_sync.rb deleted file mode 100644 index 53959c51cb6..00000000000 --- a/config/initializers/asset_sync.rb +++ /dev/null @@ -1,41 +0,0 @@ -AssetSync.configure do |config| - config.enabled = ENV['ASSET_SYNC_ENABLED'] || false - - config.aws_access_key_id = ENV['AWS_ACCESS_KEY_ID'] - config.aws_secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] - # To use AWS reduced redundancy storage. - # config.aws_reduced_redundancy = true - - config.fog_directory = ENV['FOG_DIRECTORY'] - config.fog_provider = 'AWS' - config.fog_region = ENV['FOG_REGION'] - - # Invalidate a file on a cdn after uploading files - # config.cdn_distribution_id = "12345" - # config.invalidate = ['file1.js'] - - # Increase upload performance by configuring your region - # config.fog_region = 'eu-west-1' - # - # Don't delete files from the store - # config.existing_remote_files = "keep" - # - # Automatically replace files with their equivalent gzip compressed version - # config.gzip_compression = true - # - # Use the Rails generated 'manifest.yml' file to produce the list of files to - # upload instead of searching the assets directory. - # config.manifest = true - # - # Fail silently. Useful for environments such as Heroku - # config.fail_silently = true - # - # Log silently. Default is `true`. But you can set it to false if more logging message are preferred. - # Logging messages are sent to `STDOUT` when `log_silently` is falsy - # config.log_silently = true - # - # Allow custom assets to be cacheable. Note: The base filename will be matched - # If you have an asset with name `app.0ba4d3.js`, only `app.0ba4d3` will need to be matched - # config.cache_asset_regexps = [ /\.[a-f0-9]{8}$/i, /\.[a-f0-9]{20}$/i ] - # config.cache_asset_regexp = /\.[a-f0-9]{8}$/i -end diff --git a/config/initializers/asset_sync_disable_by_default.rb b/config/initializers/asset_sync_disable_by_default.rb new file mode 100644 index 00000000000..7a01f157ba7 --- /dev/null +++ b/config/initializers/asset_sync_disable_by_default.rb @@ -0,0 +1,5 @@ +AssetSync.configure do |config| + # If asset_sync is enabled, and not configured, then builds will fail + # Remaining configuration can be done through environment variables + config.enabled = ENV['ASSET_SYNC_ENABLED'] || false +end |