{"action":"created","comment":{"url":"https://api.github.com/repos/git/git-scm.com/pulls/comments/172600190","pull_request_review_id":101644896,"id":172600190,"diff_hunk":"@@ -0,0 +1,132 @@\n+# git-scm.com architecture\n+\n+This document describes the general setup and architecture that runs the\n+git-scm.com site. The idea is to document all the moving parts that\n+_aren't_ checked in to this repository. That may help new people joining\n+the project to help out, as well provide some continuity in case the\n+maintainer is hit by a bus.\n+\n+## Content\n+\n+Though the site is a rails app, it can _mostly_ be thought of a serving\n+static content. It's just that we suck in that static content and\n+pre-process it using nightly scheduled jobs. We never write anything to\n+the database on behalf of user requests.\n+\n+The content is a mix of:\n+\n+  - actual static content in this repository\n+\n+  - community book content brought in from https://github.com/progit2;\n+    see the `lib/tasks/book2.rake` file.\n+\n+  - manpages from releases of the git project, imported and formatted\n+    via asciidoctor; see the `lib/tasks/index.rake` task.\n+\n+\n+## Heroku\n+\n+The app itself is served by Heroku. The app name is `git-scm` (so you\n+can visit it directly as https://git-scm.herokuapp.com). The site is\n+owned by the git-scm.com team. If you want to be involved in managing\n+uptime/deploys/etc, you'll need a Heroku account and request to be added\n+to that team. The git-scm team receives credits from Heroku so that the\n+hosting is free.\n+\n+We use a few Heroku add-ons:\n+\n+  - Bonsai elasticsearch (see below)\n+\n+  - Heroku Postgres as the database\n+\n+  - Heroku Redis for rails caching\n+\n+  - Heroku scheduler for cron jobs\n+\n+The nightly scheduled jobs are:\n+\n+  - `rake downloads` (pick up newly released git versions)\n+\n+  - `rake preindex` (pull in and format manpages for released git\n+    versions)\n+\n+  - `rake remote_genbook2` (pull in and format progit2 book content,\n+    including translations)\n+\n+It should be safe to run any of those jobs more frequently. E.g., if you\n+know there's a new Git release out, then:\n+\n+    heroku run rake preindex\n+    heroku run rake downloads\n+\n+will get it on the site without waiting for the nightly run.\n+\n+Merges to the `master` branch on GitHub auto-deploy to Heroku, so unless\n+you're doing something tricky you generally shouldn't need to manually\n+deploy.\n+\n+Note that some of the formatting of manpages and book content happens\n+when they are imported by the rake tasks. So after fixing some\n+formatting and deploying, the rake jobs may need to be re-run with a\n+special flag to re-import (see the individual tasks for details).\n+\n+\n+## Cloudflare\n+\n+We get enough requests that it's easy to overwhelm the single Heroku\n+dyno. So we have Cloudflare sitting in front of it, aggressively caching\n+everything. That also should make the site faster to serve to regions\n+far away from Heroku's servers.\n+\n+The Cloudflare setup is mostly pretty simple:\n+\n+ - they serve DNS for the whole domain (that's where they insert the CDN\n+   magic)\n+\n+ - Cloudflare provides `https://` support to the user. Obviously the\n+   site is totally open and doesn't have any sensitive data, so this is\n+   really more about integrity. The certificate is generated by\n+   Cloudflare (and requires SNI on the browser side).\n+\n+ - the Cloudflare connection to Heroku is passed over TLS; they provide an\n+   \"internal\" certificate that we ask Heroku to use, so the connection\n+   is secured between the two (again, mostly for integrity)\n+\n+ - the most exotic config is that we use \"page rules\" to mark the whole\n+   site to be cached aggressively, regardless of any caching headers\n+   sent from Heroku. This is a bit of a hack, but there's very little on\n+   the site that can't be cached (which is perhaps a sign that the rails\n+   setup needs to be tweaked to send more reasonable caching headers,\n+   but this has been simple and effective so far).\n+","path":"ARCHITECTURE.md","position":101,"original_position":101,"commit_id":"26fb61479ac92a4690de326e129e21b69ccb0916","original_commit_id":"26fb61479ac92a4690de326e129e21b69ccb0916","user":{"login":"pedrorijo91","id":1999050,"avatar_url":"https://avatars2.githubusercontent.com/u/1999050?v=4","gravatar_id":"","url":"https://api.github.com/users/pedrorijo91","html_url":"https://github.com/pedrorijo91","followers_url":"https://api.github.com/users/pedrorijo91/followers","following_url":"https://api.github.com/users/pedrorijo91/following{/other_user}","gists_url":"https://api.github.com/users/pedrorijo91/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrorijo91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrorijo91/subscriptions","organizations_url":"https://api.github.com/users/pedrorijo91/orgs","repos_url":"https://api.github.com/users/pedrorijo91/repos","events_url":"https://api.github.com/users/pedrorijo91/events{/privacy}","received_events_url":"https://api.github.com/users/pedrorijo91/received_events","type":"User","site_admin":false},"body":"should we mention the /downloads/win (or something similar) exception we did some time ago due to the windows version auto detection?","created_at":"2018-03-06T17:41:25Z","updated_at":"2018-03-06T17:42:52Z","html_url":"https://github.com/git/git-scm.com/pull/1171#discussion_r172600190","pull_request_url":"https://api.github.com/repos/git/git-scm.com/pulls/1171","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/git/git-scm.com/pulls/comments/172600190"},"html":{"href":"https://github.com/git/git-scm.com/pull/1171#discussion_r172600190"},"pull_request":{"href":"https://api.github.com/repos/git/git-scm.com/pulls/1171"}}},"pull_request":{"url":"https://api.github.com/repos/git/git-scm.com/pulls/1171","id":173219125,"html_url":"https://github.com/git/git-scm.com/pull/1171","diff_url":"https://github.com/git/git-scm.com/pull/1171.diff","patch_url":"https://github.com/git/git-scm.com/pull/1171.patch","issue_url":"https://api.github.com/repos/git/git-scm.com/issues/1171","number":1171,"state":"open","locked":false,"title":"add architecture document","user":{"login":"peff","id":45925,"avatar_url":"https://avatars2.githubusercontent.com/u/45925?v=4","gravatar_id":"","url":"https://api.github.com/users/peff","html_url":"https://github.com/peff","followers_url":"https://api.github.com/users/peff/followers","following_url":"https://api.github.com/users/peff/following{/other_user}","gists_url":"https://api.github.com/users/peff/gists{/gist_id}","starred_url":"https://api.github.com/users/peff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peff/subscriptions","organizations_url":"https://api.github.com/users/peff/orgs","repos_url":"https://api.github.com/users/peff/repos","events_url":"https://api.github.com/users/peff/events{/privacy}","received_events_url":"https://api.github.com/users/peff/received_events","type":"User","site_admin":true},"body":"There's a fair bit of network setup and accounts that exist outside of this repository. Let's try to give an overview that might help somebody at least know where to look to fix something.\r\n\r\nHopefully replaces https://github.com/orgs/git/teams/gitscm/discussions/3.\r\n\r\n/cc @pedrorijo91 ","created_at":"2018-03-06T16:56:48Z","updated_at":"2018-03-06T17:42:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cb29529a3562c0295b181fb276dedf915574c42","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/git/git-scm.com/pulls/1171/commits","review_comments_url":"https://api.github.com/repos/git/git-scm.com/pulls/1171/comments","review_comment_url":"https://api.github.com/repos/git/git-scm.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/git/git-scm.com/issues/1171/comments","statuses_url":"https://api.github.com/repos/git/git-scm.com/statuses/26fb61479ac92a4690de326e129e21b69ccb0916","head":{"label":"git:document-architecture","ref":"document-architecture","sha":"26fb61479ac92a4690de326e129e21b69ccb0916","user":{"login":"git","id":18133,"avatar_url":"https://avatars2.githubusercontent.com/u/18133?v=4","gravatar_id":"","url":"https://api.github.com/users/git","html_url":"https://github.com/git","followers_url":"https://api.github.com/users/git/followers","following_url":"https://api.github.com/users/git/following{/other_user}","gists_url":"https://api.github.com/users/git/gists{/gist_id}","starred_url":"https://api.github.com/users/git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/git/subscriptions","organizations_url":"https://api.github.com/users/git/orgs","repos_url":"https://api.github.com/users/git/repos","events_url":"https://api.github.com/users/git/events{/privacy}","received_events_url":"https://api.github.com/users/git/received_events","type":"Organization","site_admin":false},"repo":{"id":3662248,"name":"git-scm.com","full_name":"git/git-scm.com","owner":{"login":"git","id":18133,"avatar_url":"https://avatars2.githubusercontent.com/u/18133?v=4","gravatar_id":"","url":"https://api.github.com/users/git","html_url":"https://github.com/git","followers_url":"https://api.github.com/users/git/followers","following_url":"https://api.github.com/users/git/following{/other_user}","gists_url":"https://api.github.com/users/git/gists{/gist_id}","starred_url":"https://api.github.com/users/git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/git/subscriptions","organizations_url":"https://api.github.com/users/git/orgs","repos_url":"https://api.github.com/users/git/repos","events_url":"https://api.github.com/users/git/events{/privacy}","received_events_url":"https://api.github.com/users/git/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/git/git-scm.com","description":"The git-scm.com website. Note that this repository is only for the website; issues with git itself should go to https://git-scm.com/community.","fork":false,"url":"https://api.github.com/repos/git/git-scm.com","forks_url":"https://api.github.com/repos/git/git-scm.com/forks","keys_url":"https://api.github.com/repos/git/git-scm.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/git/git-scm.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/git/git-scm.com/teams","hooks_url":"https://api.github.com/repos/git/git-scm.com/hooks","issue_events_url":"https://api.github.com/repos/git/git-scm.com/issues/events{/number}","events_url":"https://api.github.com/repos/git/git-scm.com/events","assignees_url":"https://api.github.com/repos/git/git-scm.com/assignees{/user}","branches_url":"https://api.github.com/repos/git/git-scm.com/branches{/branch}","tags_url":"https://api.github.com/repos/git/git-scm.com/tags","blobs_url":"https://api.github.com/repos/git/git-scm.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/git/git-scm.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/git/git-scm.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/git/git-scm.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/git/git-scm.com/statuses/{sha}","languages_url":"https://api.github.com/repos/git/git-scm.com/languages","stargazers_url":"https://api.github.com/repos/git/git-scm.com/stargazers","contributors_url":"https://api.github.com/repos/git/git-scm.com/contributors","subscribers_url":"https://api.github.com/repos/git/git-scm.com/subscribers","subscription_url":"https://api.github.com/repos/git/git-scm.com/subscription","commits_url":"https://api.github.com/repos/git/git-scm.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/git/git-scm.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/git/git-scm.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/git/git-scm.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/git/git-scm.com/contents/{+path}","compare_url":"https://api.github.com/repos/git/git-scm.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/git/git-scm.com/merges","archive_url":"https://api.github.com/repos/git/git-scm.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/git/git-scm.com/downloads","issues_url":"https://api.github.com/repos/git/git-scm.com/issues{/number}","pulls_url":"https://api.github.com/repos/git/git-scm.com/pulls{/number}","milestones_url":"https://api.github.com/repos/git/git-scm.com/milestones{/number}","notifications_url":"https://api.github.com/repos/git/git-scm.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/git/git-scm.com/labels{/name}","releases_url":"https://api.github.com/repos/git/git-scm.com/releases{/id}","deployments_url":"https://api.github.com/repos/git/git-scm.com/deployments","created_at":"2012-03-08T17:16:41Z","updated_at":"2018-03-05T21:56:50Z","pushed_at":"2018-03-06T16:56:48Z","git_url":"git://github.com/git/git-scm.com.git","ssh_url":"git@github.com:git/git-scm.com.git","clone_url":"https://github.com/git/git-scm.com.git","svn_url":"https://github.com/git/git-scm.com","homepage":"https://git-scm.com/","size":74495,"stargazers_count":1592,"watchers_count":1592,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":773,"mirror_url":null,"archived":false,"open_issues_count":35,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":773,"open_issues":35,"watchers":1592,"default_branch":"master"}},"base":{"label":"git:master","ref":"master","sha":"9deb94728ac6c84d6f448f054f80f38d9c819a19","user":{"login":"git","id":18133,"avatar_url":"https://avatars2.githubusercontent.com/u/18133?v=4","gravatar_id":"","url":"https://api.github.com/users/git","html_url":"https://github.com/git","followers_url":"https://api.github.com/users/git/followers","following_url":"https://api.github.com/users/git/following{/other_user}","gists_url":"https://api.github.com/users/git/gists{/gist_id}","starred_url":"https://api.github.com/users/git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/git/subscriptions","organizations_url":"https://api.github.com/users/git/orgs","repos_url":"https://api.github.com/users/git/repos","events_url":"https://api.github.com/users/git/events{/privacy}","received_events_url":"https://api.github.com/users/git/received_events","type":"Organization","site_admin":false},"repo":{"id":3662248,"name":"git-scm.com","full_name":"git/git-scm.com","owner":{"login":"git","id":18133,"avatar_url":"https://avatars2.githubusercontent.com/u/18133?v=4","gravatar_id":"","url":"https://api.github.com/users/git","html_url":"https://github.com/git","followers_url":"https://api.github.com/users/git/followers","following_url":"https://api.github.com/users/git/following{/other_user}","gists_url":"https://api.github.com/users/git/gists{/gist_id}","starred_url":"https://api.github.com/users/git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/git/subscriptions","organizations_url":"https://api.github.com/users/git/orgs","repos_url":"https://api.github.com/users/git/repos","events_url":"https://api.github.com/users/git/events{/privacy}","received_events_url":"https://api.github.com/users/git/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/git/git-scm.com","description":"The git-scm.com website. Note that this repository is only for the website; issues with git itself should go to https://git-scm.com/community.","fork":false,"url":"https://api.github.com/repos/git/git-scm.com","forks_url":"https://api.github.com/repos/git/git-scm.com/forks","keys_url":"https://api.github.com/repos/git/git-scm.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/git/git-scm.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/git/git-scm.com/teams","hooks_url":"https://api.github.com/repos/git/git-scm.com/hooks","issue_events_url":"https://api.github.com/repos/git/git-scm.com/issues/events{/number}","events_url":"https://api.github.com/repos/git/git-scm.com/events","assignees_url":"https://api.github.com/repos/git/git-scm.com/assignees{/user}","branches_url":"https://api.github.com/repos/git/git-scm.com/branches{/branch}","tags_url":"https://api.github.com/repos/git/git-scm.com/tags","blobs_url":"https://api.github.com/repos/git/git-scm.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/git/git-scm.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/git/git-scm.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/git/git-scm.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/git/git-scm.com/statuses/{sha}","languages_url":"https://api.github.com/repos/git/git-scm.com/languages","stargazers_url":"https://api.github.com/repos/git/git-scm.com/stargazers","contributors_url":"https://api.github.com/repos/git/git-scm.com/contributors","subscribers_url":"https://api.github.com/repos/git/git-scm.com/subscribers","subscription_url":"https://api.github.com/repos/git/git-scm.com/subscription","commits_url":"https://api.github.com/repos/git/git-scm.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/git/git-scm.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/git/git-scm.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/git/git-scm.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/git/git-scm.com/contents/{+path}","compare_url":"https://api.github.com/repos/git/git-scm.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/git/git-scm.com/merges","archive_url":"https://api.github.com/repos/git/git-scm.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/git/git-scm.com/downloads","issues_url":"https://api.github.com/repos/git/git-scm.com/issues{/number}","pulls_url":"https://api.github.com/repos/git/git-scm.com/pulls{/number}","milestones_url":"https://api.github.com/repos/git/git-scm.com/milestones{/number}","notifications_url":"https://api.github.com/repos/git/git-scm.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/git/git-scm.com/labels{/name}","releases_url":"https://api.github.com/repos/git/git-scm.com/releases{/id}","deployments_url":"https://api.github.com/repos/git/git-scm.com/deployments","created_at":"2012-03-08T17:16:41Z","updated_at":"2018-03-05T21:56:50Z","pushed_at":"2018-03-06T16:56:48Z","git_url":"git://github.com/git/git-scm.com.git","ssh_url":"git@github.com:git/git-scm.com.git","clone_url":"https://github.com/git/git-scm.com.git","svn_url":"https://github.com/git/git-scm.com","homepage":"https://git-scm.com/","size":74495,"stargazers_count":1592,"watchers_count":1592,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":773,"mirror_url":null,"archived":false,"open_issues_count":35,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":773,"open_issues":35,"watchers":1592,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/git/git-scm.com/pulls/1171"},"html":{"href":"https://github.com/git/git-scm.com/pull/1171"},"issue":{"href":"https://api.github.com/repos/git/git-scm.com/issues/1171"},"comments":{"href":"https://api.github.com/repos/git/git-scm.com/issues/1171/comments"},"review_comments":{"href":"https://api.github.com/repos/git/git-scm.com/pulls/1171/comments"},"review_comment":{"href":"https://api.github.com/repos/git/git-scm.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/git/git-scm.com/pulls/1171/commits"},"statuses":{"href":"https://api.github.com/repos/git/git-scm.com/statuses/26fb61479ac92a4690de326e129e21b69ccb0916"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pedrorijo91"}}