anchor.diff:          automatic_options: <%= @cors_automatic_options %>
           vary_header: <%= @cors_vary_header %>
           resources: <%= @cors_resources %>
  -
  +<% end -%>
  +
  +<% if @storage == local -%>
   local: &local
       <<: *common
       storage: local
       storage_path: <%= @storage_path %>
  -
  -
  +<% end -%>
  +
  +<% if @storage == s3 or @storage == cloudfronts3 -%>
   s3: &s3
       <<: *common
       storage: s3
  
positive.code:         smtp_secure: <%= @smtp_secure %>
          from_addr: <%= @smtp_from_addr %>
          to_addr: <%= @smtp_to_addr %>
  
      # Enable bugsnag (set the API key)
      bugsnag: <%= @bugsnag %>
  
      # CORS support is not enabled by default
      cors:
          origins: <%= @cors_origins %>
  
negative.code: # All other flavors inherit the `common' config snippet
  common: &common
      issue: '"docker-registry server"'
  <% if @loglevel -%>
      # Default log level is info
      loglevel: <%= @loglevel %>
  <% end -%>
  <% if @debug -%>
      # Enable debugging (additional informations in the output of the _ping endpoint)
      debug: <%= @debug %>
  <% end -%>
  <% if @standalone -%>
      # By default, the registry acts standalone (eg: doesn't query the index)
      standalone: <%= @standalone %>
  <% end -%>
  <% if @index_endpoint -%>
      # The default endpoint to use (if NOT standalone) is index.docker.io
      index_endpoint: <%= @index_endpoint %>
  <% end -%>
  <% if @storage_redirect -%>
      # Storage redirect is disabled
      storage_redirect: <%= @storage_redirect %>
  <% end -%>
  <% if @disable_token_auth -%>
      # Token auth is enabled (if NOT standalone)
      disable_token_auth: <%= @disable_token_auth %>
  <% end -%>
  <% if @privileged_key -%>
      # No priv key
      privileged_key: <%= @privileged_key %>
  <% end -%>
  <% if @search_backend -%>
      # No search backend
      search_backend: <%= @search_backend %>
  <% end -%>
  <% if @sqlalchemy_index_database -%>
      # SQLite search backend
      sqlalchemy_index_database: <%= @sqlalchemy_index_database %>
  <% end -%>
  <% if @mirror_source -%>
      # Mirroring is not enabled
      mirroring:
          source: <%= @mirror_source %>
          source_index: <%= @mirror_source_index %>
          tags_cache_ttl: <%= @mirror_tags_cache_ttl %>
  <% end -%>
  
  <% if @cache_redis_host -%>
      cache:
          host: <%= @cache_redis_host %>
          port: <%= @cache_redis_port %>
          db: <%= @cache_redis_db %>
          password: <%= @cache_redis_password %>
  <% end -%>
  
  <% if @cache_lru_redis_host -%>
      # Enabling LRU cache for small files
      # This speeds up read/write on small files
      # when using a remote storage backend (like S3).
  