{"action":"created","comment":{"url":"https://api.github.com/repos/fidals/shopelectro/pulls/comments/186621145","pull_request_review_id":118233050,"id":186621145,"diff_hunk":"@@ -0,0 +1,62 @@\n+#!/usr/bin/env bash\n+\n+# Copy the .dist environment files and wait them modifications.\n+# Merge them to .env file for docker-compose.\n+\n+# Usage:\n+# `./create-env.sh`\n+# `./create-env.sh -q  # Quite mode`\n+# `./create-env.sh --quite  # Quite mode`\n+\n+set -e\n+\n+QUITE=false\n+for arg in \"$@\"\n+do\n+    if [[ $arg = \"--quite\" || $arg = \"-q\" ]]\n+    then\n+        QUITE=true\n+    fi\n+done\n+\n+function create_env_files {\n+    for file in env_files/*.dist\n+    do\n+        new_file=${file%.dist}\n+\n+        if [[ ! -f \"$new_file\" ]]\n+        then\n+            cp $file $new_file\n+        fi\n+\n+        if ! $QUITE\n+        then\n+            echo \"Checkout the $new_file and configure it.\"\n+            read -p \"Are you ready to continue? [y/n]: \" yn\n+            if [[ $yn != \"y\" ]]\n+            then\n+                exit 1\n+            fi\n+        fi\n+\n+        cat $new_file >> .env","path":"docker/create-env.sh","position":42,"original_position":42,"commit_id":"b2b59cd88b9ab8d499c9e426b193515b2d90f3f8","original_commit_id":"994ca63790bf39e2a210fec422bd39f78cc1279f","user":{"login":"duker33","id":3526796,"avatar_url":"https://avatars1.githubusercontent.com/u/3526796?v=4","gravatar_id":"","url":"https://api.github.com/users/duker33","html_url":"https://github.com/duker33","followers_url":"https://api.github.com/users/duker33/followers","following_url":"https://api.github.com/users/duker33/following{/other_user}","gists_url":"https://api.github.com/users/duker33/gists{/gist_id}","starred_url":"https://api.github.com/users/duker33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duker33/subscriptions","organizations_url":"https://api.github.com/users/duker33/orgs","repos_url":"https://api.github.com/users/duker33/repos","events_url":"https://api.github.com/users/duker33/events{/privacy}","received_events_url":"https://api.github.com/users/duker33/received_events","type":"User","site_admin":false},"body":"@artemiy312 , \r\n\r\n> Currently, the create-env.sh creates only one .env file in docker/ directory, isn't it?\r\n\r\nbut we also have `env_files/` dir with vars. It's not obvious, that .env is only for build, but env_files/ are only for containers. Every new proger (or we after half a year) will spend time on debugging and config digging trying to change env var for container\r\n\r\n> Also we can not to name an environment file as .env.build\r\n\r\nhmm, it's strange, `.env` file is visible for build, `env_file: .env.build` is not visible already.\r\nIf it's another docker-compose amazing detail, then we have to leave it as is. But we can add comment at top of this file","created_at":"2018-05-08T05:39:01Z","updated_at":"2018-05-08T05:39:02Z","html_url":"https://github.com/fidals/shopelectro/pull/280#discussion_r186621145","pull_request_url":"https://api.github.com/repos/fidals/shopelectro/pulls/280","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/comments/186621145"},"html":{"href":"https://github.com/fidals/shopelectro/pull/280#discussion_r186621145"},"pull_request":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/280"}},"in_reply_to_id":186011584},"pull_request":{"url":"https://api.github.com/repos/fidals/shopelectro/pulls/280","id":178743041,"html_url":"https://github.com/fidals/shopelectro/pull/280","diff_url":"https://github.com/fidals/shopelectro/pull/280.diff","patch_url":"https://github.com/fidals/shopelectro/pull/280.patch","issue_url":"https://api.github.com/repos/fidals/shopelectro/issues/280","number":280,"state":"open","locked":false,"title":"#269 Refactor deploy system","user":{"login":"artemiy312","id":13870342,"avatar_url":"https://avatars0.githubusercontent.com/u/13870342?v=4","gravatar_id":"","url":"https://api.github.com/users/artemiy312","html_url":"https://github.com/artemiy312","followers_url":"https://api.github.com/users/artemiy312/followers","following_url":"https://api.github.com/users/artemiy312/following{/other_user}","gists_url":"https://api.github.com/users/artemiy312/gists{/gist_id}","starred_url":"https://api.github.com/users/artemiy312/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artemiy312/subscriptions","organizations_url":"https://api.github.com/users/artemiy312/orgs","repos_url":"https://api.github.com/users/artemiy312/repos","events_url":"https://api.github.com/users/artemiy312/events{/privacy}","received_events_url":"https://api.github.com/users/artemiy312/received_events","type":"User","site_admin":false},"body":"Closes #269\r\n","created_at":"2018-04-01T19:14:01Z","updated_at":"2018-05-08T05:39:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"836e35032ace0bfced31901685298777d4763928","assignee":{"login":"artemiy312","id":13870342,"avatar_url":"https://avatars0.githubusercontent.com/u/13870342?v=4","gravatar_id":"","url":"https://api.github.com/users/artemiy312","html_url":"https://github.com/artemiy312","followers_url":"https://api.github.com/users/artemiy312/followers","following_url":"https://api.github.com/users/artemiy312/following{/other_user}","gists_url":"https://api.github.com/users/artemiy312/gists{/gist_id}","starred_url":"https://api.github.com/users/artemiy312/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artemiy312/subscriptions","organizations_url":"https://api.github.com/users/artemiy312/orgs","repos_url":"https://api.github.com/users/artemiy312/repos","events_url":"https://api.github.com/users/artemiy312/events{/privacy}","received_events_url":"https://api.github.com/users/artemiy312/received_events","type":"User","site_admin":false},"assignees":[{"login":"artemiy312","id":13870342,"avatar_url":"https://avatars0.githubusercontent.com/u/13870342?v=4","gravatar_id":"","url":"https://api.github.com/users/artemiy312","html_url":"https://github.com/artemiy312","followers_url":"https://api.github.com/users/artemiy312/followers","following_url":"https://api.github.com/users/artemiy312/following{/other_user}","gists_url":"https://api.github.com/users/artemiy312/gists{/gist_id}","starred_url":"https://api.github.com/users/artemiy312/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artemiy312/subscriptions","organizations_url":"https://api.github.com/users/artemiy312/orgs","repos_url":"https://api.github.com/users/artemiy312/repos","events_url":"https://api.github.com/users/artemiy312/events{/privacy}","received_events_url":"https://api.github.com/users/artemiy312/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"duker33","id":3526796,"avatar_url":"https://avatars1.githubusercontent.com/u/3526796?v=4","gravatar_id":"","url":"https://api.github.com/users/duker33","html_url":"https://github.com/duker33","followers_url":"https://api.github.com/users/duker33/followers","following_url":"https://api.github.com/users/duker33/following{/other_user}","gists_url":"https://api.github.com/users/duker33/gists{/gist_id}","starred_url":"https://api.github.com/users/duker33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duker33/subscriptions","organizations_url":"https://api.github.com/users/duker33/orgs","repos_url":"https://api.github.com/users/duker33/repos","events_url":"https://api.github.com/users/duker33/events{/privacy}","received_events_url":"https://api.github.com/users/duker33/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fidals/shopelectro/pulls/280/commits","review_comments_url":"https://api.github.com/repos/fidals/shopelectro/pulls/280/comments","review_comment_url":"https://api.github.com/repos/fidals/shopelectro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fidals/shopelectro/issues/280/comments","statuses_url":"https://api.github.com/repos/fidals/shopelectro/statuses/b2b59cd88b9ab8d499c9e426b193515b2d90f3f8","head":{"label":"fidals:269-build-system","ref":"269-build-system","sha":"b2b59cd88b9ab8d499c9e426b193515b2d90f3f8","user":{"login":"fidals","id":16228604,"avatar_url":"https://avatars0.githubusercontent.com/u/16228604?v=4","gravatar_id":"","url":"https://api.github.com/users/fidals","html_url":"https://github.com/fidals","followers_url":"https://api.github.com/users/fidals/followers","following_url":"https://api.github.com/users/fidals/following{/other_user}","gists_url":"https://api.github.com/users/fidals/gists{/gist_id}","starred_url":"https://api.github.com/users/fidals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fidals/subscriptions","organizations_url":"https://api.github.com/users/fidals/orgs","repos_url":"https://api.github.com/users/fidals/repos","events_url":"https://api.github.com/users/fidals/events{/privacy}","received_events_url":"https://api.github.com/users/fidals/received_events","type":"Organization","site_admin":false},"repo":{"id":57301144,"name":"shopelectro","full_name":"fidals/shopelectro","owner":{"login":"fidals","id":16228604,"avatar_url":"https://avatars0.githubusercontent.com/u/16228604?v=4","gravatar_id":"","url":"https://api.github.com/users/fidals","html_url":"https://github.com/fidals","followers_url":"https://api.github.com/users/fidals/followers","following_url":"https://api.github.com/users/fidals/following{/other_user}","gists_url":"https://api.github.com/users/fidals/gists{/gist_id}","starred_url":"https://api.github.com/users/fidals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fidals/subscriptions","organizations_url":"https://api.github.com/users/fidals/orgs","repos_url":"https://api.github.com/users/fidals/repos","events_url":"https://api.github.com/users/fidals/events{/privacy}","received_events_url":"https://api.github.com/users/fidals/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fidals/shopelectro","description":"shopelectro.ru site's code","fork":false,"url":"https://api.github.com/repos/fidals/shopelectro","forks_url":"https://api.github.com/repos/fidals/shopelectro/forks","keys_url":"https://api.github.com/repos/fidals/shopelectro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fidals/shopelectro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fidals/shopelectro/teams","hooks_url":"https://api.github.com/repos/fidals/shopelectro/hooks","issue_events_url":"https://api.github.com/repos/fidals/shopelectro/issues/events{/number}","events_url":"https://api.github.com/repos/fidals/shopelectro/events","assignees_url":"https://api.github.com/repos/fidals/shopelectro/assignees{/user}","branches_url":"https://api.github.com/repos/fidals/shopelectro/branches{/branch}","tags_url":"https://api.github.com/repos/fidals/shopelectro/tags","blobs_url":"https://api.github.com/repos/fidals/shopelectro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fidals/shopelectro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fidals/shopelectro/git/refs{/sha}","trees_url":"https://api.github.com/repos/fidals/shopelectro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fidals/shopelectro/statuses/{sha}","languages_url":"https://api.github.com/repos/fidals/shopelectro/languages","stargazers_url":"https://api.github.com/repos/fidals/shopelectro/stargazers","contributors_url":"https://api.github.com/repos/fidals/shopelectro/contributors","subscribers_url":"https://api.github.com/repos/fidals/shopelectro/subscribers","subscription_url":"https://api.github.com/repos/fidals/shopelectro/subscription","commits_url":"https://api.github.com/repos/fidals/shopelectro/commits{/sha}","git_commits_url":"https://api.github.com/repos/fidals/shopelectro/git/commits{/sha}","comments_url":"https://api.github.com/repos/fidals/shopelectro/comments{/number}","issue_comment_url":"https://api.github.com/repos/fidals/shopelectro/issues/comments{/number}","contents_url":"https://api.github.com/repos/fidals/shopelectro/contents/{+path}","compare_url":"https://api.github.com/repos/fidals/shopelectro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fidals/shopelectro/merges","archive_url":"https://api.github.com/repos/fidals/shopelectro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fidals/shopelectro/downloads","issues_url":"https://api.github.com/repos/fidals/shopelectro/issues{/number}","pulls_url":"https://api.github.com/repos/fidals/shopelectro/pulls{/number}","milestones_url":"https://api.github.com/repos/fidals/shopelectro/milestones{/number}","notifications_url":"https://api.github.com/repos/fidals/shopelectro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fidals/shopelectro/labels{/name}","releases_url":"https://api.github.com/repos/fidals/shopelectro/releases{/id}","deployments_url":"https://api.github.com/repos/fidals/shopelectro/deployments","created_at":"2016-04-28T12:43:43Z","updated_at":"2018-05-06T12:30:40Z","pushed_at":"2018-05-06T23:24:14Z","git_url":"git://github.com/fidals/shopelectro.git","ssh_url":"git@github.com:fidals/shopelectro.git","clone_url":"https://github.com/fidals/shopelectro.git","svn_url":"https://github.com/fidals/shopelectro","homepage":null,"size":6259,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":33,"license":null,"forks":2,"open_issues":33,"watchers":2,"default_branch":"master"}},"base":{"label":"fidals:master","ref":"master","sha":"7dbad4656aca4845c73d9b88023e4819fa54a32e","user":{"login":"fidals","id":16228604,"avatar_url":"https://avatars0.githubusercontent.com/u/16228604?v=4","gravatar_id":"","url":"https://api.github.com/users/fidals","html_url":"https://github.com/fidals","followers_url":"https://api.github.com/users/fidals/followers","following_url":"https://api.github.com/users/fidals/following{/other_user}","gists_url":"https://api.github.com/users/fidals/gists{/gist_id}","starred_url":"https://api.github.com/users/fidals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fidals/subscriptions","organizations_url":"https://api.github.com/users/fidals/orgs","repos_url":"https://api.github.com/users/fidals/repos","events_url":"https://api.github.com/users/fidals/events{/privacy}","received_events_url":"https://api.github.com/users/fidals/received_events","type":"Organization","site_admin":false},"repo":{"id":57301144,"name":"shopelectro","full_name":"fidals/shopelectro","owner":{"login":"fidals","id":16228604,"avatar_url":"https://avatars0.githubusercontent.com/u/16228604?v=4","gravatar_id":"","url":"https://api.github.com/users/fidals","html_url":"https://github.com/fidals","followers_url":"https://api.github.com/users/fidals/followers","following_url":"https://api.github.com/users/fidals/following{/other_user}","gists_url":"https://api.github.com/users/fidals/gists{/gist_id}","starred_url":"https://api.github.com/users/fidals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fidals/subscriptions","organizations_url":"https://api.github.com/users/fidals/orgs","repos_url":"https://api.github.com/users/fidals/repos","events_url":"https://api.github.com/users/fidals/events{/privacy}","received_events_url":"https://api.github.com/users/fidals/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fidals/shopelectro","description":"shopelectro.ru site's code","fork":false,"url":"https://api.github.com/repos/fidals/shopelectro","forks_url":"https://api.github.com/repos/fidals/shopelectro/forks","keys_url":"https://api.github.com/repos/fidals/shopelectro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fidals/shopelectro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fidals/shopelectro/teams","hooks_url":"https://api.github.com/repos/fidals/shopelectro/hooks","issue_events_url":"https://api.github.com/repos/fidals/shopelectro/issues/events{/number}","events_url":"https://api.github.com/repos/fidals/shopelectro/events","assignees_url":"https://api.github.com/repos/fidals/shopelectro/assignees{/user}","branches_url":"https://api.github.com/repos/fidals/shopelectro/branches{/branch}","tags_url":"https://api.github.com/repos/fidals/shopelectro/tags","blobs_url":"https://api.github.com/repos/fidals/shopelectro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fidals/shopelectro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fidals/shopelectro/git/refs{/sha}","trees_url":"https://api.github.com/repos/fidals/shopelectro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fidals/shopelectro/statuses/{sha}","languages_url":"https://api.github.com/repos/fidals/shopelectro/languages","stargazers_url":"https://api.github.com/repos/fidals/shopelectro/stargazers","contributors_url":"https://api.github.com/repos/fidals/shopelectro/contributors","subscribers_url":"https://api.github.com/repos/fidals/shopelectro/subscribers","subscription_url":"https://api.github.com/repos/fidals/shopelectro/subscription","commits_url":"https://api.github.com/repos/fidals/shopelectro/commits{/sha}","git_commits_url":"https://api.github.com/repos/fidals/shopelectro/git/commits{/sha}","comments_url":"https://api.github.com/repos/fidals/shopelectro/comments{/number}","issue_comment_url":"https://api.github.com/repos/fidals/shopelectro/issues/comments{/number}","contents_url":"https://api.github.com/repos/fidals/shopelectro/contents/{+path}","compare_url":"https://api.github.com/repos/fidals/shopelectro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fidals/shopelectro/merges","archive_url":"https://api.github.com/repos/fidals/shopelectro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fidals/shopelectro/downloads","issues_url":"https://api.github.com/repos/fidals/shopelectro/issues{/number}","pulls_url":"https://api.github.com/repos/fidals/shopelectro/pulls{/number}","milestones_url":"https://api.github.com/repos/fidals/shopelectro/milestones{/number}","notifications_url":"https://api.github.com/repos/fidals/shopelectro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fidals/shopelectro/labels{/name}","releases_url":"https://api.github.com/repos/fidals/shopelectro/releases{/id}","deployments_url":"https://api.github.com/repos/fidals/shopelectro/deployments","created_at":"2016-04-28T12:43:43Z","updated_at":"2018-05-06T12:30:40Z","pushed_at":"2018-05-06T23:24:14Z","git_url":"git://github.com/fidals/shopelectro.git","ssh_url":"git@github.com:fidals/shopelectro.git","clone_url":"https://github.com/fidals/shopelectro.git","svn_url":"https://github.com/fidals/shopelectro","homepage":null,"size":6259,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":33,"license":null,"forks":2,"open_issues":33,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/280"},"html":{"href":"https://github.com/fidals/shopelectro/pull/280"},"issue":{"href":"https://api.github.com/repos/fidals/shopelectro/issues/280"},"comments":{"href":"https://api.github.com/repos/fidals/shopelectro/issues/280/comments"},"review_comments":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/280/comments"},"review_comment":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fidals/shopelectro/pulls/280/commits"},"statuses":{"href":"https://api.github.com/repos/fidals/shopelectro/statuses/b2b59cd88b9ab8d499c9e426b193515b2d90f3f8"}},"author_association":"OWNER"}}
{"actor":{"display_login":"duker33"}}