{"action":"created","issue":{"url":"https://api.github.com/repos/dimagi/commcare-hq/issues/5502","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/5502/labels{/name}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/5502/comments","events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/5502/events","html_url":"https://github.com/dimagi/commcare-hq/pull/5502","id":57286574,"number":5502,"title":"Build and run CommCareHQ in a docker container","user":{"login":"charlesfleche","id":2563098,"avatar_url":"https://avatars.githubusercontent.com/u/2563098?v=3","gravatar_id":"","url":"https://api.github.com/users/charlesfleche","html_url":"https://github.com/charlesfleche","followers_url":"https://api.github.com/users/charlesfleche/followers","following_url":"https://api.github.com/users/charlesfleche/following{/other_user}","gists_url":"https://api.github.com/users/charlesfleche/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesfleche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesfleche/subscriptions","organizations_url":"https://api.github.com/users/charlesfleche/orgs","repos_url":"https://api.github.com/users/charlesfleche/repos","events_url":"https://api.github.com/users/charlesfleche/events{/privacy}","received_events_url":"https://api.github.com/users/charlesfleche/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dimagi/commcare-hq/labels/Open%20for%20review:%20hold%20off%20on%20merge","name":"Open for review: hold off on merge","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-02-11T07:59:06Z","updated_at":"2015-02-18T12:38:33Z","closed_at":"2015-02-18T11:36:34Z","pull_request":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/5502","html_url":"https://github.com/dimagi/commcare-hq/pull/5502","diff_url":"https://github.com/dimagi/commcare-hq/pull/5502.diff","patch_url":"https://github.com/dimagi/commcare-hq/pull/5502.patch"},"body":"PURPOSE\r\nAllowing non-tech people to install and run offline demo instances of CommCareHQ for training / remote app building purpose.\r\n\r\nNOTE\r\nThis PR adds the necessary files to create and run a CommCareHQ [docker](https://en.wikipedia.org/wiki/Docker_%28software%29) image, allowing to easily run local instances on local servers / laptops. It also updates the install.sh script.\r\n\r\nTRY IT\r\n* [install docker](http://docs.docker.com/installation)\r\n* run {commcare-hq}/docker/docker-start.sh\r\n* connect to http://localhost:8000 (or your boot2docker instance address on OSX / Windows)\r\n* login: example@example.com / password: example\r\n\r\nTODO\r\nThis PR is probably not ready for integration quite yet. But as I won't be online until next week it gives me the opportunity to show what I'm working on these days, collect feature requests and allow to build local docker images as it is going to take a while to push my layers from Myanmar… These tasks are my next moves :\r\n* try this on OSX / Windows\r\n* write a user documentation on the CommCare wiki\r\n* allow to stop / restart the containers\r\n* allow app building\r\n* add elasticsearch\r\n\r\nCHANGES\r\n* Dockerfile creates a Dedian Wheezy based CommCareHQ image\r\n\r\nWheezy has been choosen as a base image because the official redis, postgres and couchdb are based on the same image, potentialy reducing the amount of data to download.\r\n\r\nThe apt-get calls should be concatenated into a single one. My bandwidth here is just too thin to allow me to recreate entire install layers while building an image.\r\n\r\n* docker/docker-start.sh instanciates the databases and commcarehq\r\n\r\nDatabases initializations (users, db, django) is done by instanciating temporary couchdb / postgres / commcarehq images that already contain the necessary binaries (like psql).\r\n\r\n* docker/docker-rm.sh deletes each db + commcarehq instances\r\n\r\n* install.sh\r\n  * Automatically download the jdk if required\r\n  * Update the Ubuntu package name for add-apt-repository\r\n  * Removed now unused dependencies to couchdb-lucene and egenix-mx-base\r\n"},"comment":{"url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments/74857336","html_url":"https://github.com/dimagi/commcare-hq/pull/5502#issuecomment-74857336","issue_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/5502","id":74857336,"user":{"login":"NoahCarnahan","id":2117127,"avatar_url":"https://avatars.githubusercontent.com/u/2117127?v=3","gravatar_id":"","url":"https://api.github.com/users/NoahCarnahan","html_url":"https://github.com/NoahCarnahan","followers_url":"https://api.github.com/users/NoahCarnahan/followers","following_url":"https://api.github.com/users/NoahCarnahan/following{/other_user}","gists_url":"https://api.github.com/users/NoahCarnahan/gists{/gist_id}","starred_url":"https://api.github.com/users/NoahCarnahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NoahCarnahan/subscriptions","organizations_url":"https://api.github.com/users/NoahCarnahan/orgs","repos_url":"https://api.github.com/users/NoahCarnahan/repos","events_url":"https://api.github.com/users/NoahCarnahan/events{/privacy}","received_events_url":"https://api.github.com/users/NoahCarnahan/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T12:38:33Z","updated_at":"2015-02-18T12:38:33Z","body":"Hey @charlesfleche, I think you can set which files dimagimon ignores in the [.lintrc](https://github.com/dimagi/commcare-hq/blob/master/.lintrc) file located in the project root. I'm excited to see hq on docker!"}}