mirror of
https://github.com/kennethreitz/12factor.git
synced 2026-06-05 23:10:17 +00:00
first factor page
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
Repo | One code repo, many deploys
|
||||
==================================
|
||||
|
||||
A twelve-factor app is always tracked in a version control system, with the tracked code history known as a *code reposistory*, often shortened to *code repo* or just *repo*.
|
||||
|
||||
There is always a one-to-one correlation between the repo and the app. If there are multiple code repos, it's not an app - it's a distributed system. Multiple apps sharing the same code is a violation of twelve-factor and generally poor practice. In the latter case, the better approach is to factor shared code libraries which can be included through the [dependency manager](#).
|
||||
|
||||
There is only one repo per app, but there will be many deploys of the app. A *deploy* is a running instance of the app. This is typically one production site, and one or more staging sites. Every developer working on the app has their own local version which also qualifies as a deploy, though one visible only to that developer and only useful for editing the app's code.
|
||||
|
||||
The repo is the same across all deploys, although different versions may be active in each deploy. For example, a developer has some commits not yet deployed to staging; staging has some commits not yet deployed to production. But they all share the same revision history tree.
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
The Twelve Factors
|
||||
==================
|
||||
|
||||
## I. Repo
|
||||
## [I. Repo](/repo)
|
||||
### One code repo, many deploys
|
||||
|
||||
## II. Dependencies
|
||||
|
||||
+11
-1
@@ -21,6 +21,10 @@ header {
|
||||
box-shadow: 0px 2px 12px #888;
|
||||
margin-bottom: 12pt;
|
||||
}
|
||||
header a {
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
section {
|
||||
padding-left: 64pt;
|
||||
@@ -49,6 +53,13 @@ section#toc h1 {
|
||||
section#toc h2 {
|
||||
margin-top: 12pt;
|
||||
}
|
||||
section#toc h2 a {
|
||||
text-decoration: none;
|
||||
color: #000;
|
||||
}
|
||||
section#toc h2 a:hover {
|
||||
color: #337;
|
||||
}
|
||||
section#toc h3 {
|
||||
font-weight: normal;
|
||||
}
|
||||
@@ -57,7 +68,6 @@ footer {
|
||||
color: #444;
|
||||
font-size: 12pt;
|
||||
background: #000;
|
||||
box-shadow: 0px -2px 12px #888;
|
||||
height: 48pt;
|
||||
padding-top: 64pt;
|
||||
padding-left: 64pt;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<section>
|
||||
<article>
|
||||
<%= render_markdown(@factor) %>
|
||||
</article>
|
||||
</section>
|
||||
+15
-21
@@ -1,26 +1,20 @@
|
||||
<header>
|
||||
<h1>The Twelve-Factor App</h1>
|
||||
</header>
|
||||
<section id="abstract">
|
||||
<article>
|
||||
<%= render_markdown('abstract') %>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<div id="main" role="main">
|
||||
<section id="abstract">
|
||||
<article>
|
||||
<%= render_markdown('abstract') %>
|
||||
</article>
|
||||
</section>
|
||||
<section id="who">
|
||||
<article>
|
||||
<%= render_markdown('who') %>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section id="who">
|
||||
<article>
|
||||
<%= render_markdown('who') %>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section id="toc">
|
||||
<article>
|
||||
<%= render_markdown('toc') %>
|
||||
<article>
|
||||
</section>
|
||||
</div>
|
||||
<section id="toc">
|
||||
<article>
|
||||
<%= render_markdown('toc') %>
|
||||
<article>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<div>Copyright © <%= Time.now.year %> Adam Wiggins</div>
|
||||
|
||||
+5
-1
@@ -15,6 +15,10 @@
|
||||
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
<header>
|
||||
<h1><a href="/">The Twelve-Factor App</a></h1>
|
||||
</header>
|
||||
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user