{"action":"created","comment":{"url":"https://api.github.com/repos/12factor/12factor-br/pulls/comments/24983604","id":24983604,"diff_hunk":"@@ -0,0 +1,22 @@\n+## III. Configurações\n+### Armazene as configurações no ambiente\n+\n+A *configuração* de uma aplicação é tudo o que é provável variar entre [deploys](/codebase) (teste, produção, ambientes de desenvolvimento, etc). Isto inclui:\n+\n+* Recursos para a base de dados, Memcached, e outros [serviços de apoio](/backing-services)\n+* Credenciais para serviços externos como Amazon S3 ou Twitter\n+* Valores por deploy como o nome canônico do host para o deploy\n+\n+Aplicações as vezes armazenam as configurações no código como constantes. Isto é uma violação do twelve-factor, o que exige uma **estrita separação da configuração a partir do código**. Configuração varia substancialmente entre deploys, código não.\n+\n+A prova de fogo para saber se uma aplicação tem todas as configurãções corretamente consignadas fora do código é saber se a base de código poderia ser feita de código aberto a qualquer momento, sem comprometer as credenciais.\n+\n+Note que esta definição de \"configuração\" **não** inclui configuração interna da aplicação, como `config/routes.rb` em Rails, ou como [módulos de códigos são conectados](http://static.springsource.org/spring/docs/2.5.x/reference/beans.html) em [Spring](http://www.springsource.org/). Este tipo de configuração não varia entre deploys, e por isso é melhor que seja feito no código.\n+\n+Outra abordagem para configuração é o uso de arquivos de configuração que são verificados no controle de revisão, como `config/database.yml` em Rails. Isto é uma grande melhoria sobre o uso de constantes que são verificadas no repositório do código, mas ainda tem pontos fracos: é fácil de verificar por engano em um arquivo de configuração do repositório; há uma tendência para que os arquivos de configuração sejam espelhados em diferentes lugares e diferentes formatos, tornando-se difícil de ver e gerenciar todas as configurações em um só lugar. Além disso estes formatos tendem a ser específicos da liguagem ou framework.\n+\n+**A aplicação twelve-factor armazena configuração em *variáveis de ambiente*** (muitas vezes abreviadas para *env vars* ou *env*). Env vars são fáceis de mudar entre deploys sem alterar qualquer código. ao contrário de arquivos de confuguração, há pouca chance de serem verificados acidentalmente no repositório do código; e ao contrário dos arquivos de configuração personalizados, ou outros mecanismos de configuração como Propriedades do Sistema Java, eles são por padrão agnósticos a linguagem e ao SO. \n+\n+Outro aspecto do gerenciamento de configuração é o agrupamento. Às vezes, aplicações de configuração em lotes em grupos nomeados (muitas vezes chamadas de \"environments\") em homenagem a deploys específicos, tais como `development`, `test`, e `production` ambientes em Rails. Este método não escala de forma limpa: quanto mais deploys da aplicação são criados, novos nomes de ambiente são necessários, tais como `staging` ou `qa`. A medida que o projeto cresce ainda mais, desenvolvedores podem adicionar seus próprios ambientes especiais como `joes-staging`, resultando em uma explosão combinatória de configurações que torna o gerenciamento de deploys da aplicação muito frágil.\n+\n+Em uma aplicação twelve-factor, env vars são controles granulares, cada um totalmente ortogonal às outras env vars. Elas nunca são agrupadas como \"environments\", mas em vez disso são gerenciadas independente de cada deploy. Este é um modelo que escala sem problemas como a aplicação que se expande naturalmente em muitos deploys durante sua vida útil.","path":"content/pt_br/config.md","position":null,"original_position":22,"commit_id":"6c95afc7ec973986c2cafbcac447982f4026b15b","original_commit_id":"8427c4271cb05fd24ef0f32e25c1b768c94b0d40","user":{"login":"gwmoura","id":1118305,"avatar_url":"https://avatars.githubusercontent.com/u/1118305?v=3","gravatar_id":"","url":"https://api.github.com/users/gwmoura","html_url":"https://github.com/gwmoura","followers_url":"https://api.github.com/users/gwmoura/followers","following_url":"https://api.github.com/users/gwmoura/following{/other_user}","gists_url":"https://api.github.com/users/gwmoura/gists{/gist_id}","starred_url":"https://api.github.com/users/gwmoura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwmoura/subscriptions","organizations_url":"https://api.github.com/users/gwmoura/orgs","repos_url":"https://api.github.com/users/gwmoura/repos","events_url":"https://api.github.com/users/gwmoura/events{/privacy}","received_events_url":"https://api.github.com/users/gwmoura/received_events","type":"User","site_admin":false},"body":"No commit que fiz, já tem essa alteração ;)","created_at":"2015-02-19T12:21:43Z","updated_at":"2015-02-19T12:21:43Z","html_url":"https://github.com/12factor/12factor-br/pull/18#discussion_r24983604","pull_request_url":"https://api.github.com/repos/12factor/12factor-br/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/12factor/12factor-br/pulls/comments/24983604"},"html":{"href":"https://github.com/12factor/12factor-br/pull/18#discussion_r24983604"},"pull_request":{"href":"https://api.github.com/repos/12factor/12factor-br/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/12factor/12factor-br/pulls/18","id":28945204,"html_url":"https://github.com/12factor/12factor-br/pull/18","diff_url":"https://github.com/12factor/12factor-br/pull/18.diff","patch_url":"https://github.com/12factor/12factor-br/pull/18.patch","issue_url":"https://api.github.com/repos/12factor/12factor-br/issues/18","number":18,"state":"open","locked":false,"title":"Translate config.md","user":{"login":"gwmoura","id":1118305,"avatar_url":"https://avatars.githubusercontent.com/u/1118305?v=3","gravatar_id":"","url":"https://api.github.com/users/gwmoura","html_url":"https://github.com/gwmoura","followers_url":"https://api.github.com/users/gwmoura/followers","following_url":"https://api.github.com/users/gwmoura/following{/other_user}","gists_url":"https://api.github.com/users/gwmoura/gists{/gist_id}","starred_url":"https://api.github.com/users/gwmoura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwmoura/subscriptions","organizations_url":"https://api.github.com/users/gwmoura/orgs","repos_url":"https://api.github.com/users/gwmoura/repos","events_url":"https://api.github.com/users/gwmoura/events{/privacy}","received_events_url":"https://api.github.com/users/gwmoura/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-09T18:40:10Z","updated_at":"2015-02-19T12:21:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09b1345219420af4900a667fb7a859bf22b5edef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/12factor/12factor-br/pulls/18/commits","review_comments_url":"https://api.github.com/repos/12factor/12factor-br/pulls/18/comments","review_comment_url":"https://api.github.com/repos/12factor/12factor-br/pulls/comments/{number}","comments_url":"https://api.github.com/repos/12factor/12factor-br/issues/18/comments","statuses_url":"https://api.github.com/repos/12factor/12factor-br/statuses/6c95afc7ec973986c2cafbcac447982f4026b15b","head":{"label":"gwmoura:master","ref":"master","sha":"6c95afc7ec973986c2cafbcac447982f4026b15b","user":{"login":"gwmoura","id":1118305,"avatar_url":"https://avatars.githubusercontent.com/u/1118305?v=3","gravatar_id":"","url":"https://api.github.com/users/gwmoura","html_url":"https://github.com/gwmoura","followers_url":"https://api.github.com/users/gwmoura/followers","following_url":"https://api.github.com/users/gwmoura/following{/other_user}","gists_url":"https://api.github.com/users/gwmoura/gists{/gist_id}","starred_url":"https://api.github.com/users/gwmoura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwmoura/subscriptions","organizations_url":"https://api.github.com/users/gwmoura/orgs","repos_url":"https://api.github.com/users/gwmoura/repos","events_url":"https://api.github.com/users/gwmoura/events{/privacy}","received_events_url":"https://api.github.com/users/gwmoura/received_events","type":"User","site_admin":false},"repo":{"id":30551344,"name":"12factor-br","full_name":"gwmoura/12factor-br","owner":{"login":"gwmoura","id":1118305,"avatar_url":"https://avatars.githubusercontent.com/u/1118305?v=3","gravatar_id":"","url":"https://api.github.com/users/gwmoura","html_url":"https://github.com/gwmoura","followers_url":"https://api.github.com/users/gwmoura/followers","following_url":"https://api.github.com/users/gwmoura/following{/other_user}","gists_url":"https://api.github.com/users/gwmoura/gists{/gist_id}","starred_url":"https://api.github.com/users/gwmoura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwmoura/subscriptions","organizations_url":"https://api.github.com/users/gwmoura/orgs","repos_url":"https://api.github.com/users/gwmoura/repos","events_url":"https://api.github.com/users/gwmoura/events{/privacy}","received_events_url":"https://api.github.com/users/gwmoura/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gwmoura/12factor-br","description":"","fork":true,"url":"https://api.github.com/repos/gwmoura/12factor-br","forks_url":"https://api.github.com/repos/gwmoura/12factor-br/forks","keys_url":"https://api.github.com/repos/gwmoura/12factor-br/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gwmoura/12factor-br/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gwmoura/12factor-br/teams","hooks_url":"https://api.github.com/repos/gwmoura/12factor-br/hooks","issue_events_url":"https://api.github.com/repos/gwmoura/12factor-br/issues/events{/number}","events_url":"https://api.github.com/repos/gwmoura/12factor-br/events","assignees_url":"https://api.github.com/repos/gwmoura/12factor-br/assignees{/user}","branches_url":"https://api.github.com/repos/gwmoura/12factor-br/branches{/branch}","tags_url":"https://api.github.com/repos/gwmoura/12factor-br/tags","blobs_url":"https://api.github.com/repos/gwmoura/12factor-br/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gwmoura/12factor-br/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gwmoura/12factor-br/git/refs{/sha}","trees_url":"https://api.github.com/repos/gwmoura/12factor-br/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gwmoura/12factor-br/statuses/{sha}","languages_url":"https://api.github.com/repos/gwmoura/12factor-br/languages","stargazers_url":"https://api.github.com/repos/gwmoura/12factor-br/stargazers","contributors_url":"https://api.github.com/repos/gwmoura/12factor-br/contributors","subscribers_url":"https://api.github.com/repos/gwmoura/12factor-br/subscribers","subscription_url":"https://api.github.com/repos/gwmoura/12factor-br/subscription","commits_url":"https://api.github.com/repos/gwmoura/12factor-br/commits{/sha}","git_commits_url":"https://api.github.com/repos/gwmoura/12factor-br/git/commits{/sha}","comments_url":"https://api.github.com/repos/gwmoura/12factor-br/comments{/number}","issue_comment_url":"https://api.github.com/repos/gwmoura/12factor-br/issues/comments/{number}","contents_url":"https://api.github.com/repos/gwmoura/12factor-br/contents/{+path}","compare_url":"https://api.github.com/repos/gwmoura/12factor-br/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gwmoura/12factor-br/merges","archive_url":"https://api.github.com/repos/gwmoura/12factor-br/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gwmoura/12factor-br/downloads","issues_url":"https://api.github.com/repos/gwmoura/12factor-br/issues{/number}","pulls_url":"https://api.github.com/repos/gwmoura/12factor-br/pulls{/number}","milestones_url":"https://api.github.com/repos/gwmoura/12factor-br/milestones{/number}","notifications_url":"https://api.github.com/repos/gwmoura/12factor-br/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gwmoura/12factor-br/labels{/name}","releases_url":"https://api.github.com/repos/gwmoura/12factor-br/releases{/id}","created_at":"2015-02-09T18:34:08Z","updated_at":"2015-02-15T19:49:10Z","pushed_at":"2015-02-15T19:49:10Z","git_url":"git://github.com/gwmoura/12factor-br.git","ssh_url":"git@github.com:gwmoura/12factor-br.git","clone_url":"https://github.com/gwmoura/12factor-br.git","svn_url":"https://github.com/gwmoura/12factor-br","homepage":"http://www.12factor.net/","size":625,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"12factor:master","ref":"master","sha":"8e39ecb020a413e5446e41d478b93ad94f913f75","user":{"login":"12factor","id":8346497,"avatar_url":"https://avatars.githubusercontent.com/u/8346497?v=3","gravatar_id":"","url":"https://api.github.com/users/12factor","html_url":"https://github.com/12factor","followers_url":"https://api.github.com/users/12factor/followers","following_url":"https://api.github.com/users/12factor/following{/other_user}","gists_url":"https://api.github.com/users/12factor/gists{/gist_id}","starred_url":"https://api.github.com/users/12factor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/12factor/subscriptions","organizations_url":"https://api.github.com/users/12factor/orgs","repos_url":"https://api.github.com/users/12factor/repos","events_url":"https://api.github.com/users/12factor/events{/privacy}","received_events_url":"https://api.github.com/users/12factor/received_events","type":"Organization","site_admin":false},"repo":{"id":25173027,"name":"12factor-br","full_name":"12factor/12factor-br","owner":{"login":"12factor","id":8346497,"avatar_url":"https://avatars.githubusercontent.com/u/8346497?v=3","gravatar_id":"","url":"https://api.github.com/users/12factor","html_url":"https://github.com/12factor","followers_url":"https://api.github.com/users/12factor/followers","following_url":"https://api.github.com/users/12factor/following{/other_user}","gists_url":"https://api.github.com/users/12factor/gists{/gist_id}","starred_url":"https://api.github.com/users/12factor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/12factor/subscriptions","organizations_url":"https://api.github.com/users/12factor/orgs","repos_url":"https://api.github.com/users/12factor/repos","events_url":"https://api.github.com/users/12factor/events{/privacy}","received_events_url":"https://api.github.com/users/12factor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/12factor/12factor-br","description":"","fork":true,"url":"https://api.github.com/repos/12factor/12factor-br","forks_url":"https://api.github.com/repos/12factor/12factor-br/forks","keys_url":"https://api.github.com/repos/12factor/12factor-br/keys{/key_id}","collaborators_url":"https://api.github.com/repos/12factor/12factor-br/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/12factor/12factor-br/teams","hooks_url":"https://api.github.com/repos/12factor/12factor-br/hooks","issue_events_url":"https://api.github.com/repos/12factor/12factor-br/issues/events{/number}","events_url":"https://api.github.com/repos/12factor/12factor-br/events","assignees_url":"https://api.github.com/repos/12factor/12factor-br/assignees{/user}","branches_url":"https://api.github.com/repos/12factor/12factor-br/branches{/branch}","tags_url":"https://api.github.com/repos/12factor/12factor-br/tags","blobs_url":"https://api.github.com/repos/12factor/12factor-br/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/12factor/12factor-br/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/12factor/12factor-br/git/refs{/sha}","trees_url":"https://api.github.com/repos/12factor/12factor-br/git/trees{/sha}","statuses_url":"https://api.github.com/repos/12factor/12factor-br/statuses/{sha}","languages_url":"https://api.github.com/repos/12factor/12factor-br/languages","stargazers_url":"https://api.github.com/repos/12factor/12factor-br/stargazers","contributors_url":"https://api.github.com/repos/12factor/12factor-br/contributors","subscribers_url":"https://api.github.com/repos/12factor/12factor-br/subscribers","subscription_url":"https://api.github.com/repos/12factor/12factor-br/subscription","commits_url":"https://api.github.com/repos/12factor/12factor-br/commits{/sha}","git_commits_url":"https://api.github.com/repos/12factor/12factor-br/git/commits{/sha}","comments_url":"https://api.github.com/repos/12factor/12factor-br/comments{/number}","issue_comment_url":"https://api.github.com/repos/12factor/12factor-br/issues/comments/{number}","contents_url":"https://api.github.com/repos/12factor/12factor-br/contents/{+path}","compare_url":"https://api.github.com/repos/12factor/12factor-br/compare/{base}...{head}","merges_url":"https://api.github.com/repos/12factor/12factor-br/merges","archive_url":"https://api.github.com/repos/12factor/12factor-br/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/12factor/12factor-br/downloads","issues_url":"https://api.github.com/repos/12factor/12factor-br/issues{/number}","pulls_url":"https://api.github.com/repos/12factor/12factor-br/pulls{/number}","milestones_url":"https://api.github.com/repos/12factor/12factor-br/milestones{/number}","notifications_url":"https://api.github.com/repos/12factor/12factor-br/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/12factor/12factor-br/labels{/name}","releases_url":"https://api.github.com/repos/12factor/12factor-br/releases{/id}","created_at":"2014-10-13T19:01:17Z","updated_at":"2015-02-10T01:21:51Z","pushed_at":"2015-02-10T01:21:51Z","git_url":"git://github.com/12factor/12factor-br.git","ssh_url":"git@github.com:12factor/12factor-br.git","clone_url":"https://github.com/12factor/12factor-br.git","svn_url":"https://github.com/12factor/12factor-br","homepage":"http://www.12factor.net/","size":902,"stargazers_count":1,"watchers_count":1,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/12factor/12factor-br/pulls/18"},"html":{"href":"https://github.com/12factor/12factor-br/pull/18"},"issue":{"href":"https://api.github.com/repos/12factor/12factor-br/issues/18"},"comments":{"href":"https://api.github.com/repos/12factor/12factor-br/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/12factor/12factor-br/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/12factor/12factor-br/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/12factor/12factor-br/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/12factor/12factor-br/statuses/6c95afc7ec973986c2cafbcac447982f4026b15b"}}}}