{"action":"created","comment":{"url":"https://api.github.com/repos/jgorset/django-kronos/pulls/comments/49104573","id":49104573,"diff_hunk":"@@ -2,3 +2,4 @@ build\n *.pyc\n dist\n django_kronos.egg-info\n+.idea/","path":".gitignore","position":4,"original_position":4,"commit_id":"160eddeb375816f41896c5608da8ec7428eda27d","original_commit_id":"160eddeb375816f41896c5608da8ec7428eda27d","user":{"login":"topiaruss","id":189785,"avatar_url":"https://avatars.githubusercontent.com/u/189785?v=3","gravatar_id":"","url":"https://api.github.com/users/topiaruss","html_url":"https://github.com/topiaruss","followers_url":"https://api.github.com/users/topiaruss/followers","following_url":"https://api.github.com/users/topiaruss/following{/other_user}","gists_url":"https://api.github.com/users/topiaruss/gists{/gist_id}","starred_url":"https://api.github.com/users/topiaruss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topiaruss/subscriptions","organizations_url":"https://api.github.com/users/topiaruss/orgs","repos_url":"https://api.github.com/users/topiaruss/repos","events_url":"https://api.github.com/users/topiaruss/events{/privacy}","received_events_url":"https://api.github.com/users/topiaruss/received_events","type":"User","site_admin":false},"body":"Fair comment. \n\nRuss Ferriday\nM: +44 7429 518822\nSkype: ferriday\n\n> On 7 Jan 2016, at 17:39, Johannes Gorset <notifications@github.com> wrote:\n> \n> In .gitignore:\n> \n> > @@ -2,3 +2,4 @@ build\n> >  *.pyc\n> >  dist\n> >  django_kronos.egg-info\n> > +.idea/\n> This directory is specific to your environment, so you should probably add it to your global ignore file and remove it from this one.\n> \n> —\n> Reply to this email directly or view it on GitHub.\n> \n","created_at":"2016-01-07T18:10:00Z","updated_at":"2016-01-07T18:10:00Z","html_url":"https://github.com/jgorset/django-kronos/pull/47#discussion_r49104573","pull_request_url":"https://api.github.com/repos/jgorset/django-kronos/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/jgorset/django-kronos/pulls/comments/49104573"},"html":{"href":"https://github.com/jgorset/django-kronos/pull/47#discussion_r49104573"},"pull_request":{"href":"https://api.github.com/repos/jgorset/django-kronos/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/jgorset/django-kronos/pulls/47","id":50516749,"html_url":"https://github.com/jgorset/django-kronos/pull/47","diff_url":"https://github.com/jgorset/django-kronos/pull/47.diff","patch_url":"https://github.com/jgorset/django-kronos/pull/47.patch","issue_url":"https://api.github.com/repos/jgorset/django-kronos/issues/47","number":47,"state":"open","locked":false,"title":"Allow environment variables in crontab file","user":{"login":"topiaruss","id":189785,"avatar_url":"https://avatars.githubusercontent.com/u/189785?v=3","gravatar_id":"","url":"https://api.github.com/users/topiaruss","html_url":"https://github.com/topiaruss","followers_url":"https://api.github.com/users/topiaruss/followers","following_url":"https://api.github.com/users/topiaruss/following{/other_user}","gists_url":"https://api.github.com/users/topiaruss/gists{/gist_id}","starred_url":"https://api.github.com/users/topiaruss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topiaruss/subscriptions","organizations_url":"https://api.github.com/users/topiaruss/orgs","repos_url":"https://api.github.com/users/topiaruss/repos","events_url":"https://api.github.com/users/topiaruss/events{/privacy}","received_events_url":"https://api.github.com/users/topiaruss/received_events","type":"User","site_admin":false},"body":"I want to set environment variables, specifically DB paths, in my docker-compose.yml file. \r\n\r\nWhy?\r\n\r\nThis is the path of least resistance when you quickly want to override a setting that is closely linked to the location of the deployment, to support commands exposed by Kronos.  Bear in mind that the Docker environment exists during the deployment, but not while your tasks run. So what is not captured into a settings file during deployment is relatively hard to influence later.  \r\n\r\nHere's a piece of YML, demonstrating how to set KRONOS_ENV\r\n\r\n```\r\nweb:\r\n  restart: always\r\n  environment:\r\n    DB_USER: postgres\r\n    KRONOS_ENV: DB_SERVICE=myappdb1.cyweh001arg.eu-west-1.rds.amazonaws.com\\nFOO=bar\r\n  build: ./web\r\n  expose:\r\n    - \"8000\"\r\n  links:\r\n    - redis:redis\r\n  volumes:\r\n    - /var/run/docker.sock:/tmp/docker.sock:ro\r\n    - /usr/src/app/static\r\n  command: /usr/src/app/do_run_server\r\n\r\n```\r\n\r\nThe KRONOS_ENV values appear at the top of the crontab file, tagged with new breadcrumbs :\r\n\r\n```\r\n# KRONOS_ENV_BREAD_CRUMB for next\r\nDB_SERVICE=myappdb1.cyweh001arg.eu-west-1.rds.amazonaws.com\r\n# KRONOS_ENV_BREAD_CRUMB for next\r\nFOO=bar\r\n5 * * * * python manage.py my_little_command\r\n5 * * * * python manage.py my_other_command\r\n```\r\n\r\nThe entries will be removed when uninstall is invoked, and updated as the setting changes.\r\n\r\nThe settings apply to all tasks in the file.\r\n\r\nIf you accept the PR, I'll extend the doc.\r\n","created_at":"2015-11-12T14:29:00Z","updated_at":"2016-01-07T18:10:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e16210ac1e3a03c37f7ca6e2896cba4cbd2933c4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jgorset/django-kronos/pulls/47/commits","review_comments_url":"https://api.github.com/repos/jgorset/django-kronos/pulls/47/comments","review_comment_url":"https://api.github.com/repos/jgorset/django-kronos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jgorset/django-kronos/issues/47/comments","statuses_url":"https://api.github.com/repos/jgorset/django-kronos/statuses/160eddeb375816f41896c5608da8ec7428eda27d","head":{"label":"topiaruss:master","ref":"master","sha":"160eddeb375816f41896c5608da8ec7428eda27d","user":{"login":"topiaruss","id":189785,"avatar_url":"https://avatars.githubusercontent.com/u/189785?v=3","gravatar_id":"","url":"https://api.github.com/users/topiaruss","html_url":"https://github.com/topiaruss","followers_url":"https://api.github.com/users/topiaruss/followers","following_url":"https://api.github.com/users/topiaruss/following{/other_user}","gists_url":"https://api.github.com/users/topiaruss/gists{/gist_id}","starred_url":"https://api.github.com/users/topiaruss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topiaruss/subscriptions","organizations_url":"https://api.github.com/users/topiaruss/orgs","repos_url":"https://api.github.com/users/topiaruss/repos","events_url":"https://api.github.com/users/topiaruss/events{/privacy}","received_events_url":"https://api.github.com/users/topiaruss/received_events","type":"User","site_admin":false},"repo":{"id":45998255,"name":"django-kronos","full_name":"topiaruss/django-kronos","owner":{"login":"topiaruss","id":189785,"avatar_url":"https://avatars.githubusercontent.com/u/189785?v=3","gravatar_id":"","url":"https://api.github.com/users/topiaruss","html_url":"https://github.com/topiaruss","followers_url":"https://api.github.com/users/topiaruss/followers","following_url":"https://api.github.com/users/topiaruss/following{/other_user}","gists_url":"https://api.github.com/users/topiaruss/gists{/gist_id}","starred_url":"https://api.github.com/users/topiaruss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topiaruss/subscriptions","organizations_url":"https://api.github.com/users/topiaruss/orgs","repos_url":"https://api.github.com/users/topiaruss/repos","events_url":"https://api.github.com/users/topiaruss/events{/privacy}","received_events_url":"https://api.github.com/users/topiaruss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/topiaruss/django-kronos","description":"Kronos makes it really easy to define and schedule tasks with cron","fork":true,"url":"https://api.github.com/repos/topiaruss/django-kronos","forks_url":"https://api.github.com/repos/topiaruss/django-kronos/forks","keys_url":"https://api.github.com/repos/topiaruss/django-kronos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/topiaruss/django-kronos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/topiaruss/django-kronos/teams","hooks_url":"https://api.github.com/repos/topiaruss/django-kronos/hooks","issue_events_url":"https://api.github.com/repos/topiaruss/django-kronos/issues/events{/number}","events_url":"https://api.github.com/repos/topiaruss/django-kronos/events","assignees_url":"https://api.github.com/repos/topiaruss/django-kronos/assignees{/user}","branches_url":"https://api.github.com/repos/topiaruss/django-kronos/branches{/branch}","tags_url":"https://api.github.com/repos/topiaruss/django-kronos/tags","blobs_url":"https://api.github.com/repos/topiaruss/django-kronos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/topiaruss/django-kronos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/topiaruss/django-kronos/git/refs{/sha}","trees_url":"https://api.github.com/repos/topiaruss/django-kronos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/topiaruss/django-kronos/statuses/{sha}","languages_url":"https://api.github.com/repos/topiaruss/django-kronos/languages","stargazers_url":"https://api.github.com/repos/topiaruss/django-kronos/stargazers","contributors_url":"https://api.github.com/repos/topiaruss/django-kronos/contributors","subscribers_url":"https://api.github.com/repos/topiaruss/django-kronos/subscribers","subscription_url":"https://api.github.com/repos/topiaruss/django-kronos/subscription","commits_url":"https://api.github.com/repos/topiaruss/django-kronos/commits{/sha}","git_commits_url":"https://api.github.com/repos/topiaruss/django-kronos/git/commits{/sha}","comments_url":"https://api.github.com/repos/topiaruss/django-kronos/comments{/number}","issue_comment_url":"https://api.github.com/repos/topiaruss/django-kronos/issues/comments{/number}","contents_url":"https://api.github.com/repos/topiaruss/django-kronos/contents/{+path}","compare_url":"https://api.github.com/repos/topiaruss/django-kronos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/topiaruss/django-kronos/merges","archive_url":"https://api.github.com/repos/topiaruss/django-kronos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/topiaruss/django-kronos/downloads","issues_url":"https://api.github.com/repos/topiaruss/django-kronos/issues{/number}","pulls_url":"https://api.github.com/repos/topiaruss/django-kronos/pulls{/number}","milestones_url":"https://api.github.com/repos/topiaruss/django-kronos/milestones{/number}","notifications_url":"https://api.github.com/repos/topiaruss/django-kronos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/topiaruss/django-kronos/labels{/name}","releases_url":"https://api.github.com/repos/topiaruss/django-kronos/releases{/id}","created_at":"2015-11-11T17:34:27Z","updated_at":"2015-11-11T17:34:28Z","pushed_at":"2015-11-12T12:02:43Z","git_url":"git://github.com/topiaruss/django-kronos.git","ssh_url":"git@github.com:topiaruss/django-kronos.git","clone_url":"https://github.com/topiaruss/django-kronos.git","svn_url":"https://github.com/topiaruss/django-kronos","homepage":"","size":187,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"jgorset:master","ref":"master","sha":"538265d9a29a617198eeb1b06d5fba6af5dc1819","user":{"login":"jgorset","id":195266,"avatar_url":"https://avatars.githubusercontent.com/u/195266?v=3","gravatar_id":"","url":"https://api.github.com/users/jgorset","html_url":"https://github.com/jgorset","followers_url":"https://api.github.com/users/jgorset/followers","following_url":"https://api.github.com/users/jgorset/following{/other_user}","gists_url":"https://api.github.com/users/jgorset/gists{/gist_id}","starred_url":"https://api.github.com/users/jgorset/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgorset/subscriptions","organizations_url":"https://api.github.com/users/jgorset/orgs","repos_url":"https://api.github.com/users/jgorset/repos","events_url":"https://api.github.com/users/jgorset/events{/privacy}","received_events_url":"https://api.github.com/users/jgorset/received_events","type":"User","site_admin":false},"repo":{"id":2994106,"name":"django-kronos","full_name":"jgorset/django-kronos","owner":{"login":"jgorset","id":195266,"avatar_url":"https://avatars.githubusercontent.com/u/195266?v=3","gravatar_id":"","url":"https://api.github.com/users/jgorset","html_url":"https://github.com/jgorset","followers_url":"https://api.github.com/users/jgorset/followers","following_url":"https://api.github.com/users/jgorset/following{/other_user}","gists_url":"https://api.github.com/users/jgorset/gists{/gist_id}","starred_url":"https://api.github.com/users/jgorset/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgorset/subscriptions","organizations_url":"https://api.github.com/users/jgorset/orgs","repos_url":"https://api.github.com/users/jgorset/repos","events_url":"https://api.github.com/users/jgorset/events{/privacy}","received_events_url":"https://api.github.com/users/jgorset/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jgorset/django-kronos","description":"Kronos makes it really easy to define and schedule tasks with cron","fork":false,"url":"https://api.github.com/repos/jgorset/django-kronos","forks_url":"https://api.github.com/repos/jgorset/django-kronos/forks","keys_url":"https://api.github.com/repos/jgorset/django-kronos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jgorset/django-kronos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jgorset/django-kronos/teams","hooks_url":"https://api.github.com/repos/jgorset/django-kronos/hooks","issue_events_url":"https://api.github.com/repos/jgorset/django-kronos/issues/events{/number}","events_url":"https://api.github.com/repos/jgorset/django-kronos/events","assignees_url":"https://api.github.com/repos/jgorset/django-kronos/assignees{/user}","branches_url":"https://api.github.com/repos/jgorset/django-kronos/branches{/branch}","tags_url":"https://api.github.com/repos/jgorset/django-kronos/tags","blobs_url":"https://api.github.com/repos/jgorset/django-kronos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jgorset/django-kronos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jgorset/django-kronos/git/refs{/sha}","trees_url":"https://api.github.com/repos/jgorset/django-kronos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jgorset/django-kronos/statuses/{sha}","languages_url":"https://api.github.com/repos/jgorset/django-kronos/languages","stargazers_url":"https://api.github.com/repos/jgorset/django-kronos/stargazers","contributors_url":"https://api.github.com/repos/jgorset/django-kronos/contributors","subscribers_url":"https://api.github.com/repos/jgorset/django-kronos/subscribers","subscription_url":"https://api.github.com/repos/jgorset/django-kronos/subscription","commits_url":"https://api.github.com/repos/jgorset/django-kronos/commits{/sha}","git_commits_url":"https://api.github.com/repos/jgorset/django-kronos/git/commits{/sha}","comments_url":"https://api.github.com/repos/jgorset/django-kronos/comments{/number}","issue_comment_url":"https://api.github.com/repos/jgorset/django-kronos/issues/comments{/number}","contents_url":"https://api.github.com/repos/jgorset/django-kronos/contents/{+path}","compare_url":"https://api.github.com/repos/jgorset/django-kronos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jgorset/django-kronos/merges","archive_url":"https://api.github.com/repos/jgorset/django-kronos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jgorset/django-kronos/downloads","issues_url":"https://api.github.com/repos/jgorset/django-kronos/issues{/number}","pulls_url":"https://api.github.com/repos/jgorset/django-kronos/pulls{/number}","milestones_url":"https://api.github.com/repos/jgorset/django-kronos/milestones{/number}","notifications_url":"https://api.github.com/repos/jgorset/django-kronos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jgorset/django-kronos/labels{/name}","releases_url":"https://api.github.com/repos/jgorset/django-kronos/releases{/id}","created_at":"2011-12-16T10:54:00Z","updated_at":"2016-01-07T01:32:51Z","pushed_at":"2015-11-12T14:29:01Z","git_url":"git://github.com/jgorset/django-kronos.git","ssh_url":"git@github.com:jgorset/django-kronos.git","clone_url":"https://github.com/jgorset/django-kronos.git","svn_url":"https://github.com/jgorset/django-kronos","homepage":"","size":437,"stargazers_count":143,"watchers_count":143,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":5,"forks":38,"open_issues":5,"watchers":143,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jgorset/django-kronos/pulls/47"},"html":{"href":"https://github.com/jgorset/django-kronos/pull/47"},"issue":{"href":"https://api.github.com/repos/jgorset/django-kronos/issues/47"},"comments":{"href":"https://api.github.com/repos/jgorset/django-kronos/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/jgorset/django-kronos/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/jgorset/django-kronos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jgorset/django-kronos/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/jgorset/django-kronos/statuses/160eddeb375816f41896c5608da8ec7428eda27d"}}}}