{"action":"created","comment":{"url":"https://api.github.com/repos/Originate/exosphere/pulls/comments/122851677","pull_request_review_id":45001688,"id":122851677,"diff_hunk":"@@ -68,26 +68,34 @@ class DockerSetup\n \n   # builds the Docker config for a service dependency\n   _get-service-dependency-docker-config: (dependency-name, dependency-config) ->\n-    if dependency-config.volumes\n-      data-path = global-exosphere-directory @app-config.name, dependency-name\n-      fs.ensure-dir-sync data-path\n-      rendered-volumes =  map ((volume) -> Handlebars.compile(volume)({\"EXO_DATA_PATH\": data-path})), dependency-config.volumes\n-\n     Obj.compact do\n       image: \"#{dependency-config.image}:#{dependency-config.version}\"\n       container_name: dependency-name + dependency-config.version\n       ports: dependency-config.ports\n-      volumes: rendered-volumes or undefined\n-\n-\n-  _get-external-service-docker-config: ->\n-    | !@docker-image => throw new Error red \"No location or docker-image specified\"\n-    docker-config = {}\n-    docker-config[@role] =\n-      image: @docker-image\n-      container_name: @role\n-      depends_on: @_get-app-dependencies!\n-    docker-config\n+      volumes: @_get-rendered-volumes dependency-config.volumes, dependency-name\n+\n+\n+  _get-external-service-docker-config: (done) ~>\n+    | !@docker-image => done new Error red \"No location or docker-image specified\"\n+    DockerHelper.cat-file image: @docker-image, file-name: 'service.yml', (err, external-service-config) ~>\n+      | err => done new Error red \"Could not find the configuration for the docker-image\"\n+      @service-config = yaml.safe-load external-service-config\n+      docker-config = {}\n+      docker-config[@role] = Obj.compact do\n+        image: @docker-image\n+        container_name: @role\n+        ports: @service-config.docker.ports\n+        environment: {...@service-config.docker.environment, ...@_get-docker-env-vars!}\n+        volumes: @_get-rendered-volumes @service-config.docker.volumes, @role\n+        depends_on: @_get-service-dependencies!\n+      done null, docker-config\n+\n+\n+  _get-rendered-volumes: (volumes, role)->","path":"exo-setup/src/docker-setup.ls","position":64,"original_position":64,"commit_id":"db448e634b12c671eb84e06276f72f42614ea5dc","original_commit_id":"db448e634b12c671eb84e06276f72f42614ea5dc","user":{"login":"hugobho","id":7258240,"avatar_url":"https://avatars3.githubusercontent.com/u/7258240?v=3","gravatar_id":"","url":"https://api.github.com/users/hugobho","html_url":"https://github.com/hugobho","followers_url":"https://api.github.com/users/hugobho/followers","following_url":"https://api.github.com/users/hugobho/following{/other_user}","gists_url":"https://api.github.com/users/hugobho/gists{/gist_id}","starred_url":"https://api.github.com/users/hugobho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugobho/subscriptions","organizations_url":"https://api.github.com/users/hugobho/orgs","repos_url":"https://api.github.com/users/hugobho/repos","events_url":"https://api.github.com/users/hugobho/events{/privacy}","received_events_url":"https://api.github.com/users/hugobho/received_events","type":"User","site_admin":false},"body":"Will this method return an `undefined` or `null` object if `volumes` doesn't exist? This is necessary for `Obj.compact` to work in `_get-service-dependency-docker-config`","created_at":"2017-06-19T23:46:36Z","updated_at":"2017-06-19T23:50:32Z","html_url":"https://github.com/Originate/exosphere/pull/293#discussion_r122851677","pull_request_url":"https://api.github.com/repos/Originate/exosphere/pulls/293","_links":{"self":{"href":"https://api.github.com/repos/Originate/exosphere/pulls/comments/122851677"},"html":{"href":"https://github.com/Originate/exosphere/pull/293#discussion_r122851677"},"pull_request":{"href":"https://api.github.com/repos/Originate/exosphere/pulls/293"}}},"pull_request":{"url":"https://api.github.com/repos/Originate/exosphere/pulls/293","id":125934356,"html_url":"https://github.com/Originate/exosphere/pull/293","diff_url":"https://github.com/Originate/exosphere/pull/293.diff","patch_url":"https://github.com/Originate/exosphere/pull/293.patch","issue_url":"https://api.github.com/repos/Originate/exosphere/issues/293","number":293,"state":"open","locked":false,"title":"compile external docker images config","user":{"login":"cheahuychou","id":13965431,"avatar_url":"https://avatars0.githubusercontent.com/u/13965431?v=3","gravatar_id":"","url":"https://api.github.com/users/cheahuychou","html_url":"https://github.com/cheahuychou","followers_url":"https://api.github.com/users/cheahuychou/followers","following_url":"https://api.github.com/users/cheahuychou/following{/other_user}","gists_url":"https://api.github.com/users/cheahuychou/gists{/gist_id}","starred_url":"https://api.github.com/users/cheahuychou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheahuychou/subscriptions","organizations_url":"https://api.github.com/users/cheahuychou/orgs","repos_url":"https://api.github.com/users/cheahuychou/repos","events_url":"https://api.github.com/users/cheahuychou/events{/privacy}","received_events_url":"https://api.github.com/users/cheahuychou/received_events","type":"User","site_admin":false},"body":"<!-- mention the issue this PR addresses -->\r\nresolves: https://github.com/Originate/exosphere-sdk/issues/274\r\n\r\n<!-- a short description of the change in addition to what is already mentioned in the issue above -->\r\ncompile ports, volumes and environment variables for external services\r\n\r\n<!-- tag a few reviewers -->\r\n","created_at":"2017-06-15T23:46:34Z","updated_at":"2017-06-19T23:50:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"279da21aac9e59e8dcebe605c3b5591cc6edd8d9","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Originate/exosphere/pulls/293/commits","review_comments_url":"https://api.github.com/repos/Originate/exosphere/pulls/293/comments","review_comment_url":"https://api.github.com/repos/Originate/exosphere/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Originate/exosphere/issues/293/comments","statuses_url":"https://api.github.com/repos/Originate/exosphere/statuses/db448e634b12c671eb84e06276f72f42614ea5dc","head":{"label":"Originate:cm-configure-external-images","ref":"cm-configure-external-images","sha":"db448e634b12c671eb84e06276f72f42614ea5dc","user":{"login":"Originate","id":1627168,"avatar_url":"https://avatars0.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"repo":{"id":75137299,"name":"exosphere","full_name":"Originate/exosphere","owner":{"login":"Originate","id":1627168,"avatar_url":"https://avatars0.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Originate/exosphere","description":"A modern cloud-based micro-service framework","fork":false,"url":"https://api.github.com/repos/Originate/exosphere","forks_url":"https://api.github.com/repos/Originate/exosphere/forks","keys_url":"https://api.github.com/repos/Originate/exosphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Originate/exosphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Originate/exosphere/teams","hooks_url":"https://api.github.com/repos/Originate/exosphere/hooks","issue_events_url":"https://api.github.com/repos/Originate/exosphere/issues/events{/number}","events_url":"https://api.github.com/repos/Originate/exosphere/events","assignees_url":"https://api.github.com/repos/Originate/exosphere/assignees{/user}","branches_url":"https://api.github.com/repos/Originate/exosphere/branches{/branch}","tags_url":"https://api.github.com/repos/Originate/exosphere/tags","blobs_url":"https://api.github.com/repos/Originate/exosphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Originate/exosphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Originate/exosphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/Originate/exosphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Originate/exosphere/statuses/{sha}","languages_url":"https://api.github.com/repos/Originate/exosphere/languages","stargazers_url":"https://api.github.com/repos/Originate/exosphere/stargazers","contributors_url":"https://api.github.com/repos/Originate/exosphere/contributors","subscribers_url":"https://api.github.com/repos/Originate/exosphere/subscribers","subscription_url":"https://api.github.com/repos/Originate/exosphere/subscription","commits_url":"https://api.github.com/repos/Originate/exosphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/Originate/exosphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/Originate/exosphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/Originate/exosphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/Originate/exosphere/contents/{+path}","compare_url":"https://api.github.com/repos/Originate/exosphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Originate/exosphere/merges","archive_url":"https://api.github.com/repos/Originate/exosphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Originate/exosphere/downloads","issues_url":"https://api.github.com/repos/Originate/exosphere/issues{/number}","pulls_url":"https://api.github.com/repos/Originate/exosphere/pulls{/number}","milestones_url":"https://api.github.com/repos/Originate/exosphere/milestones{/number}","notifications_url":"https://api.github.com/repos/Originate/exosphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Originate/exosphere/labels{/name}","releases_url":"https://api.github.com/repos/Originate/exosphere/releases{/id}","deployments_url":"https://api.github.com/repos/Originate/exosphere/deployments","created_at":"2016-11-30T01:09:58Z","updated_at":"2017-06-02T04:07:19Z","pushed_at":"2017-06-19T23:30:43Z","git_url":"git://github.com/Originate/exosphere.git","ssh_url":"git@github.com:Originate/exosphere.git","clone_url":"https://github.com/Originate/exosphere.git","svn_url":"https://github.com/Originate/exosphere","homepage":null,"size":14660,"stargazers_count":5,"watchers_count":5,"language":"LiveScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":7,"forks":3,"open_issues":7,"watchers":5,"default_branch":"master"}},"base":{"label":"Originate:master","ref":"master","sha":"f691a0a5c90607b5e91ab6cd838d09b4bead61b4","user":{"login":"Originate","id":1627168,"avatar_url":"https://avatars0.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"repo":{"id":75137299,"name":"exosphere","full_name":"Originate/exosphere","owner":{"login":"Originate","id":1627168,"avatar_url":"https://avatars0.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Originate/exosphere","description":"A modern cloud-based micro-service framework","fork":false,"url":"https://api.github.com/repos/Originate/exosphere","forks_url":"https://api.github.com/repos/Originate/exosphere/forks","keys_url":"https://api.github.com/repos/Originate/exosphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Originate/exosphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Originate/exosphere/teams","hooks_url":"https://api.github.com/repos/Originate/exosphere/hooks","issue_events_url":"https://api.github.com/repos/Originate/exosphere/issues/events{/number}","events_url":"https://api.github.com/repos/Originate/exosphere/events","assignees_url":"https://api.github.com/repos/Originate/exosphere/assignees{/user}","branches_url":"https://api.github.com/repos/Originate/exosphere/branches{/branch}","tags_url":"https://api.github.com/repos/Originate/exosphere/tags","blobs_url":"https://api.github.com/repos/Originate/exosphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Originate/exosphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Originate/exosphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/Originate/exosphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Originate/exosphere/statuses/{sha}","languages_url":"https://api.github.com/repos/Originate/exosphere/languages","stargazers_url":"https://api.github.com/repos/Originate/exosphere/stargazers","contributors_url":"https://api.github.com/repos/Originate/exosphere/contributors","subscribers_url":"https://api.github.com/repos/Originate/exosphere/subscribers","subscription_url":"https://api.github.com/repos/Originate/exosphere/subscription","commits_url":"https://api.github.com/repos/Originate/exosphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/Originate/exosphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/Originate/exosphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/Originate/exosphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/Originate/exosphere/contents/{+path}","compare_url":"https://api.github.com/repos/Originate/exosphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Originate/exosphere/merges","archive_url":"https://api.github.com/repos/Originate/exosphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Originate/exosphere/downloads","issues_url":"https://api.github.com/repos/Originate/exosphere/issues{/number}","pulls_url":"https://api.github.com/repos/Originate/exosphere/pulls{/number}","milestones_url":"https://api.github.com/repos/Originate/exosphere/milestones{/number}","notifications_url":"https://api.github.com/repos/Originate/exosphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Originate/exosphere/labels{/name}","releases_url":"https://api.github.com/repos/Originate/exosphere/releases{/id}","deployments_url":"https://api.github.com/repos/Originate/exosphere/deployments","created_at":"2016-11-30T01:09:58Z","updated_at":"2017-06-02T04:07:19Z","pushed_at":"2017-06-19T23:30:43Z","git_url":"git://github.com/Originate/exosphere.git","ssh_url":"git@github.com:Originate/exosphere.git","clone_url":"https://github.com/Originate/exosphere.git","svn_url":"https://github.com/Originate/exosphere","homepage":null,"size":14660,"stargazers_count":5,"watchers_count":5,"language":"LiveScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":7,"forks":3,"open_issues":7,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Originate/exosphere/pulls/293"},"html":{"href":"https://github.com/Originate/exosphere/pull/293"},"issue":{"href":"https://api.github.com/repos/Originate/exosphere/issues/293"},"comments":{"href":"https://api.github.com/repos/Originate/exosphere/issues/293/comments"},"review_comments":{"href":"https://api.github.com/repos/Originate/exosphere/pulls/293/comments"},"review_comment":{"href":"https://api.github.com/repos/Originate/exosphere/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Originate/exosphere/pulls/293/commits"},"statuses":{"href":"https://api.github.com/repos/Originate/exosphere/statuses/db448e634b12c671eb84e06276f72f42614ea5dc"}}}}
{"actor":{"display_login":"hugobho"}}