github.com/bhameyie/otto@v0.2.1-0.20160406174117-16052efa52ec/website/source/docs/appfile/detect.html.md (about) 1 --- 2 layout: "docs" 3 page_title: "Detection - Appfile" 4 sidebar_current: "docs-appfile-detect" 5 description: |- 6 As noted in the [Appfile concepts](/docs/concepts/appfile.html) page, 7 everything within an Appfile is optional. Otto _detects_ smart defaults 8 for your application, and fills in any missing information with these 9 defaults. This page describes how Otto does this. 10 --- 11 12 # Detection 13 14 As noted in the [Appfile concepts](/docs/concepts/appfile.html) page, 15 everything within an Appfile is optional. Otto _detects_ smart defaults 16 for your application, and fills in any missing information with these 17 defaults. This page describes how Otto does this. 18 19 The purpose of detection is to both make a fantastic getting started 20 experience with Otto, and to enable Otto to work with projects that don't 21 specifically configure it. 22 23 ## Detected Properties 24 25 * **Application name** is detected based on the name of the directory 26 the Appfile is in. 27 28 * **Application type** is detected using filename pattern matching. For 29 example, the existence of a "Gemfile" signals to Otto that the application 30 is likely a Ruby project. Detection fingerprints are documented within 31 each individual [application type](/docs/apps) section. 32 33 * **Project name** is the detected application name. 34 35 * **Infrastructure** is currently hardcoded to be "aws" with the "simple" 36 flavor. A future version of Otto may do something more clever here. 37 38 ## Merging 39 40 If an explicitly written Appfile is missing any sections, then Otto merges 41 it with the detected defaults. For example, the following is a completely 42 valid Appfile: 43 44 ``` 45 application { 46 name = "my-app" 47 } 48 ``` 49 50 Despite "type" missing, project configuration, and infrastructure 51 configuration, the above is a valid Appfile. This is because Otto will merge 52 this with the detected properties. Any explicitly written configurations 53 will take priority and overwrite any detected properties.