{"action":"created","comment":{"url":"https://api.github.com/repos/azavea/raster-foundry/pulls/comments/72994453","id":72994453,"diff_hunk":"@@ -0,0 +1,61 @@\n+\n+server {\n+    listen 80;\n+    server_name staging.rasterfoundry.com rasterfoundry.com;\n+    return 301 https://$host$request_uri;\n+}\n+\n+map $http_x_forwarded_proto $policy {\n+    default \"\";\n+    https   \"default-src https: data: blob: 'unsafe-inline' 'unsafe-eval'\";\n+}\n+\n+upstream app-server-upstream {\n+    server app-server:9000;\n+}\n+\n+server {\n+    listen 443 default_server;\n+    server_name staging.rasterfoundry.com rasterfoundry.com localhost;\n+\n+    # A set of recommended security headers:\n+    #\n+    #   https://scotthelme.co.uk/hardening-your-http-response-headers/\n+    #\n+    add_header Strict-Transport-Security \"max-age=15552000; preload\" always;\n+    add_header Content-Security-Policy $policy always;\n+    add_header X-Content-Type-Options \"nosniff\" always;\n+    add_header X-Frame-Options \"SAMEORIGIN\" always;\n+    add_header X-XSS-Protection \"1; mode=block\" always;\n+\n+    # Akka-Http API\n+    location /api {\n+        proxy_set_header Host $http_host;\n+        proxy_set_header X-Forwarded-For $remote_addr;\n+        proxy_redirect off;\n+\n+        proxy_pass http://app-server-upstream;\n+    }\n+\n+    # Health check\n+    location = /healthcheck/ {\n+        proxy_set_header Host $http_host;\n+        proxy_set_header X-Forwarded-For $remote_addr;\n+        proxy_redirect off;\n+\n+        proxy_pass http://app-server-upstream;\n+    }\n+\n+    # Static Assets\n+    location / {\n+        root /srv/dist;\n+        index index.json index.html;\n+\n+        proxy_set_header Host $http_host;","path":"nginx/etc/nginx/conf.d/default.conf","position":54,"original_position":54,"commit_id":"3ff8b249efc0ebfa54bd6dc50d09fda3e9f8c7ad","original_commit_id":"3ff8b249efc0ebfa54bd6dc50d09fda3e9f8c7ad","user":{"login":"hectcastro","id":43639,"avatar_url":"https://avatars.githubusercontent.com/u/43639?v=3","gravatar_id":"","url":"https://api.github.com/users/hectcastro","html_url":"https://github.com/hectcastro","followers_url":"https://api.github.com/users/hectcastro/followers","following_url":"https://api.github.com/users/hectcastro/following{/other_user}","gists_url":"https://api.github.com/users/hectcastro/gists{/gist_id}","starred_url":"https://api.github.com/users/hectcastro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hectcastro/subscriptions","organizations_url":"https://api.github.com/users/hectcastro/orgs","repos_url":"https://api.github.com/users/hectcastro/repos","events_url":"https://api.github.com/users/hectcastro/events{/privacy}","received_events_url":"https://api.github.com/users/hectcastro/received_events","type":"User","site_admin":false},"body":"I'm not sure these need to be here, right? No `proxy_pass` being set in this block.","created_at":"2016-08-01T15:08:02Z","updated_at":"2016-08-01T15:08:02Z","html_url":"https://github.com/azavea/raster-foundry/pull/404#discussion_r72994453","pull_request_url":"https://api.github.com/repos/azavea/raster-foundry/pulls/404","_links":{"self":{"href":"https://api.github.com/repos/azavea/raster-foundry/pulls/comments/72994453"},"html":{"href":"https://github.com/azavea/raster-foundry/pull/404#discussion_r72994453"},"pull_request":{"href":"https://api.github.com/repos/azavea/raster-foundry/pulls/404"}}},"pull_request":{"url":"https://api.github.com/repos/azavea/raster-foundry/pulls/404","id":79219671,"html_url":"https://github.com/azavea/raster-foundry/pull/404","diff_url":"https://github.com/azavea/raster-foundry/pull/404.diff","patch_url":"https://github.com/azavea/raster-foundry/pull/404.patch","issue_url":"https://api.github.com/repos/azavea/raster-foundry/issues/404","number":404,"state":"open","locked":false,"title":"Add development setup for front-end","user":{"login":"notthatbreezy","id":898060,"avatar_url":"https://avatars.githubusercontent.com/u/898060?v=3","gravatar_id":"","url":"https://api.github.com/users/notthatbreezy","html_url":"https://github.com/notthatbreezy","followers_url":"https://api.github.com/users/notthatbreezy/followers","following_url":"https://api.github.com/users/notthatbreezy/following{/other_user}","gists_url":"https://api.github.com/users/notthatbreezy/gists{/gist_id}","starred_url":"https://api.github.com/users/notthatbreezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notthatbreezy/subscriptions","organizations_url":"https://api.github.com/users/notthatbreezy/orgs","repos_url":"https://api.github.com/users/notthatbreezy/repos","events_url":"https://api.github.com/users/notthatbreezy/events{/privacy}","received_events_url":"https://api.github.com/users/notthatbreezy/received_events","type":"User","site_admin":false},"body":"This commit adds additional setup for frontend development in the\r\nfollowing ways:\r\n - adds an nginx container that serves static assets and proxies to\r\n application server/api/healthcheck\r\n - installs frontend dependencies and caches them in a ./node_modules\r\n directory so that tests and static assets can be build\r\n - adds a docker-compose configuration to run frontend commands and run\r\n builds and tests inside the container\r\n - adds development instructions for frontend development\r\n - adds running of frontend tests to `./scripts/test`\r\n\r\n## Testing\r\n- Provision vagrant VM (either `vagrant provision` or `vagrant up --provision`)\r\n- SSH into vm and start server (`./scripts/server`)\r\n- Outside the VM start `webpack-dev-server` from the `app-frontend` directory (`npm start`)\r\n- Browse to [http://localhost:9090](http://localhost:9090) and verify application loads\r\n- Browse to [http://localhost:9090/healthcheck/](http://localhost:9090/healthcheck/) and verify that healthcheck request is proxied correctly\r\n- Browse to [http://localhost:9100](http://localhost:9100) and verify that bundled assets are served correctly\r\n- Browse to [http://localhost:9100/healthcheck/](http://localhost:9100/healthcheck/) and verify that healthcheck requests are routed properly\r\n- From within the VM stop the server (`ctrl-c`) and run tests, verifying that tests run for the frontend `./scripts/test`","created_at":"2016-07-28T15:43:37Z","updated_at":"2016-08-01T15:08:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"133e7f825486cd81112c132035cd779ffeb2f209","assignee":{"login":"hectcastro","id":43639,"avatar_url":"https://avatars.githubusercontent.com/u/43639?v=3","gravatar_id":"","url":"https://api.github.com/users/hectcastro","html_url":"https://github.com/hectcastro","followers_url":"https://api.github.com/users/hectcastro/followers","following_url":"https://api.github.com/users/hectcastro/following{/other_user}","gists_url":"https://api.github.com/users/hectcastro/gists{/gist_id}","starred_url":"https://api.github.com/users/hectcastro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hectcastro/subscriptions","organizations_url":"https://api.github.com/users/hectcastro/orgs","repos_url":"https://api.github.com/users/hectcastro/repos","events_url":"https://api.github.com/users/hectcastro/events{/privacy}","received_events_url":"https://api.github.com/users/hectcastro/received_events","type":"User","site_admin":false},"assignees":[{"login":"hectcastro","id":43639,"avatar_url":"https://avatars.githubusercontent.com/u/43639?v=3","gravatar_id":"","url":"https://api.github.com/users/hectcastro","html_url":"https://github.com/hectcastro","followers_url":"https://api.github.com/users/hectcastro/followers","following_url":"https://api.github.com/users/hectcastro/following{/other_user}","gists_url":"https://api.github.com/users/hectcastro/gists{/gist_id}","starred_url":"https://api.github.com/users/hectcastro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hectcastro/subscriptions","organizations_url":"https://api.github.com/users/hectcastro/orgs","repos_url":"https://api.github.com/users/hectcastro/repos","events_url":"https://api.github.com/users/hectcastro/events{/privacy}","received_events_url":"https://api.github.com/users/hectcastro/received_events","type":"User","site_admin":false},{"login":"Lknechtli","id":4392704,"avatar_url":"https://avatars.githubusercontent.com/u/4392704?v=3","gravatar_id":"","url":"https://api.github.com/users/Lknechtli","html_url":"https://github.com/Lknechtli","followers_url":"https://api.github.com/users/Lknechtli/followers","following_url":"https://api.github.com/users/Lknechtli/following{/other_user}","gists_url":"https://api.github.com/users/Lknechtli/gists{/gist_id}","starred_url":"https://api.github.com/users/Lknechtli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lknechtli/subscriptions","organizations_url":"https://api.github.com/users/Lknechtli/orgs","repos_url":"https://api.github.com/users/Lknechtli/repos","events_url":"https://api.github.com/users/Lknechtli/events{/privacy}","received_events_url":"https://api.github.com/users/Lknechtli/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/azavea/raster-foundry/pulls/404/commits","review_comments_url":"https://api.github.com/repos/azavea/raster-foundry/pulls/404/comments","review_comment_url":"https://api.github.com/repos/azavea/raster-foundry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azavea/raster-foundry/issues/404/comments","statuses_url":"https://api.github.com/repos/azavea/raster-foundry/statuses/3ff8b249efc0ebfa54bd6dc50d09fda3e9f8c7ad","head":{"label":"azavea:feature/docker-dev-frontend","ref":"feature/docker-dev-frontend","sha":"3ff8b249efc0ebfa54bd6dc50d09fda3e9f8c7ad","user":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":36464140,"name":"raster-foundry","full_name":"azavea/raster-foundry","owner":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azavea/raster-foundry","description":"The Raster Foundry web application.","fork":false,"url":"https://api.github.com/repos/azavea/raster-foundry","forks_url":"https://api.github.com/repos/azavea/raster-foundry/forks","keys_url":"https://api.github.com/repos/azavea/raster-foundry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/raster-foundry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/raster-foundry/teams","hooks_url":"https://api.github.com/repos/azavea/raster-foundry/hooks","issue_events_url":"https://api.github.com/repos/azavea/raster-foundry/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/raster-foundry/events","assignees_url":"https://api.github.com/repos/azavea/raster-foundry/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/raster-foundry/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/raster-foundry/tags","blobs_url":"https://api.github.com/repos/azavea/raster-foundry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/raster-foundry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/raster-foundry/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/raster-foundry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/raster-foundry/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/raster-foundry/languages","stargazers_url":"https://api.github.com/repos/azavea/raster-foundry/stargazers","contributors_url":"https://api.github.com/repos/azavea/raster-foundry/contributors","subscribers_url":"https://api.github.com/repos/azavea/raster-foundry/subscribers","subscription_url":"https://api.github.com/repos/azavea/raster-foundry/subscription","commits_url":"https://api.github.com/repos/azavea/raster-foundry/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/raster-foundry/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/raster-foundry/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/raster-foundry/issues/comments{/number}","contents_url":"https://api.github.com/repos/azavea/raster-foundry/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/raster-foundry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/raster-foundry/merges","archive_url":"https://api.github.com/repos/azavea/raster-foundry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/raster-foundry/downloads","issues_url":"https://api.github.com/repos/azavea/raster-foundry/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/raster-foundry/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/raster-foundry/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/raster-foundry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/raster-foundry/labels{/name}","releases_url":"https://api.github.com/repos/azavea/raster-foundry/releases{/id}","deployments_url":"https://api.github.com/repos/azavea/raster-foundry/deployments","created_at":"2015-05-28T20:25:45Z","updated_at":"2016-07-18T16:12:22Z","pushed_at":"2016-07-29T16:08:14Z","git_url":"git://github.com/azavea/raster-foundry.git","ssh_url":"git@github.com:azavea/raster-foundry.git","clone_url":"https://github.com/azavea/raster-foundry.git","svn_url":"https://github.com/azavea/raster-foundry","homepage":"","size":13448,"stargazers_count":5,"watchers_count":5,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":23,"forks":8,"open_issues":23,"watchers":5,"default_branch":"develop"}},"base":{"label":"azavea:develop","ref":"develop","sha":"cffa5a435859e0a0f5cb37048b606033ee566e1d","user":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":36464140,"name":"raster-foundry","full_name":"azavea/raster-foundry","owner":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azavea/raster-foundry","description":"The Raster Foundry web application.","fork":false,"url":"https://api.github.com/repos/azavea/raster-foundry","forks_url":"https://api.github.com/repos/azavea/raster-foundry/forks","keys_url":"https://api.github.com/repos/azavea/raster-foundry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/raster-foundry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/raster-foundry/teams","hooks_url":"https://api.github.com/repos/azavea/raster-foundry/hooks","issue_events_url":"https://api.github.com/repos/azavea/raster-foundry/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/raster-foundry/events","assignees_url":"https://api.github.com/repos/azavea/raster-foundry/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/raster-foundry/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/raster-foundry/tags","blobs_url":"https://api.github.com/repos/azavea/raster-foundry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/raster-foundry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/raster-foundry/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/raster-foundry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/raster-foundry/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/raster-foundry/languages","stargazers_url":"https://api.github.com/repos/azavea/raster-foundry/stargazers","contributors_url":"https://api.github.com/repos/azavea/raster-foundry/contributors","subscribers_url":"https://api.github.com/repos/azavea/raster-foundry/subscribers","subscription_url":"https://api.github.com/repos/azavea/raster-foundry/subscription","commits_url":"https://api.github.com/repos/azavea/raster-foundry/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/raster-foundry/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/raster-foundry/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/raster-foundry/issues/comments{/number}","contents_url":"https://api.github.com/repos/azavea/raster-foundry/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/raster-foundry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/raster-foundry/merges","archive_url":"https://api.github.com/repos/azavea/raster-foundry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/raster-foundry/downloads","issues_url":"https://api.github.com/repos/azavea/raster-foundry/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/raster-foundry/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/raster-foundry/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/raster-foundry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/raster-foundry/labels{/name}","releases_url":"https://api.github.com/repos/azavea/raster-foundry/releases{/id}","deployments_url":"https://api.github.com/repos/azavea/raster-foundry/deployments","created_at":"2015-05-28T20:25:45Z","updated_at":"2016-07-18T16:12:22Z","pushed_at":"2016-07-29T16:08:14Z","git_url":"git://github.com/azavea/raster-foundry.git","ssh_url":"git@github.com:azavea/raster-foundry.git","clone_url":"https://github.com/azavea/raster-foundry.git","svn_url":"https://github.com/azavea/raster-foundry","homepage":"","size":13448,"stargazers_count":5,"watchers_count":5,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":23,"forks":8,"open_issues":23,"watchers":5,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/azavea/raster-foundry/pulls/404"},"html":{"href":"https://github.com/azavea/raster-foundry/pull/404"},"issue":{"href":"https://api.github.com/repos/azavea/raster-foundry/issues/404"},"comments":{"href":"https://api.github.com/repos/azavea/raster-foundry/issues/404/comments"},"review_comments":{"href":"https://api.github.com/repos/azavea/raster-foundry/pulls/404/comments"},"review_comment":{"href":"https://api.github.com/repos/azavea/raster-foundry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azavea/raster-foundry/pulls/404/commits"},"statuses":{"href":"https://api.github.com/repos/azavea/raster-foundry/statuses/3ff8b249efc0ebfa54bd6dc50d09fda3e9f8c7ad"}}}}
{"actor":{"display_login":"hectcastro"}}