This commit is contained in:
Adam Wiggins
2011-06-03 00:29:00 -07:00
commit 2b06e7deab
10 changed files with 130 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
source 'http://rubygems.org'
gem 'sinatra', '1.2.6'
gem 'thin', '1.2.7'
gem 'maruku', '0.6.0'
+25
View File
@@ -0,0 +1,25 @@
GEM
remote: http://rubygems.org/
specs:
daemons (1.1.3)
eventmachine (0.12.10)
maruku (0.6.0)
syntax (>= 1.0.0)
rack (1.3.0)
sinatra (1.2.6)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
syntax (1.0.0)
thin (1.2.7)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
tilt (1.3.2)
PLATFORMS
ruby
DEPENDENCIES
maruku (= 0.6.0)
sinatra (= 1.2.6)
thin (= 1.2.7)
+1
View File
@@ -0,0 +1 @@
web: bundle exec ruby web.rb -p $PORT
+12
View File
@@ -0,0 +1,12 @@
Abtract
=======
Modern software is almost always delivered as a service: called *web apps*, or *software-as-a-service*. The twelve-factor app is a methodology for building software-as-a-service apps that:
* Use declarative formats for setup automation, to minimize time and cost of a new developer joining the project;
* Have a clean contract with the underlying operating system, offering maximum portability between runtime environments;
* Are suitable for deployment on modern cloud platforms, obviating the need for servers and systems administration;
* Minimize divergence between development and production, enabling continuous deployment for maximum agility;
* And can scale up without significant changes to tooling, architecture, or development practices.
The twelve-factor methodology can be applied to apps written in any programming language, and which use any combination of backing services (database, queue, memory cache, etc).
+35
View File
@@ -0,0 +1,35 @@
The Twelve Factors
==================
## 0. Repo
### One code repo, many deploys
## 1. Dependencies
### Explicit dependency declaration and isolation
## 2. Config
### Store config in the environment
## 3. Backing Services
### Treat backing services as attached resources
## 4. Build, release, run
### Separate build and run stages
## 5. Processes
### Stateless, disposable processes handle application logic
## 6. Port binding
### Services exported via port binding
## 7. Concurrency
### Scale up via the process model
## 8. Dev/prod parity
### Parity between development and production
## 9. Logs
### Logs are event streams
## 10. Admin processes
### One-off admin/management tasks
+4
View File
@@ -0,0 +1,4 @@
Who should read this document?
==============================
Any developer building applications run as a service.
+2
View File
@@ -0,0 +1,2 @@
body {
}
+16
View File
@@ -0,0 +1,16 @@
<header>The Twelve-Factor App</header>
<div id="main" role="main">
<section id="abstract">
<%= render_markdown('abstract') %>
</section>
<section id="who">
<%= render_markdown('who') %>
</section>
<section id="toc">
<%= render_markdown('toc') %>
</section>
</div>
<footer>
</footer>
+17
View File
@@ -0,0 +1,17 @@
<!doctype html>
<head>
<meta charset="utf-8">
<title>The Twelve-Factor App</title>
<meta name="description" content="A methodology for building modern, scalable, maintainable software-as-a-service apps.">
<meta name="author" content="Adam Wiggins">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/favicon.ico">
<link rel="stylesheet" href="/style.css">
</head>
<body>
<%= yield %>
</body>
</html>
+13
View File
@@ -0,0 +1,13 @@
require 'sinatra'
require 'maruku'
get '/' do
erb :home
end
helpers do
def render_markdown(file)
markdown = File.read("content/#{file}.md")
Maruku.new(markdown).to_html
end
end