GitHub PullRequestReviewCommentEvent at 2014-09-14 19:51:28
Repository: huginn
Actor: cantino
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/cantino/huginn/pulls/comments/17522010","id":17522010,"diff_hunk":"@@ -0,0 +1,124 @@\n+Huginn for docker with multiple container linkage\n+=================================================\n+\n+This image runs a linkable [Huginn](https://github.com/cantino/huginn) instance.\n+\n+There is an automated build repository on docker hub for [cantino/huginn](https://registry.hub.docker.com/builds/github/cantino/huginn/).\n+\n+This was patterned after [sameersbn/gitlab](https://registry.hub.docker.com/u/sameersbn/gitlab) by [ianblenke/huginn](http://github.com/ianblenke/huginn), and imported here for official generation of a docker hub auto-build image.\n+\n+The scripts/init script generates a .env file containing the variables as passed as per normal Huginn documentation.\n+The same environment variables that would be used for Heroku PaaS deployment are used by this script.\n+\n+The scripts/init script is aware of mysql and postgres linked containers through the environment variables:\n+\n+    MYSQL_PORT_3306_TCP_ADDR\n+    MYSQL_PORT_3306_TCP_PORT\n+\n+and\n+\n+    POSTGRESQL_PORT_5432_TCP_ADDR\n+    POSTGRESQL_PORT_5432_TCP_PORT\n+\n+Its recommended to use an image that allows you to create a database via environmental variables at docker run, like `paintedfox / postgresql` or `centurylink / mysql`, so the db is populated when this script runs.\n+\n+If you do not link a database container, a built-in mysql database will be started.\n+There is an exported docker volume of /var/lib/mysql to allow persistence of that mysql database.\n+\n+Additionally, the database variables may be overridden from the above as per the standard Huginn documentation:\n+\n+    DATABASE_ADAPTER #(must be either 'postgres' or 'mysql2')\n+    DATABASE_HOST\n+    DATABASE_PORT\n+\n+This script will run database migrations (rake db:migrate) which should be idempotent.\n+\n+It will also seed the database (rake db:seed) unless this is defined:\n+\n+    DO_NOT_SEED\n+\n+This same seeding initially defines the \"admin\" user with a default password of \"password\" as per the standard Huginn documentation.\n+\n+If you do not wish to have the default 6 agents, you will want to set the above environment variable after your initially deploy, otherwise they will be added automatically the next time a container pointing at the database is spun up.\n+\n+The CMD launches Huginn via the scripts/init script. This may become the ENTRYPOINT later.  It does take under a minute for Huginn to come up.  Use environmental variables that match your DB's creds to ensure it works.\n+\n+## Usage\n+\n+Simple stand-alone usage:\n+\n+    docker run -it -p 5000:5000 cantino/huginn\n+\n+To link to another mysql container, for example:\n+\n+    docker run --rm --name newcentury_mysql -p 3306 \\\n+        -e MYSQL_DATABASE=huginn \\\n+        -e MYSQL_USER=huginn \\\n+        -e MYSQL_PASSWORD=somethingsecret \\\n+        -e MYSQL_ROOT_PASSWORD=somethingevenmoresecret \\\n+        cantino/huginn\n+    docker run --rm --name huginn --link newcentury_mysql:MYSQL -p 5000:5000 \\\n+        -e DATABASE_NAME=huginn \\\n+        -e DATABASE_USER=huginn \\\n+        -e DATABASE_PASSWORD=somethingsecret \\\n+        cantino/huginn\n+\n+To link to another container named 'postgres':\n+\n+    docker run --rm --name huginn --link POSTGRES:mysql -p 5000:5000 -e \"DATABASE_USER=huginn\" -e \"DATABASE_PASSWORD=pass@word\" cantino/huginn\n+\n+## Environment Variables\n+\n+Other Huginn 12factored environment variables of note, as generated and put into the .env file as per Huginn documentation:\n+\n+    APP_SECRET_TOKEN=${APP_SECRET_TOKEN:-CHANGEME}\n+    DOMAIN=${HUGINN_HOST:-localhost}:${PORT:-5000}\n+    ${ASSET_HOST:+ASSET_HOST=${ASSET_HOST}}\n+    DATABASE_ADAPTER=${DATABASE_ADAPTER:-mysql2}\n+    DATABASE_ENCODING=${DATABASE_ENCODING:-utf8}\n+    DATABASE_RECONNECT=${DATABASE_RECONNECT:-true}\n+    DATABASE_NAME=${DATABASE_NAME:-huginn}\n+    DATABASE_POOL=${DATABASE_POOL:-5}\n+    DATABASE_USERNAME=${DATABASE_USERNAME:-root}\n+    DATABASE_PASSWORD=\"${DATABASE_PASSWORD}\"\n+    DATABASE_PORT=${DATABASE_PORT:-3306}\n+    DATABASE_HOST=${DATABASE_HOST:-localhost}\n+    DATABASE_PORT=${DATABASE_PORT:-3306}\n+    ${DATABASE_SOCKET:+DATABASE_SOCKET=${DATABASE_SOCKET:-/tmp/mysql.sock}}\n+    ${RAILS_ENV:+RAILS_ENV=${RAILS_ENV:-production}}\n+    FORCE_SSL=${FORCE_SSL:-false}\n+    INVITATION_CODE=${INVITATION_CODE:-try-huginn}\n+    SMTP_DOMAIN=${SMTP_DOMAIM=-example.com}\n+    SMTP_USER_NAME=${SMTP_USER_NAME:-you@gmail.com}\n+    SMTP_PASSWORD=${SMTP_PASSWORD:-somepassword}\n+    SMTP_SERVER=${SMTP_SERVER:-smtp.gmail.com}\n+    SMTP_PORT=${SMTP_PORT:-587}\n+    SMTP_AUTHENTICATION=${SMTP_AUTHENTICATION:-plain}\n+    SMTP_ENABLE_STARTTLS_AUTO=${SMTP_ENABLE_STARTTLS_AUTO:-true}\n+    EMAIL_FROM_ADDRESS=${EMAIL_FROM_ADDRESS:-huginn@example.com}\n+    AGENT_LOG_LENGTH=${AGENT_LOG_LENGTH:-200}\n+    AWS_ACCESS_KEY_ID=\"${AWS_ACCESS_KEY_ID:-your aws access key id}\"\n+    AWS_ACCESS_KEY=\"${AWS_ACCESS_KEY:-your aws access key}\"\n+    AWS_SANDBOX=${AWS_SANDBOX:-false}\n+    FARADAY_HTTP_BACKEND=${FARADAY_HTTP_BACKEND:-typhoeus}\n+    DEFAULT_HTTP_USER_AGENT=\"${DEFAULT_HTTP_USER_AGENT:-Huginn - https://github.com/cantino/huginn}\"\n+    ALLOW_JSONPATH_EVAL=${ALLOW_JSONPATH_EVAL:-false}\n+    ENABLE_INSECURE_AGENTS=${ENABLE_INSECURE_AGENTS:-false}\n+    ${USE_GRAPHVIZ_DOT:+USE_GRAPHVIZ_DOT=${USE_GRAPHVIZ_DOT:-dot}}\n+    TIMEZONE=\"${TIMEZONE:-Pacific Time (US & Canada)}\"","path":"docker/README.md","position":108,"original_position":108,"commit_id":"a587c9caa7732317cbb4331625282dae806c087d","original_commit_id":"784fae1cb2751bef9dd3057d134c5103d4fe71e4","user":{"login":"cantino","id":83835,"avatar_url":"https://avatars.githubusercontent.com/u/83835?v=2","gravatar_id":"75f5a86eb0e12c8163c17e69b72874e8","url":"https://api.github.com/users/cantino","html_url":"https://github.com/cantino","followers_url":"https://api.github.com/users/cantino/followers","following_url":"https://api.github.com/users/cantino/following{/other_user}","gists_url":"https://api.github.com/users/cantino/gists{/gist_id}","starred_url":"https://api.github.com/users/cantino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cantino/subscriptions","organizations_url":"https://api.github.com/users/cantino/orgs","repos_url":"https://api.github.com/users/cantino/repos","events_url":"https://api.github.com/users/cantino/events{/privacy}","received_events_url":"https://api.github.com/users/cantino/received_events","type":"User","site_admin":false},"body":"Yea, dotenv is parsing the .env file, so it's not technically a shell script.\r\n\r\nLet's try the HUGINN_ prefix.","created_at":"2014-09-14T19:51:28Z","updated_at":"2014-09-14T19:51:28Z","html_url":"https://github.com/cantino/huginn/pull/496#discussion_r17522010","pull_request_url":"https://api.github.com/repos/cantino/huginn/pulls/496","_links":{"self":{"href":"https://api.github.com/repos/cantino/huginn/pulls/comments/17522010"},"html":{"href":"https://github.com/cantino/huginn/pull/496#discussion_r17522010"},"pull_request":{"href":"https://api.github.com/repos/cantino/huginn/pulls/496"}}},"pull_request":{"url":"https://api.github.com/repos/cantino/huginn/pulls/496","id":21199927,"html_url":"https://github.com/cantino/huginn/pull/496","diff_url":"https://github.com/cantino/huginn/pull/496.diff","patch_url":"https://github.com/cantino/huginn/pull/496.patch","issue_url":"https://api.github.com/repos/cantino/huginn/issues/496","number":496,"state":"open","locked":false,"title":"Added ianblenke/docker-huginn as docker/ subdirectory","user":{"login":"ianblenke","id":1844764,"avatar_url":"https://avatars.githubusercontent.com/u/1844764?v=2","gravatar_id":"f719c0ceca1b36f96897d7802e89b131","url":"https://api.github.com/users/ianblenke","html_url":"https://github.com/ianblenke","followers_url":"https://api.github.com/users/ianblenke/followers","following_url":"https://api.github.com/users/ianblenke/following{/other_user}","gists_url":"https://api.github.com/users/ianblenke/gists{/gist_id}","starred_url":"https://api.github.com/users/ianblenke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianblenke/subscriptions","organizations_url":"https://api.github.com/users/ianblenke/orgs","repos_url":"https://api.github.com/users/ianblenke/repos","events_url":"https://api.github.com/users/ianblenke/events{/privacy}","received_events_url":"https://api.github.com/users/ianblenke/received_events","type":"User","site_admin":false},"body":"moved Dockerfile out of the root and renamed as Dockerfile.rbenv","created_at":"2014-09-14T03:06:17Z","updated_at":"2014-09-14T19:51:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"421ee5fa2094324a28005bd8346cf1221e3e2327","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cantino/huginn/pulls/496/commits","review_comments_url":"https://api.github.com/repos/cantino/huginn/pulls/496/comments","review_comment_url":"https://api.github.com/repos/cantino/huginn/pulls/comments/{number}","comments_url":"https://api.github.com/repos/cantino/huginn/issues/496/comments","statuses_url":"https://api.github.com/repos/cantino/huginn/statuses/a587c9caa7732317cbb4331625282dae806c087d","head":{"label":"ianblenke:replace-dockerfile","ref":"replace-dockerfile","sha":"a587c9caa7732317cbb4331625282dae806c087d","user":{"login":"ianblenke","id":1844764,"avatar_url":"https://avatars.githubusercontent.com/u/1844764?v=2","gravatar_id":"f719c0ceca1b36f96897d7802e89b131","url":"https://api.github.com/users/ianblenke","html_url":"https://github.com/ianblenke","followers_url":"https://api.github.com/users/ianblenke/followers","following_url":"https://api.github.com/users/ianblenke/following{/other_user}","gists_url":"https://api.github.com/users/ianblenke/gists{/gist_id}","starred_url":"https://api.github.com/users/ianblenke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianblenke/subscriptions","organizations_url":"https://api.github.com/users/ianblenke/orgs","repos_url":"https://api.github.com/users/ianblenke/repos","events_url":"https://api.github.com/users/ianblenke/events{/privacy}","received_events_url":"https://api.github.com/users/ianblenke/received_events","type":"User","site_admin":false},"repo":{"id":24011789,"name":"huginn","full_name":"ianblenke/huginn","owner":{"login":"ianblenke","id":1844764,"avatar_url":"https://avatars.githubusercontent.com/u/1844764?v=2","gravatar_id":"f719c0ceca1b36f96897d7802e89b131","url":"https://api.github.com/users/ianblenke","html_url":"https://github.com/ianblenke","followers_url":"https://api.github.com/users/ianblenke/followers","following_url":"https://api.github.com/users/ianblenke/following{/other_user}","gists_url":"https://api.github.com/users/ianblenke/gists{/gist_id}","starred_url":"https://api.github.com/users/ianblenke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianblenke/subscriptions","organizations_url":"https://api.github.com/users/ianblenke/orgs","repos_url":"https://api.github.com/users/ianblenke/repos","events_url":"https://api.github.com/users/ianblenke/events{/privacy}","received_events_url":"https://api.github.com/users/ianblenke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ianblenke/huginn","description":"Build agents that monitor and act on your behalf.  Your agents are standing by!","fork":true,"url":"https://api.github.com/repos/ianblenke/huginn","forks_url":"https://api.github.com/repos/ianblenke/huginn/forks","keys_url":"https://api.github.com/repos/ianblenke/huginn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ianblenke/huginn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ianblenke/huginn/teams","hooks_url":"https://api.github.com/repos/ianblenke/huginn/hooks","issue_events_url":"https://api.github.com/repos/ianblenke/huginn/issues/events{/number}","events_url":"https://api.github.com/repos/ianblenke/huginn/events","assignees_url":"https://api.github.com/repos/ianblenke/huginn/assignees{/user}","branches_url":"https://api.github.com/repos/ianblenke/huginn/branches{/branch}","tags_url":"https://api.github.com/repos/ianblenke/huginn/tags","blobs_url":"https://api.github.com/repos/ianblenke/huginn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ianblenke/huginn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ianblenke/huginn/git/refs{/sha}","trees_url":"https://api.github.com/repos/ianblenke/huginn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ianblenke/huginn/statuses/{sha}","languages_url":"https://api.github.com/repos/ianblenke/huginn/languages","stargazers_url":"https://api.github.com/repos/ianblenke/huginn/stargazers","contributors_url":"https://api.github.com/repos/ianblenke/huginn/contributors","subscribers_url":"https://api.github.com/repos/ianblenke/huginn/subscribers","subscription_url":"https://api.github.com/repos/ianblenke/huginn/subscription","commits_url":"https://api.github.com/repos/ianblenke/huginn/commits{/sha}","git_commits_url":"https://api.github.com/repos/ianblenke/huginn/git/commits{/sha}","comments_url":"https://api.github.com/repos/ianblenke/huginn/comments{/number}","issue_comment_url":"https://api.github.com/repos/ianblenke/huginn/issues/comments/{number}","contents_url":"https://api.github.com/repos/ianblenke/huginn/contents/{+path}","compare_url":"https://api.github.com/repos/ianblenke/huginn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ianblenke/huginn/merges","archive_url":"https://api.github.com/repos/ianblenke/huginn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ianblenke/huginn/downloads","issues_url":"https://api.github.com/repos/ianblenke/huginn/issues{/number}","pulls_url":"https://api.github.com/repos/ianblenke/huginn/pulls{/number}","milestones_url":"https://api.github.com/repos/ianblenke/huginn/milestones{/number}","notifications_url":"https://api.github.com/repos/ianblenke/huginn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ianblenke/huginn/labels{/name}","releases_url":"https://api.github.com/repos/ianblenke/huginn/releases{/id}","created_at":"2014-09-14T02:37:17Z","updated_at":"2014-09-13T23:15:16Z","pushed_at":"2014-09-14T12:10:02Z","git_url":"git://github.com/ianblenke/huginn.git","ssh_url":"git@github.com:ianblenke/huginn.git","clone_url":"https://github.com/ianblenke/huginn.git","svn_url":"https://github.com/ianblenke/huginn","homepage":null,"size":14482,"stargazers_count":0,"watchers_count":0,"language":null,"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":"cantino:master","ref":"master","sha":"b71ad2e99c5dc86343541271ee5d2bf2e1dbfbbf","user":{"login":"cantino","id":83835,"avatar_url":"https://avatars.githubusercontent.com/u/83835?v=2","gravatar_id":"75f5a86eb0e12c8163c17e69b72874e8","url":"https://api.github.com/users/cantino","html_url":"https://github.com/cantino","followers_url":"https://api.github.com/users/cantino/followers","following_url":"https://api.github.com/users/cantino/following{/other_user}","gists_url":"https://api.github.com/users/cantino/gists{/gist_id}","starred_url":"https://api.github.com/users/cantino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cantino/subscriptions","organizations_url":"https://api.github.com/users/cantino/orgs","repos_url":"https://api.github.com/users/cantino/repos","events_url":"https://api.github.com/users/cantino/events{/privacy}","received_events_url":"https://api.github.com/users/cantino/received_events","type":"User","site_admin":false},"repo":{"id":8681349,"name":"huginn","full_name":"cantino/huginn","owner":{"login":"cantino","id":83835,"avatar_url":"https://avatars.githubusercontent.com/u/83835?v=2","gravatar_id":"75f5a86eb0e12c8163c17e69b72874e8","url":"https://api.github.com/users/cantino","html_url":"https://github.com/cantino","followers_url":"https://api.github.com/users/cantino/followers","following_url":"https://api.github.com/users/cantino/following{/other_user}","gists_url":"https://api.github.com/users/cantino/gists{/gist_id}","starred_url":"https://api.github.com/users/cantino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cantino/subscriptions","organizations_url":"https://api.github.com/users/cantino/orgs","repos_url":"https://api.github.com/users/cantino/repos","events_url":"https://api.github.com/users/cantino/events{/privacy}","received_events_url":"https://api.github.com/users/cantino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cantino/huginn","description":"Build agents that monitor and act on your behalf.  Your agents are standing by!","fork":false,"url":"https://api.github.com/repos/cantino/huginn","forks_url":"https://api.github.com/repos/cantino/huginn/forks","keys_url":"https://api.github.com/repos/cantino/huginn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cantino/huginn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cantino/huginn/teams","hooks_url":"https://api.github.com/repos/cantino/huginn/hooks","issue_events_url":"https://api.github.com/repos/cantino/huginn/issues/events{/number}","events_url":"https://api.github.com/repos/cantino/huginn/events","assignees_url":"https://api.github.com/repos/cantino/huginn/assignees{/user}","branches_url":"https://api.github.com/repos/cantino/huginn/branches{/branch}","tags_url":"https://api.github.com/repos/cantino/huginn/tags","blobs_url":"https://api.github.com/repos/cantino/huginn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cantino/huginn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cantino/huginn/git/refs{/sha}","trees_url":"https://api.github.com/repos/cantino/huginn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cantino/huginn/statuses/{sha}","languages_url":"https://api.github.com/repos/cantino/huginn/languages","stargazers_url":"https://api.github.com/repos/cantino/huginn/stargazers","contributors_url":"https://api.github.com/repos/cantino/huginn/contributors","subscribers_url":"https://api.github.com/repos/cantino/huginn/subscribers","subscription_url":"https://api.github.com/repos/cantino/huginn/subscription","commits_url":"https://api.github.com/repos/cantino/huginn/commits{/sha}","git_commits_url":"https://api.github.com/repos/cantino/huginn/git/commits{/sha}","comments_url":"https://api.github.com/repos/cantino/huginn/comments{/number}","issue_comment_url":"https://api.github.com/repos/cantino/huginn/issues/comments/{number}","contents_url":"https://api.github.com/repos/cantino/huginn/contents/{+path}","compare_url":"https://api.github.com/repos/cantino/huginn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cantino/huginn/merges","archive_url":"https://api.github.com/repos/cantino/huginn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cantino/huginn/downloads","issues_url":"https://api.github.com/repos/cantino/huginn/issues{/number}","pulls_url":"https://api.github.com/repos/cantino/huginn/pulls{/number}","milestones_url":"https://api.github.com/repos/cantino/huginn/milestones{/number}","notifications_url":"https://api.github.com/repos/cantino/huginn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cantino/huginn/labels{/name}","releases_url":"https://api.github.com/repos/cantino/huginn/releases{/id}","created_at":"2013-03-10T06:00:31Z","updated_at":"2014-09-14T07:32:42Z","pushed_at":"2014-09-14T06:54:26Z","git_url":"git://github.com/cantino/huginn.git","ssh_url":"git@github.com:cantino/huginn.git","clone_url":"https://github.com/cantino/huginn.git","svn_url":"https://github.com/cantino/huginn","homepage":null,"size":14482,"stargazers_count":7893,"watchers_count":7893,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":721,"mirror_url":null,"open_issues_count":90,"forks":721,"open_issues":90,"watchers":7893,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cantino/huginn/pulls/496"},"html":{"href":"https://github.com/cantino/huginn/pull/496"},"issue":{"href":"https://api.github.com/repos/cantino/huginn/issues/496"},"comments":{"href":"https://api.github.com/repos/cantino/huginn/issues/496/comments"},"review_comments":{"href":"https://api.github.com/repos/cantino/huginn/pulls/496/comments"},"review_comment":{"href":"https://api.github.com/repos/cantino/huginn/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/cantino/huginn/pulls/496/commits"},"statuses":{"href":"https://api.github.com/repos/cantino/huginn/statuses/a587c9caa7732317cbb4331625282dae806c087d"}}}}