Commit c0e3496c authored by Thong Kuah's avatar Thong Kuah

Skip check precompiled assets locally

It is rare we add a new precompiled asset nowadays. For each asset,
sprockets currently checks every asset path directory (we have about 9K)
which is very slow. So disable this check locally.
parent 67a4f2fc
......@@ -68,6 +68,7 @@ variables:
ELASTIC_URL: "http://elastic:changeme@elasticsearch:9200"
DOCKER_VERSION: "20.10.1"
CACHE_CLASSES: "true"
CHECK_PRECOMPILED_ASSETS: "true"
FF_USE_FASTZIP: "true"
# Preparing custom clone path to reduce space used by all random forks
......
......@@ -23,6 +23,9 @@ Rails.application.configure do
# Configure static asset server for tests with Cache-Control for performance
config.assets.compile = false if ENV['CI']
# There is no need to check if assets are precompiled locally
# To debug AssetNotPrecompiled errors locally, set CHECK_PRECOMPILED_ASSETS to true
config.assets.check_precompiled_asset = Gitlab::Utils.to_boolean(ENV['CHECK_PRECOMPILED_ASSETS'], default: false)
config.public_file_server.enabled = true
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment