{"action":"closed","number":136,"pull_request":{"url":"https://api.github.com/repos/progrium/buildstep/pulls/136","id":29326342,"html_url":"https://github.com/progrium/buildstep/pull/136","diff_url":"https://github.com/progrium/buildstep/pull/136.diff","patch_url":"https://github.com/progrium/buildstep/pull/136.patch","issue_url":"https://api.github.com/repos/progrium/buildstep/issues/136","number":136,"state":"closed","locked":false,"title":"Allow the user to be set via an environment variable.","user":{"login":"jaysh","id":4825223,"avatar_url":"https://avatars.githubusercontent.com/u/4825223?v=3","gravatar_id":"","url":"https://api.github.com/users/jaysh","html_url":"https://github.com/jaysh","followers_url":"https://api.github.com/users/jaysh/followers","following_url":"https://api.github.com/users/jaysh/following{/other_user}","gists_url":"https://api.github.com/users/jaysh/gists{/gist_id}","starred_url":"https://api.github.com/users/jaysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaysh/subscriptions","organizations_url":"https://api.github.com/users/jaysh/orgs","repos_url":"https://api.github.com/users/jaysh/repos","events_url":"https://api.github.com/users/jaysh/events{/privacy}","received_events_url":"https://api.github.com/users/jaysh/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nIn #133 I suggested that it would be useful to allow the user to control both the user via an environmental variable. This PR contains the solution that works for my use case, and I'm hoping we can build on it to reach something that can be merged into the project :)\r\n\r\nI needed a way of mounting a volume (either from the host, or a data container) for persistent storage within the app, but keeping the permissions reasonably simple (in terms of understanding).  My main issue was that over the course of subsequent deploys, the container that originally wrote files to the persistent storage area was no longer able to manipulate them. It also made it difficult to share files with non-Dokku containers. I also wanted to avoid having to continuously re-`chown`'ing the files as the user changed.\r\n\r\nThis PR can be used in conjunction with the persistent storage plugin (https://github.com/dyson/dokku-persistent-storage) in order to populate the variables at build time, e.g.:\r\n\r\n    $ dokku docker-options example\r\n    -e USER_ID=1234\r\n    -e USER_NAME=example\r\n\r\nThanks,\r\nJay","created_at":"2015-02-14T22:14:01Z","updated_at":"2015-02-16T13:37:44Z","closed_at":"2015-02-16T13:37:44Z","merged_at":null,"merge_commit_sha":"8787f9753446ed83ee501295a45bf6d49fb40ad7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/progrium/buildstep/pulls/136/commits","review_comments_url":"https://api.github.com/repos/progrium/buildstep/pulls/136/comments","review_comment_url":"https://api.github.com/repos/progrium/buildstep/pulls/comments/{number}","comments_url":"https://api.github.com/repos/progrium/buildstep/issues/136/comments","statuses_url":"https://api.github.com/repos/progrium/buildstep/statuses/afc076eb9d9ce40ef90f530166f7bef9ab2ed6a2","head":{"label":"jaysh:jaysh-customise-user","ref":"jaysh-customise-user","sha":"afc076eb9d9ce40ef90f530166f7bef9ab2ed6a2","user":{"login":"jaysh","id":4825223,"avatar_url":"https://avatars.githubusercontent.com/u/4825223?v=3","gravatar_id":"","url":"https://api.github.com/users/jaysh","html_url":"https://github.com/jaysh","followers_url":"https://api.github.com/users/jaysh/followers","following_url":"https://api.github.com/users/jaysh/following{/other_user}","gists_url":"https://api.github.com/users/jaysh/gists{/gist_id}","starred_url":"https://api.github.com/users/jaysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaysh/subscriptions","organizations_url":"https://api.github.com/users/jaysh/orgs","repos_url":"https://api.github.com/users/jaysh/repos","events_url":"https://api.github.com/users/jaysh/events{/privacy}","received_events_url":"https://api.github.com/users/jaysh/received_events","type":"User","site_admin":false},"repo":{"id":30809590,"name":"buildstep","full_name":"jaysh/buildstep","owner":{"login":"jaysh","id":4825223,"avatar_url":"https://avatars.githubusercontent.com/u/4825223?v=3","gravatar_id":"","url":"https://api.github.com/users/jaysh","html_url":"https://github.com/jaysh","followers_url":"https://api.github.com/users/jaysh/followers","following_url":"https://api.github.com/users/jaysh/following{/other_user}","gists_url":"https://api.github.com/users/jaysh/gists{/gist_id}","starred_url":"https://api.github.com/users/jaysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaysh/subscriptions","organizations_url":"https://api.github.com/users/jaysh/orgs","repos_url":"https://api.github.com/users/jaysh/repos","events_url":"https://api.github.com/users/jaysh/events{/privacy}","received_events_url":"https://api.github.com/users/jaysh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jaysh/buildstep","description":"Buildstep uses Docker and Buildpacks to build applications like Heroku","fork":true,"url":"https://api.github.com/repos/jaysh/buildstep","forks_url":"https://api.github.com/repos/jaysh/buildstep/forks","keys_url":"https://api.github.com/repos/jaysh/buildstep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jaysh/buildstep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jaysh/buildstep/teams","hooks_url":"https://api.github.com/repos/jaysh/buildstep/hooks","issue_events_url":"https://api.github.com/repos/jaysh/buildstep/issues/events{/number}","events_url":"https://api.github.com/repos/jaysh/buildstep/events","assignees_url":"https://api.github.com/repos/jaysh/buildstep/assignees{/user}","branches_url":"https://api.github.com/repos/jaysh/buildstep/branches{/branch}","tags_url":"https://api.github.com/repos/jaysh/buildstep/tags","blobs_url":"https://api.github.com/repos/jaysh/buildstep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jaysh/buildstep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jaysh/buildstep/git/refs{/sha}","trees_url":"https://api.github.com/repos/jaysh/buildstep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jaysh/buildstep/statuses/{sha}","languages_url":"https://api.github.com/repos/jaysh/buildstep/languages","stargazers_url":"https://api.github.com/repos/jaysh/buildstep/stargazers","contributors_url":"https://api.github.com/repos/jaysh/buildstep/contributors","subscribers_url":"https://api.github.com/repos/jaysh/buildstep/subscribers","subscription_url":"https://api.github.com/repos/jaysh/buildstep/subscription","commits_url":"https://api.github.com/repos/jaysh/buildstep/commits{/sha}","git_commits_url":"https://api.github.com/repos/jaysh/buildstep/git/commits{/sha}","comments_url":"https://api.github.com/repos/jaysh/buildstep/comments{/number}","issue_comment_url":"https://api.github.com/repos/jaysh/buildstep/issues/comments/{number}","contents_url":"https://api.github.com/repos/jaysh/buildstep/contents/{+path}","compare_url":"https://api.github.com/repos/jaysh/buildstep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jaysh/buildstep/merges","archive_url":"https://api.github.com/repos/jaysh/buildstep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jaysh/buildstep/downloads","issues_url":"https://api.github.com/repos/jaysh/buildstep/issues{/number}","pulls_url":"https://api.github.com/repos/jaysh/buildstep/pulls{/number}","milestones_url":"https://api.github.com/repos/jaysh/buildstep/milestones{/number}","notifications_url":"https://api.github.com/repos/jaysh/buildstep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jaysh/buildstep/labels{/name}","releases_url":"https://api.github.com/repos/jaysh/buildstep/releases{/id}","created_at":"2015-02-14T21:37:22Z","updated_at":"2015-02-14T21:37:24Z","pushed_at":"2015-02-14T22:09:04Z","git_url":"git://github.com/jaysh/buildstep.git","ssh_url":"git@github.com:jaysh/buildstep.git","clone_url":"https://github.com/jaysh/buildstep.git","svn_url":"https://github.com/jaysh/buildstep","homepage":"","size":730,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"progrium:master","ref":"master","sha":"091eafdad7ccf5f4584aa21704397fd1dc1fd208","user":{"login":"progrium","id":647,"avatar_url":"https://avatars.githubusercontent.com/u/647?v=3","gravatar_id":"","url":"https://api.github.com/users/progrium","html_url":"https://github.com/progrium","followers_url":"https://api.github.com/users/progrium/followers","following_url":"https://api.github.com/users/progrium/following{/other_user}","gists_url":"https://api.github.com/users/progrium/gists{/gist_id}","starred_url":"https://api.github.com/users/progrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progrium/subscriptions","organizations_url":"https://api.github.com/users/progrium/orgs","repos_url":"https://api.github.com/users/progrium/repos","events_url":"https://api.github.com/users/progrium/events{/privacy}","received_events_url":"https://api.github.com/users/progrium/received_events","type":"User","site_admin":false},"repo":{"id":7414261,"name":"buildstep","full_name":"progrium/buildstep","owner":{"login":"progrium","id":647,"avatar_url":"https://avatars.githubusercontent.com/u/647?v=3","gravatar_id":"","url":"https://api.github.com/users/progrium","html_url":"https://github.com/progrium","followers_url":"https://api.github.com/users/progrium/followers","following_url":"https://api.github.com/users/progrium/following{/other_user}","gists_url":"https://api.github.com/users/progrium/gists{/gist_id}","starred_url":"https://api.github.com/users/progrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progrium/subscriptions","organizations_url":"https://api.github.com/users/progrium/orgs","repos_url":"https://api.github.com/users/progrium/repos","events_url":"https://api.github.com/users/progrium/events{/privacy}","received_events_url":"https://api.github.com/users/progrium/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/progrium/buildstep","description":"Buildstep uses Docker and Buildpacks to build applications like Heroku","fork":false,"url":"https://api.github.com/repos/progrium/buildstep","forks_url":"https://api.github.com/repos/progrium/buildstep/forks","keys_url":"https://api.github.com/repos/progrium/buildstep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/progrium/buildstep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/progrium/buildstep/teams","hooks_url":"https://api.github.com/repos/progrium/buildstep/hooks","issue_events_url":"https://api.github.com/repos/progrium/buildstep/issues/events{/number}","events_url":"https://api.github.com/repos/progrium/buildstep/events","assignees_url":"https://api.github.com/repos/progrium/buildstep/assignees{/user}","branches_url":"https://api.github.com/repos/progrium/buildstep/branches{/branch}","tags_url":"https://api.github.com/repos/progrium/buildstep/tags","blobs_url":"https://api.github.com/repos/progrium/buildstep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/progrium/buildstep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/progrium/buildstep/git/refs{/sha}","trees_url":"https://api.github.com/repos/progrium/buildstep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/progrium/buildstep/statuses/{sha}","languages_url":"https://api.github.com/repos/progrium/buildstep/languages","stargazers_url":"https://api.github.com/repos/progrium/buildstep/stargazers","contributors_url":"https://api.github.com/repos/progrium/buildstep/contributors","subscribers_url":"https://api.github.com/repos/progrium/buildstep/subscribers","subscription_url":"https://api.github.com/repos/progrium/buildstep/subscription","commits_url":"https://api.github.com/repos/progrium/buildstep/commits{/sha}","git_commits_url":"https://api.github.com/repos/progrium/buildstep/git/commits{/sha}","comments_url":"https://api.github.com/repos/progrium/buildstep/comments{/number}","issue_comment_url":"https://api.github.com/repos/progrium/buildstep/issues/comments/{number}","contents_url":"https://api.github.com/repos/progrium/buildstep/contents/{+path}","compare_url":"https://api.github.com/repos/progrium/buildstep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/progrium/buildstep/merges","archive_url":"https://api.github.com/repos/progrium/buildstep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/progrium/buildstep/downloads","issues_url":"https://api.github.com/repos/progrium/buildstep/issues{/number}","pulls_url":"https://api.github.com/repos/progrium/buildstep/pulls{/number}","milestones_url":"https://api.github.com/repos/progrium/buildstep/milestones{/number}","notifications_url":"https://api.github.com/repos/progrium/buildstep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/progrium/buildstep/labels{/name}","releases_url":"https://api.github.com/repos/progrium/buildstep/releases{/id}","created_at":"2013-01-02T22:11:42Z","updated_at":"2015-02-16T05:31:57Z","pushed_at":"2015-02-10T20:08:41Z","git_url":"git://github.com/progrium/buildstep.git","ssh_url":"git@github.com:progrium/buildstep.git","clone_url":"https://github.com/progrium/buildstep.git","svn_url":"https://github.com/progrium/buildstep","homepage":"","size":730,"stargazers_count":721,"watchers_count":721,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":273,"mirror_url":null,"open_issues_count":14,"forks":273,"open_issues":14,"watchers":721,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/progrium/buildstep/pulls/136"},"html":{"href":"https://github.com/progrium/buildstep/pull/136"},"issue":{"href":"https://api.github.com/repos/progrium/buildstep/issues/136"},"comments":{"href":"https://api.github.com/repos/progrium/buildstep/issues/136/comments"},"review_comments":{"href":"https://api.github.com/repos/progrium/buildstep/pulls/136/comments"},"review_comment":{"href":"https://api.github.com/repos/progrium/buildstep/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/progrium/buildstep/pulls/136/commits"},"statuses":{"href":"https://api.github.com/repos/progrium/buildstep/statuses/afc076eb9d9ce40ef90f530166f7bef9ab2ed6a2"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":13,"deletions":2,"changed_files":1}}