github.com/sbuss/deis@v1.6.1/registry/templates/config.yml (about)

     1  # All other flavors inherit the `common' config snippet
     2  common: &common
     3      # Default log level is info
     4      loglevel: _env:LOGLEVEL:info
     5      # Enable the debugging /_versions endpoint
     6      debug_versions: _env:DEBUG_VERSIONS:false
     7      # By default, the registry acts standalone (eg: doesn't query the index)
     8      standalone: _env:STANDALONE:true
     9      # The default endpoint to use (if NOT standalone) is index.docker.io
    10      index_endpoint: _env:INDEX_ENDPOINT:https://index.docker.io
    11      # Storage redirect is disabled
    12      storage_redirect: _env:STORAGE_REDIRECT
    13      # Token auth is enabled (if NOT standalone)
    14      disable_token_auth: _env:DISABLE_TOKEN_AUTH
    15      # No priv key
    16      privileged_key: _env:PRIVILEGED_KEY
    17      # No search backend
    18      search_backend: _env:SEARCH_BACKEND
    19      # SQLite search backend
    20      sqlalchemy_index_database: _env:SQLALCHEMY_INDEX_DATABASE:sqlite:////tmp/docker-registry.db
    21  
    22      # Mirroring is not enabled
    23      mirroring:
    24          source: _env:MIRROR_SOURCE # https://registry-1.docker.io
    25          source_index: _env:MIRROR_SOURCE_INDEX # https://index.docker.io
    26          tags_cache_ttl: _env:MIRROR_TAGS_CACHE_TTL:172800 # seconds
    27  
    28      cache:
    29          host: {{ if exists "/deis/cache/host" }}{{ getv "/deis/cache/host" }}{{ else }}""{{ end }}
    30          port: {{ if exists "/deis/cache/port" }}{{ getv "/deis/cache/port" }}{{ else }}""{{ end }}
    31          password: _env:CACHE_REDIS_PASSWORD
    32          db: 1
    33  
    34      # Enabling LRU cache for small files
    35      # This speeds up read/write on small files
    36      # when using a remote storage backend (like S3).
    37      cache_lru:
    38          host: {{ if exists "/deis/cache/host" }}{{ getv "/deis/cache/host" }}{{ else }}""{{ end }}
    39          port: {{ if exists "/deis/cache/port" }}{{ getv "/deis/cache/port" }}{{ else }}""{{ end }}
    40          password: _env:CACHE_LRU_REDIS_PASSWORD
    41          db: 2
    42  
    43      # Enabling these options makes the Registry send an email on each code Exception
    44      {{ if exists "/deis/registry/smtpHost" }}
    45      email_exceptions:
    46          smtp_host: {{ if exists "/deis/registry/smtpHost" }}{{ getv "/deis/registry/smtpHost" }}{{ else }}""{{ end }}
    47          smtp_port: {{ if exists "/deis/registry/smtpPort" }}{{ getv "/deis/registry/smtpPort" }}{{ else }}"25"{{ end }}
    48          smtp_login: {{ if exists "/deis/registry/smtpLogin" }}{{ getv "/deis/registry/smtpLogin" }}{{ else }}""{{ end }}
    49          smtp_password: {{ if exists "/deis/registry/smtpPassword" }}{{ getv "/deis/registry/smtpPassword" }}{{ else }}""{{ end }}
    50          smtp_secure: bool({{ if exists "/deis/registry/smtpSecure" }}{{ getv "/deis/registry/smtpSecure" }}{{ else }}"false"{{ end }})
    51          from_addr: {{ if exists "/deis/registry/smtpFrom" }}{{ getv "/deis/registry/smtpFrom" }}{{ else }}"docker-registry@localdomain.local"{{ end }}
    52          to_addr: {{ if exists "/deis/registry/smtpTo" }}{{ getv "/deis/registry/smtpTo" }}{{ else }}"noise+dockerregistry@localdomain.local"{{ end }}
    53      {{ end }}
    54  
    55      # Enable bugsnag (set the API key)
    56      bugsnag: _env:BUGSNAG
    57  
    58      # CORS support is not enabled by default
    59      cors:
    60          origins: _env:CORS_ORIGINS:["null"]
    61          methods: _env:CORS_METHODS
    62          headers: _env:CORS_HEADERS:[Content-Type]
    63          expose_headers: _env:CORS_EXPOSE_HEADERS
    64          supports_credentials: _env:CORS_SUPPORTS_CREDENTIALS
    65          max_age: _env:CORS_MAX_AGE
    66          send_wildcard: _env:CORS_SEND_WILDCARD
    67          always_send: _env:CORS_ALWAYS_SEND
    68          automatic_options: _env:CORS_AUTOMATIC_OPTIONS
    69          vary_header: _env:CORS_VARY_HEADER
    70          resources: _env:CORS_RESOURCES
    71  
    72  local: &local
    73      <<: *common
    74      storage: local
    75      storage_path: /data
    76  
    77  
    78  s3: &s3
    79      <<: *common
    80      storage: s3
    81      s3_region: {{ if exists "/deis/registry/s3region" }}{{ getv "/deis/registry/s3region" }}{{ else }}""{{ end }}
    82      s3_bucket: {{ if exists "/deis/registry/s3bucket" }}{{ getv "/deis/registry/s3bucket" }}{{ else }}""{{ end }}
    83      boto_bucket: {{ if exists "/deis/registry/s3bucket" }}{{ getv "/deis/registry/s3bucket" }}{{ else }}""{{ end }}
    84      storage_path: {{ if exists "/deis/registry/s3path" }}{{ getv "/deis/registry/s3path" }}{{ else }}"/registry"{{ end }}
    85      s3_encrypt: bool({{ if exists "/deis/registry/s3encrypt" }}{{ getv "/deis/registry/s3encrypt" }}{{ else }}"true"{{ end }})
    86      s3_secure: bool({{ if exists "/deis/registry/s3secure" }}{{ getv "/deis/registry/s3secure" }}{{ else }}"true"{{ end }})
    87      s3_access_key: {{ if exists "/deis/registry/s3accessKey" }}{{ getv "/deis/registry/s3accessKey" }}{{ else }}""{{ end }}
    88      s3_secret_key: {{ if exists "/deis/registry/s3secretKey" }}{{ getv "/deis/registry/s3secretKey" }}{{ else }}""{{ end }}
    89  
    90  # Ceph Object Gateway Configuration
    91  # See http://ceph.com/docs/master/radosgw/ for details on installing this service.
    92  ceph-s3: &ceph-s3
    93      <<: *common
    94      storage: s3
    95      s3_region: ~
    96      s3_bucket: {{ getv "/deis/registry/bucketName" }}
    97      s3_encrypt: false
    98      s3_secure: false
    99      storage_path: /registry
   100      s3_access_key: {{ getv "/deis/store/gateway/accessKey" }}
   101      s3_secret_key: {{ getv "/deis/store/gateway/secretKey" }}
   102      boto_bucket: {{ getv "/deis/registry/bucketName" }}
   103      boto_host: {{ getv "/deis/store/gateway/host" }}
   104      boto_port: {{ getv "/deis/store/gateway/port" }}
   105      boto_debug: 0
   106      boto_calling_format: boto.s3.connection.OrdinaryCallingFormat
   107  
   108  # Google Cloud Storage Configuration
   109  # See:
   110  # https://developers.google.com/storage/docs/reference/v1/getting-startedv1#keys
   111  # for details on access and secret keys.
   112  gcs:
   113      <<: *common
   114      storage: gcs
   115      boto_bucket: _env:GCS_BUCKET
   116      storage_path: _env:STORAGE_PATH:/registry
   117      gs_secure: _env:GCS_SECURE:true
   118      gs_access_key: _env:GCS_KEY
   119      gs_secret_key: _env:GCS_SECRET
   120      # OAuth 2.0 authentication with the storage.
   121      # oauth2 can be set to true or false. If it is set to true, gs_access_key,
   122      # gs_secret_key and gs_secure are not needed.
   123      # Client ID and Client Secret must be set into OAUTH2_CLIENT_ID and
   124      # OAUTH2_CLIENT_SECRET environment variables.
   125      # See: https://developers.google.com/accounts/docs/OAuth2.
   126      oauth2: _env:GCS_OAUTH2:false
   127  
   128  # This flavor is for storing images in Openstack Swift
   129  swift: &swift
   130      <<: *common
   131      storage: swift
   132      storage_path: _env:STORAGE_PATH:/registry
   133      # keystone authorization
   134      swift_authurl: {{ if exists "/deis/registry/swiftAuthURL" }}{{ getv "/deis/registry/swiftAuthURL" }}{{ else }}""{{ end }}
   135      swift_container: {{ if exists "/deis/registry/swiftContainer" }}{{ getv "/deis/registry/swiftContainer" }}{{ else }}""{{ end }}
   136      swift_user: {{ if exists "/deis/registry/swiftUser" }}{{ getv "/deis/registry/swiftUser" }}{{ else }}""{{ end }}
   137      swift_password: {{ if exists "/deis/registry/swiftPassword" }}{{ getv "/deis/registry/swiftPassword" }}{{ else }}""{{ end }}
   138      swift_tenant_name: {{ if exists "/deis/registry/swiftTenantName" }}{{ getv "/deis/registry/swiftTenantName" }}{{ else }}""{{ end }}
   139      swift_region_name: {{ if exists "/deis/registry/swiftRegionName" }}{{ getv "/deis/registry/swiftRegionName" }}{{ else }}""{{ end }}
   140  
   141  # This flavor stores the images in Glance (to integrate with openstack)
   142  # See also: https://github.com/dotcloud/openstack-docker
   143  glance: &glance
   144      <<: *common
   145      storage: glance
   146      storage_alternate: _env:GLANCE_STORAGE_ALTERNATE:file
   147      storage_path: _env:STORAGE_PATH:/tmp/registry
   148  
   149  openstack:
   150      <<: *glance
   151  
   152  # This flavor stores the images in Glance (to integrate with openstack)
   153  # and tags in Swift.
   154  glance-swift: &glance-swift
   155      <<: *swift
   156      storage: glance
   157      storage_alternate: swift
   158  
   159  openstack-swift:
   160      <<: *glance-swift
   161  
   162  elliptics:
   163      <<: *common
   164      storage: elliptics
   165      elliptics_nodes: _env:ELLIPTICS_NODES
   166      elliptics_wait_timeout: _env:ELLIPTICS_WAIT_TIMEOUT:60
   167      elliptics_check_timeout: _env:ELLIPTICS_CHECK_TIMEOUT:60
   168      elliptics_io_thread_num: _env:ELLIPTICS_IO_THREAD_NUM:2
   169      elliptics_net_thread_num: _env:ELLIPTICS_NET_THREAD_NUM:2
   170      elliptics_nonblocking_io_thread_num: _env:ELLIPTICS_NONBLOCKING_IO_THREAD_NUM:2
   171      elliptics_groups: _env:ELLIPTICS_GROUPS
   172      elliptics_verbosity: _env:ELLIPTICS_VERBOSITY:4
   173      elliptics_logfile: _env:ELLIPTICS_LOGFILE:/dev/stderr
   174      elliptics_addr_family: _env:ELLIPTICS_ADDR_FAMILY:2
   175  
   176  # This is the default configuration when no flavor is specified
   177  dev: &dev
   178      <<: *local
   179      loglevel: _env:LOGLEVEL:debug
   180      search_backend: _env:SEARCH_BACKEND:sqlalchemy
   181  
   182  # This flavor is used by unit tests
   183  test:
   184      <<: *dev
   185      index_endpoint: https://indexstaging-docker.dotcloud.com
   186      standalone: true
   187      storage_path: _env:STORAGE_PATH:./tmp/test
   188  
   189  # To specify another flavor, set the environment variable SETTINGS_FLAVOR
   190  # $ export SETTINGS_FLAVOR=prod
   191  prod:
   192      <<: *s3
   193      storage_path: _env:STORAGE_PATH:/prod
   194  
   195  # Flavor used by deis
   196  deis:
   197      {{ if exists "/deis/registry/s3accessKey" }}<<: *s3
   198      {{ else if exists "/deis/registry/swiftAuthURL" }} <<: *openstack-swift
   199      {{ else }} <<: *ceph-s3
   200      {{ end }}