Return-Path: X-Original-To: apmail-allura-commits-archive@www.apache.org Delivered-To: apmail-allura-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A314917B9B for ; Sat, 30 May 2015 12:39:05 +0000 (UTC) Received: (qmail 31285 invoked by uid 500); 30 May 2015 12:39:04 -0000 Delivered-To: apmail-allura-commits-archive@allura.apache.org Received: (qmail 31230 invoked by uid 500); 30 May 2015 12:39:04 -0000 Mailing-List: contact commits-help@allura.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@allura.apache.org Delivered-To: mailing list commits@allura.apache.org Received: (qmail 30930 invoked by uid 99); 30 May 2015 12:39:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 May 2015 12:39:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4A48AE0942; Sat, 30 May 2015 12:39:04 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jetmind@apache.org To: commits@allura.apache.org Date: Sat, 30 May 2015 12:39:17 -0000 Message-Id: <4109a1b5617e4ca98b21b82253b4d779@git.apache.org> In-Reply-To: <3cef5a214a1b4547a01ad9226538b7b3@git.apache.org> References: <3cef5a214a1b4547a01ad9226538b7b3@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [14/14] allura git commit: [#7806] ticket:778 Add docker docs [#7806] ticket:778 Add docker docs Project: http://git-wip-us.apache.org/repos/asf/allura/repo Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/a50a2a81 Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/a50a2a81 Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/a50a2a81 Branch: refs/heads/ib/7806 Commit: a50a2a81290e51612dfbfcba58d41710cefb11c7 Parents: c57f2e8 Author: Igor Bondarenko Authored: Sat May 30 15:37:05 2015 +0300 Committer: Igor Bondarenko Committed: Sat May 30 15:37:05 2015 +0300 ---------------------------------------------------------------------- INSTALL-docker.markdown | 112 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/allura/blob/a50a2a81/INSTALL-docker.markdown ---------------------------------------------------------------------- diff --git a/INSTALL-docker.markdown b/INSTALL-docker.markdown new file mode 100644 index 0000000..5330084 --- /dev/null +++ b/INSTALL-docker.markdown @@ -0,0 +1,112 @@ + + +# General info + +## Allura runs on following docker containers: + +- web +- mongo +- taskd +- solr +- inmail +- outmail + +## Host-mounted volumes (created on first run) + +Current directory mounted as `/allura` inside containers. + +Python environment: + +- `env-docker/python` +- `env-docker/bin` + +Services data: + +- `/allura-data/mongo` - mongo data +- `/allura-data/solr` - SOLR index +- `/allura-data/scm/{git,hg,svn}` - code repositories +- `/allura-data/scm/snapshots` - generated code snapshots + +## Ports, exposed to host system: + +- 8080 - webapp +- 8983 - SOLR admin panel (http://localhost:8983/solr/) +- 8825 - incoming mail listener + + +# First run + +Install [Docker](http://docs.docker.com/installation/) +and [Docker Compose](https://docs.docker.com/compose/install/). + +Build/fetch all required images: + + ~$ docker-compose build + +Install requirements: + + ~$ docker-compose run web pip install -r requirements.txt + +Install Allura packages: + + ~$ docker-compose run web ./rebuild-all.bash + +Initialize database with test data: + + ~$ docker-compose run web bash -c 'cd Allura && paster setup-app docker-dev.ini' + +Start containers in background: + + ~$ docker-compose up -d + +# Useful commands + +Restarting all containers: + + ~$ docker-compose up -d + +View logs from all services: + + ~$ docker-compose logs + +You can specify one or more services to view logs only from them, e.g. to see +outgoing mail: + + ~$ docker-compose logs outmail + +Update requirements and reinstall apps: + + ~$ docker-compose run web pip install -r requirements.txt + ~$ docker-compose run web ./rebuild-all.bash + +You may want to restart at least taskd container after that in order for it to +pick up changes. + +Running all tests: + + ~$ docker-compose run web ./run_tests + +Running subset of tests: + + ~$ docker-compose run web bash -c 'cd ForgeGit && nosetests forgegit.tests.functional.test_controllers:TestFork' + +Connecting to mongo directly: + + ~$ docker-compose run mongo mongo --host mongo