{"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/comments/55689173","id":55689173,"diff_hunk":"@@ -1,18 +1,13 @@\n-# This compose configuration is used for development only\n-# Currently we deploy to Heroku, which uses the Procfile and environment configured in Heroku UI to set up the app environment\n+# This is only used for development purposes. You can not use Docker Compose on Heroku.\n web:\n-    build: .\n-    volumes:\n-        - ./lib:/app/user/lib\n-        # Very useful to uncomment this to test obt integration\n-        # - ./../origami-build-tools:/app/user/node_modules/origami-build-tools\n-    working_dir: /app/user\n-\n-    # The -L flag to nodemon allows it to see changes in mounted filesystems\n-    command: \"nodemon -L -x 'node' index.js | ./node_modules/.bin/bunyan -o short\"\n-    ports:\n-        - \"8080:8080\"\n-    environment:\n-        PORT: 8080\n-        NODE_ENV: \"development\"\n-        LOG_LEVEL: \"trace\"\n+  build: .\n+  volumes:\n+    - \"./lib:/app/lib\"\n+    - \"./deprecated:/app/deprecated\"\n+  ports:\n+    - \"8080:8080\"\n+  environment:\n+    PORT: 8080\n+    NODE_ENV: \"development\"\n+    LOG_LEVEL: \"trace\"\n+  command: \"nodemon --legacy-watch index.js | ./node_modules/.bin/bunyan -o short\"","path":"docker-compose.yml","position":30,"original_position":30,"commit_id":"043e60c6b8dbe2a2eaeed08ab1abba99d03487b1","original_commit_id":"8f693eb03fbdee39369f68ac5f1a450db29b7c2c","user":{"login":"JakeChampion","id":1569131,"avatar_url":"https://avatars.githubusercontent.com/u/1569131?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeChampion","html_url":"https://github.com/JakeChampion","followers_url":"https://api.github.com/users/JakeChampion/followers","following_url":"https://api.github.com/users/JakeChampion/following{/other_user}","gists_url":"https://api.github.com/users/JakeChampion/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeChampion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeChampion/subscriptions","organizations_url":"https://api.github.com/users/JakeChampion/orgs","repos_url":"https://api.github.com/users/JakeChampion/repos","events_url":"https://api.github.com/users/JakeChampion/events{/privacy}","received_events_url":"https://api.github.com/users/JakeChampion/received_events","type":"User","site_admin":false},"body":"Yes, I think nodemon shouldn't be globally installed in the dockerfile and should instead a dev-dep and executed the way @matthew-andrews mentioned above.","created_at":"2016-03-10T14:48:44Z","updated_at":"2016-03-10T14:48:44Z","html_url":"https://github.com/Financial-Times/origami-build-service/pull/19#discussion_r55689173","pull_request_url":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/comments/55689173"},"html":{"href":"https://github.com/Financial-Times/origami-build-service/pull/19#discussion_r55689173"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/19","id":62232578,"html_url":"https://github.com/Financial-Times/origami-build-service/pull/19","diff_url":"https://github.com/Financial-Times/origami-build-service/pull/19.diff","patch_url":"https://github.com/Financial-Times/origami-build-service/pull/19.patch","issue_url":"https://api.github.com/repos/Financial-Times/origami-build-service/issues/19","number":19,"state":"open","locked":false,"title":"[do not merge] Docker Update and Continuous Deployment","user":{"login":"rowanmanning","id":138944,"avatar_url":"https://avatars.githubusercontent.com/u/138944?v=3","gravatar_id":"","url":"https://api.github.com/users/rowanmanning","html_url":"https://github.com/rowanmanning","followers_url":"https://api.github.com/users/rowanmanning/followers","following_url":"https://api.github.com/users/rowanmanning/following{/other_user}","gists_url":"https://api.github.com/users/rowanmanning/gists{/gist_id}","starred_url":"https://api.github.com/users/rowanmanning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowanmanning/subscriptions","organizations_url":"https://api.github.com/users/rowanmanning/orgs","repos_url":"https://api.github.com/users/rowanmanning/repos","events_url":"https://api.github.com/users/rowanmanning/events{/privacy}","received_events_url":"https://api.github.com/users/rowanmanning/received_events","type":"User","site_admin":false},"body":":warning: **DO NOT MERGE** :warning:\r\n\r\n### Outline\r\n\r\nThis PR contains the work required to get the build service continuously deploying, addressing #7. In order to do this we've had to overhaul the way that Docker is used, moving to Heroku's improved Docker support (which is currently in private beta). Here's what's been done:\r\n\r\n- **Improved Docker support:** Deployment is now done by pushing a built Docker image to Heroku's registry. I've simplified the commands required to do this:\r\n  - Local development: `docker-compose build` and `docker-compose up`\r\n  - Deploy: `npm run build` and `npm run deploy`\r\n\r\n- **Continuous deployment:** The above build/deploy commands no longer need to be run manually as they'll be run in CircleCI. Any push to the `master` branch will be deployed to QA once the tests have passed. Production is not deployed to through CI (see pipelines).\r\n\r\n- **Pipelines:** We're using a Heroku pipeline to deploy from QA to production. This makes a production deploy a simple button press, and the image that gets pushed into production is the exact same code that is running successfully in QA.\r\n\r\n- **Cleanup:** Removal of any files which are no longer necessary, and a cleanup of documentation/environment variables which are no longer used.\r\n\r\n### What Needs Doing Before/After Merge\r\n\r\nFirst we need to agree that this is approach to continuous deployment that we'd like to take. I can demo everything to the team and we can have a chat about it.\r\n\r\nCode-wise, everything is currently deploying happily to `origami-buildservice-rowan-qa` and `origami-buildservice-rowan`. We need to do a few things before this is ready to merge:\r\n\r\n1. In [`circle.yml`](https://github.com/Financial-Times/origami-build-service/blob/docker/circle.yml#L17), change the deployment branch to `master`.\r\n2. Change references in [`package.json`](https://github.com/Financial-Times/origami-build-service/blob/docker/package.json#L29-L30) from `origami-buildservice-rowan-qa` to `origami-buildservice-qa`.\r\n3. Merge this PR (maybe squashing the commits first).\r\n4. Tag a new version on master and push it (wait for the deploy to work).\r\n5. Verify that the new version is on QA and everything works.\r\n6. Create a Heroku pipeline from `origami-buildservice-qa` to `origami-buildservice-eu`.\r\n7. Promote the QA deploy to production.\r\n8. Verify that the new version is on production and everything works.\r\n\r\n### Next Steps\r\n\r\nThese are things that I'd like to get done after this has been merged, but don't need to be done to get continuous deployment up-and-running:\r\n\r\n- #18: using `.env` instead of `docker-compose.yml` for environment variables\r\n- Run the integration tests against a running container in CI","created_at":"2016-03-09T14:03:59Z","updated_at":"2016-03-10T14:48:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d58fba739525364a3a1f124bdeacbe543eb2959","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/19/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/19/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/origami-build-service/issues/19/comments","statuses_url":"https://api.github.com/repos/Financial-Times/origami-build-service/statuses/043e60c6b8dbe2a2eaeed08ab1abba99d03487b1","head":{"label":"Financial-Times:docker","ref":"docker","sha":"043e60c6b8dbe2a2eaeed08ab1abba99d03487b1","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":52436623,"name":"origami-build-service","full_name":"Financial-Times/origami-build-service","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/origami-build-service","description":"Creates bundles of JavaScript and CSS from building Origami and Origami-compatible modules","fork":false,"url":"https://api.github.com/repos/Financial-Times/origami-build-service","forks_url":"https://api.github.com/repos/Financial-Times/origami-build-service/forks","keys_url":"https://api.github.com/repos/Financial-Times/origami-build-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/origami-build-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/origami-build-service/teams","hooks_url":"https://api.github.com/repos/Financial-Times/origami-build-service/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/origami-build-service/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/origami-build-service/events","assignees_url":"https://api.github.com/repos/Financial-Times/origami-build-service/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/origami-build-service/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/origami-build-service/tags","blobs_url":"https://api.github.com/repos/Financial-Times/origami-build-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/origami-build-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/origami-build-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/origami-build-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/origami-build-service/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/origami-build-service/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/origami-build-service/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/origami-build-service/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/origami-build-service/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/origami-build-service/subscription","commits_url":"https://api.github.com/repos/Financial-Times/origami-build-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/origami-build-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/origami-build-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/origami-build-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/origami-build-service/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/origami-build-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/origami-build-service/merges","archive_url":"https://api.github.com/repos/Financial-Times/origami-build-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/origami-build-service/downloads","issues_url":"https://api.github.com/repos/Financial-Times/origami-build-service/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/origami-build-service/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/origami-build-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/origami-build-service/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/origami-build-service/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/origami-build-service/deployments","created_at":"2016-02-24T11:15:50Z","updated_at":"2016-03-07T13:57:36Z","pushed_at":"2016-03-09T14:28:41Z","git_url":"git://github.com/Financial-Times/origami-build-service.git","ssh_url":"git@github.com:Financial-Times/origami-build-service.git","clone_url":"https://github.com/Financial-Times/origami-build-service.git","svn_url":"https://github.com/Financial-Times/origami-build-service","homepage":"http://build.origami.ft.com/","size":149,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":1,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"dc32ad67e594a04e0a46e0c7082e7aeab9e8e253","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":52436623,"name":"origami-build-service","full_name":"Financial-Times/origami-build-service","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/origami-build-service","description":"Creates bundles of JavaScript and CSS from building Origami and Origami-compatible modules","fork":false,"url":"https://api.github.com/repos/Financial-Times/origami-build-service","forks_url":"https://api.github.com/repos/Financial-Times/origami-build-service/forks","keys_url":"https://api.github.com/repos/Financial-Times/origami-build-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/origami-build-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/origami-build-service/teams","hooks_url":"https://api.github.com/repos/Financial-Times/origami-build-service/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/origami-build-service/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/origami-build-service/events","assignees_url":"https://api.github.com/repos/Financial-Times/origami-build-service/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/origami-build-service/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/origami-build-service/tags","blobs_url":"https://api.github.com/repos/Financial-Times/origami-build-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/origami-build-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/origami-build-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/origami-build-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/origami-build-service/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/origami-build-service/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/origami-build-service/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/origami-build-service/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/origami-build-service/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/origami-build-service/subscription","commits_url":"https://api.github.com/repos/Financial-Times/origami-build-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/origami-build-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/origami-build-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/origami-build-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/origami-build-service/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/origami-build-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/origami-build-service/merges","archive_url":"https://api.github.com/repos/Financial-Times/origami-build-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/origami-build-service/downloads","issues_url":"https://api.github.com/repos/Financial-Times/origami-build-service/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/origami-build-service/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/origami-build-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/origami-build-service/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/origami-build-service/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/origami-build-service/deployments","created_at":"2016-02-24T11:15:50Z","updated_at":"2016-03-07T13:57:36Z","pushed_at":"2016-03-09T14:28:41Z","git_url":"git://github.com/Financial-Times/origami-build-service.git","ssh_url":"git@github.com:Financial-Times/origami-build-service.git","clone_url":"https://github.com/Financial-Times/origami-build-service.git","svn_url":"https://github.com/Financial-Times/origami-build-service","homepage":"http://build.origami.ft.com/","size":149,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/19"},"html":{"href":"https://github.com/Financial-Times/origami-build-service/pull/19"},"issue":{"href":"https://api.github.com/repos/Financial-Times/origami-build-service/issues/19"},"comments":{"href":"https://api.github.com/repos/Financial-Times/origami-build-service/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/origami-build-service/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/origami-build-service/statuses/043e60c6b8dbe2a2eaeed08ab1abba99d03487b1"}}}}