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

     1  ---
     2  layout: "docs"
     3  page_title: "Appfile"
     4  sidebar_current: "docs-concepts-appfile"
     5  description: |-
     6    The "Appfile" is the file that Otto uses as a source of configuration
     7    for an application. It tells Otto just enough information for Otto to
     8    manage the application from development to deployment.
     9  ---
    10  
    11  # Appfile
    12  
    13  The "Appfile" is the file that Otto uses as a source of configuration
    14  for an application. It tells Otto just enough information for Otto to
    15  manage the application from development to deployment.
    16  
    17  An example Appfile is shown below. This Appfile is completely valid.
    18  
    19  ```
    20  application {
    21    name = "example"
    22    type = "ruby"
    23  }
    24  
    25  customization {
    26    ruby_version = "2.0"
    27  }
    28  ```
    29  
    30  The complete syntax and sections of an Appfile are
    31  [documented in the Appfile section](/docs/appfile).
    32  
    33  The goal of this page is to explain the purpose of an Appfile,
    34  what Otto does with the Appfile, etc.
    35  
    36  ## Everything is Optional
    37  
    38  Appfiles are completely optional. If no Appfile exists, Otto will
    39  inspect the project and attempt to detect what kind of application it is.
    40  It uses this detection to generate an Appfile internally. This generated
    41  Appfile is never saved externally in a project.
    42  
    43  In the Otto [getting started guide](/intro/getting-started), we develop
    44  and deploy a complete application without an Appfile.
    45  
    46  In addition to the Appfile itself being optional, all the individual
    47  blocks ("application", "customization", etc.) within an Appfile are also
    48  optional. If an Appfile exists and a block such as "application" is missing,
    49  Otto will just use the detected Appfile data and merge it in.
    50  
    51  You can play with this on your own by creating a directory with an
    52  identifiable application file such as "index.php", and playing around with
    53  omitting various parts of an Appfile and seeing what Otto generates.
    54  
    55  ## Source vs. Compiled
    56  
    57  The "Appfile" itself is the source code form of Otto configuration.
    58  Otto takes this file and [compiles](/docs/concepts/compile.html) it to
    59  an internal representation that is used by all the Otto subcommands,
    60  such as `otto dev`.
    61  
    62  For people writing Appfiles, the important concept to understand here is
    63  that modifying an Appfile has no effect on the behavior of Otto until
    64  that Appfile is compiled.
    65  
    66  This is a very useful feature, since modifications to an Appfile that
    67  might be pushed to version control don't affect other developers using
    68  Otto until they decide to recompile.
    69  
    70  More details about compilation are covered on the
    71  [compilation concepts](/docs/concepts/compile.html) page.