github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/website/source/docs/appfile/customization.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Customization - Appfile"
     4  sidebar_current: "docs-appfile-custom"
     5  description: |-
     6    Customization blocks change the behavior of Otto for a specific application
     7    type or infrastructure.
     8  ---
     9  
    10  # Customization Configuration
    11  
    12  Customization blocks change the default behavior of Otto for application types,
    13  dependencies, infrastructure, and more.
    14  
    15  This page assumes you're familiar with the
    16  [Appfile syntax](/docs/appfile/syntax.html) already.
    17  
    18  ## Example
    19  
    20  Customization configuration looks like the following:
    21  
    22  ```
    23  customization {
    24      ruby_version = "2.1"
    25  }
    26  
    27  customization "app" {
    28      ruby_version = "2.2.3"
    29  }
    30  ```
    31  
    32  ## Description
    33  
    34  `customization` blocks configure custom behavior for an Appfile that
    35  deviates from the built-in defaults. Multiple customization blocks
    36  can be specified. If customization blocks have to be merged, Otto does this
    37  at a per key level.
    38  
    39  Customization blocks can be named. The example above shows a customization
    40  block that is both unnamed and named ("app"). The name of the customization
    41  block becomes a filter for what the customization applies to.
    42  
    43  The available names of customization blocks are well defined. If no name
    44  is specified, "app" is assumed. The names can be in the following format,
    45  where all capital letters are placeholders:
    46  
    47    * "" (blank) - Equivalent to "app". See "app" below.
    48  
    49    * "app" - Applies the customization to the app that this Appfile defines.
    50  
    51    * "infra" - Applies the customization to the infrastructure created by
    52        this application on deploy.
    53  
    54  Within the customization blocks, the available options are dependent on
    55  the application type or infrastructure type itself. See the respective
    56  documentation for a reference. For example, see [app types](/docs/apps/index.html)
    57  for a list of app types and their available customizations.
    58  
    59  ## Syntax
    60  
    61  The full syntax is:
    62  
    63  ```
    64  customization [FILTER] {
    65      CONFIG ...
    66  }
    67  ```
    68  
    69  where `CONFIG` is:
    70  
    71  ```
    72  KEY = VALUE
    73  
    74  KEY {
    75      CONFIG
    76  }
    77  ```