{"action":"created","comment":{"url":"https://api.github.com/repos/18F/federalist/pulls/comments/154729333","pull_request_review_id":80935954,"id":154729333,"diff_hunk":"@@ -59,29 +56,32 @@ This will be the file that holds your S3 and SQS configurations.\n     - `FEDERALIST_AWS_BUILD_KEY` is `accessKeyId`\n     - `FEDERALIST_SESSION_SECRET` is `secreyAccessKey`\n     - `FEDERALIST_SQS_QUEUE` is `queue`\n-1. Create Postgres databases by running\n-    - Run `createdb federalist`\n-    - Run `createdb federalist-test`\n-1. Great work! The Federalist app is now ready to run locally! :tada:\n-    - Run `yarn`\n-    - Run `yarn build`\n-    - Run `yarn start`\n-1. You should now be able to see Federalist running at http://localhost:1337/\n+1. Run `docker-compose build`.\n+1. Run `docker-compose run app yarn && docker-compose run app yarn build` to install dependencies and build the app initially.\n+1. Run `docker-compose up` to start the development environment.  You should now be able to see Federalist running at http://localhost:1337/. Local file changes will cause the server to restart and/or the front end bundles to be rebuilt.\n \n **Pro tips:**\n-- You can use `yarn watch` to automatically restart the server and rebuild front end assets on file change, which is useful for development.\n-- You can use `yarn test` to run local testing on the app.\n \n+In our Docker Compose environment, `app` is the name of the container where the Federalist web application runs. You can run any command in the context of the web application by running  `docker-compose run app <THE COMMAND>`.\n+\n+For example:\n+\n+- Use `docker-compose run --service-ports app yarn test` to run local testing on the app.\n+- Use `docker-compose run app yarn lint:diff` to check that your local changes meet our linting standards.\n+\n+Similarly you can run any command in the context of the database container `db` by running `docker-compose run db <THE COMMAND>`.\n+\n+Note that when using `docker-compose run`, the docker network will not be exposed to your local machine. If you do need the network available, run `docker-compose run --service-ports app <THE COMMAND>`.\n \n #### Build the server and the front-end\n \n-If you are working on the front-end of the application, the things you need to know are:\n+If you are working on the front end of the application, the things you need to know are:\n \n-1. It is a React based application\n+1. It is a React and Redux application\n 1. It is built with `webpack`\n 1. It lives in `/frontend`\n \n-To analyze the contents of the front end JavaScript bundle, use `yarn analyze-webpack` after a build. This will launch a browser window showing a visualization of all the code that makes up the bundle.\n+To analyze the contents of the front end JavaScript bundle, use `docker-compose run --service-ports app yarn analyze-webpack` after a build. Then visit http://127.0.0.1:8888 to see a visualization of the the bundle contents.","path":"README.md","position":70,"original_position":70,"commit_id":"6b397a7ee05e728c011a2ae892f1fd572f93816a","original_commit_id":"6b397a7ee05e728c011a2ae892f1fd572f93816a","user":{"login":"jseppi","id":697848,"avatar_url":"https://avatars2.githubusercontent.com/u/697848?v=4","gravatar_id":"","url":"https://api.github.com/users/jseppi","html_url":"https://github.com/jseppi","followers_url":"https://api.github.com/users/jseppi/followers","following_url":"https://api.github.com/users/jseppi/following{/other_user}","gists_url":"https://api.github.com/users/jseppi/gists{/gist_id}","starred_url":"https://api.github.com/users/jseppi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jseppi/subscriptions","organizations_url":"https://api.github.com/users/jseppi/orgs","repos_url":"https://api.github.com/users/jseppi/repos","events_url":"https://api.github.com/users/jseppi/events{/privacy}","received_events_url":"https://api.github.com/users/jseppi/received_events","type":"User","site_admin":false},"body":"This doesn't work yet. I think it is because I need to change the args to `webpack-bundle-analyzer` to use localhost instead of the 127.0.0.1 IP.","created_at":"2017-12-04T18:13:23Z","updated_at":"2017-12-04T18:14:04Z","html_url":"https://github.com/18F/federalist/pull/1323#discussion_r154729333","pull_request_url":"https://api.github.com/repos/18F/federalist/pulls/1323","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/18F/federalist/pulls/comments/154729333"},"html":{"href":"https://github.com/18F/federalist/pull/1323#discussion_r154729333"},"pull_request":{"href":"https://api.github.com/repos/18F/federalist/pulls/1323"}}},"pull_request":{"url":"https://api.github.com/repos/18F/federalist/pulls/1323","id":156267838,"html_url":"https://github.com/18F/federalist/pull/1323","diff_url":"https://github.com/18F/federalist/pull/1323.diff","patch_url":"https://github.com/18F/federalist/pull/1323.patch","issue_url":"https://api.github.com/repos/18F/federalist/issues/1323","number":1323,"state":"open","locked":false,"title":"Dockerize Federalist web app","user":{"login":"jseppi","id":697848,"avatar_url":"https://avatars2.githubusercontent.com/u/697848?v=4","gravatar_id":"","url":"https://api.github.com/users/jseppi","html_url":"https://github.com/jseppi","followers_url":"https://api.github.com/users/jseppi/followers","following_url":"https://api.github.com/users/jseppi/following{/other_user}","gists_url":"https://api.github.com/users/jseppi/gists{/gist_id}","starred_url":"https://api.github.com/users/jseppi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jseppi/subscriptions","organizations_url":"https://api.github.com/users/jseppi/orgs","repos_url":"https://api.github.com/users/jseppi/repos","events_url":"https://api.github.com/users/jseppi/events{/privacy}","received_events_url":"https://api.github.com/users/jseppi/received_events","type":"User","site_admin":false},"body":"Sets up this repository to use Docker Compose as the primary development environment.","created_at":"2017-12-04T18:09:54Z","updated_at":"2017-12-04T18:14:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"jseppi","id":697848,"avatar_url":"https://avatars2.githubusercontent.com/u/697848?v=4","gravatar_id":"","url":"https://api.github.com/users/jseppi","html_url":"https://github.com/jseppi","followers_url":"https://api.github.com/users/jseppi/followers","following_url":"https://api.github.com/users/jseppi/following{/other_user}","gists_url":"https://api.github.com/users/jseppi/gists{/gist_id}","starred_url":"https://api.github.com/users/jseppi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jseppi/subscriptions","organizations_url":"https://api.github.com/users/jseppi/orgs","repos_url":"https://api.github.com/users/jseppi/repos","events_url":"https://api.github.com/users/jseppi/events{/privacy}","received_events_url":"https://api.github.com/users/jseppi/received_events","type":"User","site_admin":false},"assignees":[{"login":"jseppi","id":697848,"avatar_url":"https://avatars2.githubusercontent.com/u/697848?v=4","gravatar_id":"","url":"https://api.github.com/users/jseppi","html_url":"https://github.com/jseppi","followers_url":"https://api.github.com/users/jseppi/followers","following_url":"https://api.github.com/users/jseppi/following{/other_user}","gists_url":"https://api.github.com/users/jseppi/gists{/gist_id}","starred_url":"https://api.github.com/users/jseppi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jseppi/subscriptions","organizations_url":"https://api.github.com/users/jseppi/orgs","repos_url":"https://api.github.com/users/jseppi/repos","events_url":"https://api.github.com/users/jseppi/events{/privacy}","received_events_url":"https://api.github.com/users/jseppi/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"jmhooper","id":963654,"avatar_url":"https://avatars1.githubusercontent.com/u/963654?v=4","gravatar_id":"","url":"https://api.github.com/users/jmhooper","html_url":"https://github.com/jmhooper","followers_url":"https://api.github.com/users/jmhooper/followers","following_url":"https://api.github.com/users/jmhooper/following{/other_user}","gists_url":"https://api.github.com/users/jmhooper/gists{/gist_id}","starred_url":"https://api.github.com/users/jmhooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmhooper/subscriptions","organizations_url":"https://api.github.com/users/jmhooper/orgs","repos_url":"https://api.github.com/users/jmhooper/repos","events_url":"https://api.github.com/users/jmhooper/events{/privacy}","received_events_url":"https://api.github.com/users/jmhooper/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/18F/federalist/pulls/1323/commits","review_comments_url":"https://api.github.com/repos/18F/federalist/pulls/1323/comments","review_comment_url":"https://api.github.com/repos/18F/federalist/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/federalist/issues/1323/comments","statuses_url":"https://api.github.com/repos/18F/federalist/statuses/6b397a7ee05e728c011a2ae892f1fd572f93816a","head":{"label":"18F:1229-dockerize","ref":"1229-dockerize","sha":"6b397a7ee05e728c011a2ae892f1fd572f93816a","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars0.githubusercontent.com/u/6233994?v=4","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":36463352,"name":"federalist","full_name":"18F/federalist","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars0.githubusercontent.com/u/6233994?v=4","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/federalist","description":"Federalist is a unified interface for publishing static government websites.","fork":false,"url":"https://api.github.com/repos/18F/federalist","forks_url":"https://api.github.com/repos/18F/federalist/forks","keys_url":"https://api.github.com/repos/18F/federalist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/federalist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/federalist/teams","hooks_url":"https://api.github.com/repos/18F/federalist/hooks","issue_events_url":"https://api.github.com/repos/18F/federalist/issues/events{/number}","events_url":"https://api.github.com/repos/18F/federalist/events","assignees_url":"https://api.github.com/repos/18F/federalist/assignees{/user}","branches_url":"https://api.github.com/repos/18F/federalist/branches{/branch}","tags_url":"https://api.github.com/repos/18F/federalist/tags","blobs_url":"https://api.github.com/repos/18F/federalist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/federalist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/federalist/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/federalist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/federalist/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/federalist/languages","stargazers_url":"https://api.github.com/repos/18F/federalist/stargazers","contributors_url":"https://api.github.com/repos/18F/federalist/contributors","subscribers_url":"https://api.github.com/repos/18F/federalist/subscribers","subscription_url":"https://api.github.com/repos/18F/federalist/subscription","commits_url":"https://api.github.com/repos/18F/federalist/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/federalist/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/federalist/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/federalist/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/federalist/contents/{+path}","compare_url":"https://api.github.com/repos/18F/federalist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/federalist/merges","archive_url":"https://api.github.com/repos/18F/federalist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/federalist/downloads","issues_url":"https://api.github.com/repos/18F/federalist/issues{/number}","pulls_url":"https://api.github.com/repos/18F/federalist/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/federalist/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/federalist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/federalist/labels{/name}","releases_url":"https://api.github.com/repos/18F/federalist/releases{/id}","deployments_url":"https://api.github.com/repos/18F/federalist/deployments","created_at":"2015-05-28T20:09:37Z","updated_at":"2017-12-04T14:43:03Z","pushed_at":"2017-12-04T18:09:54Z","git_url":"git://github.com/18F/federalist.git","ssh_url":"git@github.com:18F/federalist.git","clone_url":"https://github.com/18F/federalist.git","svn_url":"https://github.com/18F/federalist","homepage":"https://federalist.18f.gov/","size":11519,"stargazers_count":70,"watchers_count":70,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":147,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":18,"open_issues":147,"watchers":70,"default_branch":"staging"}},"base":{"label":"18F:staging","ref":"staging","sha":"ef1be1b61bd938d690285b391664a799fa408aa1","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars0.githubusercontent.com/u/6233994?v=4","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":36463352,"name":"federalist","full_name":"18F/federalist","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars0.githubusercontent.com/u/6233994?v=4","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/federalist","description":"Federalist is a unified interface for publishing static government websites.","fork":false,"url":"https://api.github.com/repos/18F/federalist","forks_url":"https://api.github.com/repos/18F/federalist/forks","keys_url":"https://api.github.com/repos/18F/federalist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/federalist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/federalist/teams","hooks_url":"https://api.github.com/repos/18F/federalist/hooks","issue_events_url":"https://api.github.com/repos/18F/federalist/issues/events{/number}","events_url":"https://api.github.com/repos/18F/federalist/events","assignees_url":"https://api.github.com/repos/18F/federalist/assignees{/user}","branches_url":"https://api.github.com/repos/18F/federalist/branches{/branch}","tags_url":"https://api.github.com/repos/18F/federalist/tags","blobs_url":"https://api.github.com/repos/18F/federalist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/federalist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/federalist/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/federalist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/federalist/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/federalist/languages","stargazers_url":"https://api.github.com/repos/18F/federalist/stargazers","contributors_url":"https://api.github.com/repos/18F/federalist/contributors","subscribers_url":"https://api.github.com/repos/18F/federalist/subscribers","subscription_url":"https://api.github.com/repos/18F/federalist/subscription","commits_url":"https://api.github.com/repos/18F/federalist/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/federalist/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/federalist/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/federalist/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/federalist/contents/{+path}","compare_url":"https://api.github.com/repos/18F/federalist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/federalist/merges","archive_url":"https://api.github.com/repos/18F/federalist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/federalist/downloads","issues_url":"https://api.github.com/repos/18F/federalist/issues{/number}","pulls_url":"https://api.github.com/repos/18F/federalist/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/federalist/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/federalist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/federalist/labels{/name}","releases_url":"https://api.github.com/repos/18F/federalist/releases{/id}","deployments_url":"https://api.github.com/repos/18F/federalist/deployments","created_at":"2015-05-28T20:09:37Z","updated_at":"2017-12-04T14:43:03Z","pushed_at":"2017-12-04T18:09:54Z","git_url":"git://github.com/18F/federalist.git","ssh_url":"git@github.com:18F/federalist.git","clone_url":"https://github.com/18F/federalist.git","svn_url":"https://github.com/18F/federalist","homepage":"https://federalist.18f.gov/","size":11519,"stargazers_count":70,"watchers_count":70,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":147,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":18,"open_issues":147,"watchers":70,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/federalist/pulls/1323"},"html":{"href":"https://github.com/18F/federalist/pull/1323"},"issue":{"href":"https://api.github.com/repos/18F/federalist/issues/1323"},"comments":{"href":"https://api.github.com/repos/18F/federalist/issues/1323/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/federalist/pulls/1323/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/federalist/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/federalist/pulls/1323/commits"},"statuses":{"href":"https://api.github.com/repos/18F/federalist/statuses/6b397a7ee05e728c011a2ae892f1fd572f93816a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jseppi"}}