Permalink
Browse files

init

  • Loading branch information...
adamwiggins committed Jun 3, 2011
0 parents commit 2b06e7deabb64bb759f9fc6f4d9b6fcc546921bb
Showing with 130 additions and 0 deletions.
  1. +5 −0 Gemfile
  2. +25 −0 Gemfile.lock
  3. +1 −0 Procfile
  4. +12 −0 content/abstract.md
  5. +35 −0 content/toc.md
  6. +4 −0 content/who.md
  7. +2 −0 public/style.css
  8. +16 −0 views/home.erb
  9. +17 −0 views/layout.erb
  10. +13 −0 web.rb
@@ -0,0 +1,5 @@
+source 'http://rubygems.org'
+
+gem 'sinatra', '1.2.6'
+gem 'thin', '1.2.7'
+gem 'maruku', '0.6.0'
@@ -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)
@@ -0,0 +1 @@
+web: bundle exec ruby web.rb -p $PORT
@@ -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).
@@ -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
@@ -0,0 +1,4 @@
+Who should read this document?
+==============================
+
+Any developer building applications run as a service.
@@ -0,0 +1,2 @@
+body {
+}
@@ -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>
@@ -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 web.rb
@@ -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

0 comments on commit 2b06e7d

Please sign in to comment.