{"action":"closed","number":61,"pull_request":{"url":"https://api.github.com/repos/strongloop/strong-pm/pulls/61","id":24003962,"html_url":"https://github.com/strongloop/strong-pm/pull/61","diff_url":"https://github.com/strongloop/strong-pm/pull/61.diff","patch_url":"https://github.com/strongloop/strong-pm/pull/61.patch","issue_url":"https://api.github.com/repos/strongloop/strong-pm/issues/61","number":61,"state":"closed","locked":false,"title":"Remove config file from strong-pm","user":{"login":"rmg","id":17978,"avatar_url":"https://avatars.githubusercontent.com/u/17978?v=3","gravatar_id":"","url":"https://api.github.com/users/rmg","html_url":"https://github.com/rmg","followers_url":"https://api.github.com/users/rmg/followers","following_url":"https://api.github.com/users/rmg/following{/other_user}","gists_url":"https://api.github.com/users/rmg/gists{/gist_id}","starred_url":"https://api.github.com/users/rmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmg/subscriptions","organizations_url":"https://api.github.com/users/rmg/orgs","repos_url":"https://api.github.com/users/rmg/repos","events_url":"https://api.github.com/users/rmg/events{/privacy}","received_events_url":"https://api.github.com/users/rmg/received_events","type":"User","site_admin":false},"body":"_This is a continuation of the discussion in #31 now that #47 and #56 have been merged and we have a better idea of where the pain points are._\r\n\r\nThe current config file situation is rather sad and I think the solution is to eliminate it entirely.\r\n\r\nCurrently the config file supports/provides the following:\r\n\r\n| Option | Default | Description |\r\n|----------|-----------|-----------------|\r\n| prepare[] command | npm rebuild; npm install --production | Prepares the application for deployment. |\r\n| start command | slc run --cluster=cpus | Starts the application. |\r\n| stop signal | SIGTERM | Stops the application. |\r\n| restart signal | SIGHUP | Restarts the application. |\r\n| [files] section | N/A | Specifies files to add to the application directory. See Adding files.|\r\n\r\nThe use of `prepare[]` is redundant with using npm's existing support for `preinstall`, `install`, and `postinstall` scripts which will be invoked automatically by `npm rebuild; npm install --production`.\r\n\r\nThe reason for `start`, `stop`, and `restart` is to allow the use of supervisors other that strong-supervisor. Because a large number of strong-pm's runtime features actually depend on strong-supervisor, it is no longer useful to be able to specify a different supervisor. Changing the CLI arguments for strong-supervisor is also redundant as most of the options are settable by environment variables, which means they can be changed with `pmctl set-env`. If there's an option that is missing, I encourage people to file issues for them either against [strong-pm](https://github.com/strongloop/strong-pm/issues) or [strong-supervisor](https://github.com/strongloop/strong-supervisor/issues).\r\n\r\nThis leaves only the `[files]` section, which I propose be replaced with a file-injection mechanism in `pmctl` that allows files to be stored in strong-pm along with the persisted environment feature added in #47.\r\n\r\nI propose that it look/work something like this:\r\n```\r\n$ slc pmctl inject-file strongloop.json\r\nstrong-pm: copying strongloop.json to strong-pm store...\r\nstrong-pm: restarting application with injected files: strongloop.json\r\n$ slc pmctl inject-file production.env:.env\r\nstrong-pm: copying production.env to strong-pm store...\r\nstrong-pm: restarting application with injected files: .env strongloop.json\r\n$ slc pmctl inject-file strongloop.json\r\nstrong-pm: copying strongloop.json to strong-pm store...\r\nstrong-pm: injected files unchanged, not restarting\r\n$ slc pmctl files\r\nCurrent file injections and md5 hashes:\r\n  .env=production.env (5a0ea52ff2e3c7b4592e83303a3fa962)\r\n  strongloop.json=strongloop.json (07915d313e3d08bc83817f5e5286782e)\r\n```\r\n\r\nI would also like to expose this as a pm-install option, similar to how persisted environments are in #56 with something like:\r\n```\r\n$ sudo slc pm-install --port 7777 --inject-file strongloop.json --inject-file produciton.env:.env\r\n```\r\n\r\nBoth would use a git refspec inspired mapping format of LOCAL:REMOTE with the following semantics:\r\n * `a:b` copy a, relative to local path to b relative to app root\r\n * `a` copy a relative to local path to a relative to app root\r\n * `:b` delete file at path b, relative to app root\r\n   * is this useful?\r\n   * if useful, is this syntax at all intuitive?\r\n * `a:` remove file a from strong-pm store\r\n   * I intend to store files by content hash, so this would involve performing a local hash and sending the hash to strong-pm for lookup and delete","created_at":"2014-11-06T19:02:52Z","updated_at":"2015-02-17T22:10:17Z","closed_at":"2015-02-17T22:10:17Z","merged_at":"2015-02-17T22:10:17Z","merge_commit_sha":"a50802f08d37bec64b9469c522a3fe8c142ab03e","assignee":{"login":"rmg","id":17978,"avatar_url":"https://avatars.githubusercontent.com/u/17978?v=3","gravatar_id":"","url":"https://api.github.com/users/rmg","html_url":"https://github.com/rmg","followers_url":"https://api.github.com/users/rmg/followers","following_url":"https://api.github.com/users/rmg/following{/other_user}","gists_url":"https://api.github.com/users/rmg/gists{/gist_id}","starred_url":"https://api.github.com/users/rmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmg/subscriptions","organizations_url":"https://api.github.com/users/rmg/orgs","repos_url":"https://api.github.com/users/rmg/repos","events_url":"https://api.github.com/users/rmg/events{/privacy}","received_events_url":"https://api.github.com/users/rmg/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/strong-pm/pulls/61/commits","review_comments_url":"https://api.github.com/repos/strongloop/strong-pm/pulls/61/comments","review_comment_url":"https://api.github.com/repos/strongloop/strong-pm/pulls/comments/{number}","comments_url":"https://api.github.com/repos/strongloop/strong-pm/issues/61/comments","statuses_url":"https://api.github.com/repos/strongloop/strong-pm/statuses/3610310e382ac3ee3d739dac5b4374a89f8b0747","head":{"label":"strongloop:feature/remove-config-file","ref":"feature/remove-config-file","sha":"3610310e382ac3ee3d739dac5b4374a89f8b0747","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":20460946,"name":"strong-pm","full_name":"strongloop/strong-pm","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/strong-pm","description":"deployer for node applications","fork":false,"url":"https://api.github.com/repos/strongloop/strong-pm","forks_url":"https://api.github.com/repos/strongloop/strong-pm/forks","keys_url":"https://api.github.com/repos/strongloop/strong-pm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/strong-pm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/strong-pm/teams","hooks_url":"https://api.github.com/repos/strongloop/strong-pm/hooks","issue_events_url":"https://api.github.com/repos/strongloop/strong-pm/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/strong-pm/events","assignees_url":"https://api.github.com/repos/strongloop/strong-pm/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/strong-pm/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/strong-pm/tags","blobs_url":"https://api.github.com/repos/strongloop/strong-pm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/strong-pm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/strong-pm/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/strong-pm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/strong-pm/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/strong-pm/languages","stargazers_url":"https://api.github.com/repos/strongloop/strong-pm/stargazers","contributors_url":"https://api.github.com/repos/strongloop/strong-pm/contributors","subscribers_url":"https://api.github.com/repos/strongloop/strong-pm/subscribers","subscription_url":"https://api.github.com/repos/strongloop/strong-pm/subscription","commits_url":"https://api.github.com/repos/strongloop/strong-pm/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/strong-pm/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/strong-pm/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/strong-pm/issues/comments/{number}","contents_url":"https://api.github.com/repos/strongloop/strong-pm/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/strong-pm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/strong-pm/merges","archive_url":"https://api.github.com/repos/strongloop/strong-pm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/strong-pm/downloads","issues_url":"https://api.github.com/repos/strongloop/strong-pm/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/strong-pm/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/strong-pm/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/strong-pm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/strong-pm/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/strong-pm/releases{/id}","created_at":"2014-06-03T21:48:54Z","updated_at":"2015-02-17T21:41:45Z","pushed_at":"2015-02-17T22:10:18Z","git_url":"git://github.com/strongloop/strong-pm.git","ssh_url":"git@github.com:strongloop/strong-pm.git","clone_url":"https://github.com/strongloop/strong-pm.git","svn_url":"https://github.com/strongloop/strong-pm","homepage":null,"size":2779,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":19,"forks":2,"open_issues":19,"watchers":12,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"21919806c355890baed6bf916966112822ec95b9","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":20460946,"name":"strong-pm","full_name":"strongloop/strong-pm","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/strong-pm","description":"deployer for node applications","fork":false,"url":"https://api.github.com/repos/strongloop/strong-pm","forks_url":"https://api.github.com/repos/strongloop/strong-pm/forks","keys_url":"https://api.github.com/repos/strongloop/strong-pm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/strong-pm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/strong-pm/teams","hooks_url":"https://api.github.com/repos/strongloop/strong-pm/hooks","issue_events_url":"https://api.github.com/repos/strongloop/strong-pm/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/strong-pm/events","assignees_url":"https://api.github.com/repos/strongloop/strong-pm/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/strong-pm/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/strong-pm/tags","blobs_url":"https://api.github.com/repos/strongloop/strong-pm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/strong-pm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/strong-pm/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/strong-pm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/strong-pm/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/strong-pm/languages","stargazers_url":"https://api.github.com/repos/strongloop/strong-pm/stargazers","contributors_url":"https://api.github.com/repos/strongloop/strong-pm/contributors","subscribers_url":"https://api.github.com/repos/strongloop/strong-pm/subscribers","subscription_url":"https://api.github.com/repos/strongloop/strong-pm/subscription","commits_url":"https://api.github.com/repos/strongloop/strong-pm/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/strong-pm/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/strong-pm/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/strong-pm/issues/comments/{number}","contents_url":"https://api.github.com/repos/strongloop/strong-pm/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/strong-pm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/strong-pm/merges","archive_url":"https://api.github.com/repos/strongloop/strong-pm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/strong-pm/downloads","issues_url":"https://api.github.com/repos/strongloop/strong-pm/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/strong-pm/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/strong-pm/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/strong-pm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/strong-pm/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/strong-pm/releases{/id}","created_at":"2014-06-03T21:48:54Z","updated_at":"2015-02-17T21:41:45Z","pushed_at":"2015-02-17T22:10:18Z","git_url":"git://github.com/strongloop/strong-pm.git","ssh_url":"git@github.com:strongloop/strong-pm.git","clone_url":"https://github.com/strongloop/strong-pm.git","svn_url":"https://github.com/strongloop/strong-pm","homepage":null,"size":2779,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":19,"forks":2,"open_issues":19,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/strong-pm/pulls/61"},"html":{"href":"https://github.com/strongloop/strong-pm/pull/61"},"issue":{"href":"https://api.github.com/repos/strongloop/strong-pm/issues/61"},"comments":{"href":"https://api.github.com/repos/strongloop/strong-pm/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/strong-pm/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/strong-pm/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/strongloop/strong-pm/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/strong-pm/statuses/3610310e382ac3ee3d739dac5b4374a89f8b0747"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"rmg","id":17978,"avatar_url":"https://avatars.githubusercontent.com/u/17978?v=3","gravatar_id":"","url":"https://api.github.com/users/rmg","html_url":"https://github.com/rmg","followers_url":"https://api.github.com/users/rmg/followers","following_url":"https://api.github.com/users/rmg/following{/other_user}","gists_url":"https://api.github.com/users/rmg/gists{/gist_id}","starred_url":"https://api.github.com/users/rmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmg/subscriptions","organizations_url":"https://api.github.com/users/rmg/orgs","repos_url":"https://api.github.com/users/rmg/repos","events_url":"https://api.github.com/users/rmg/events{/privacy}","received_events_url":"https://api.github.com/users/rmg/received_events","type":"User","site_admin":false},"comments":14,"review_comments":2,"commits":6,"additions":38,"deletions":426,"changed_files":26}}