You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2017/09/29 17:52:38 UTC

[1/6] allura git commit: Replace g.url usage with h.absurl; have it always use config.base_url so it works fine behind proxies, etc

Repository: allura
Updated Branches:
  refs/heads/db/docker-prod [created] b77412985


Replace g.url usage with h.absurl; have it always use config.base_url so it works fine behind proxies, etc


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/4a2a8b08
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/4a2a8b08
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/4a2a8b08

Branch: refs/heads/db/docker-prod
Commit: 4a2a8b08d82238d3c2c8149752049453fd001ca9
Parents: 3395a18
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Aug 22 22:53:29 2017 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Sep 29 12:28:01 2017 -0400

----------------------------------------------------------------------
 Allura/allura/lib/app_globals.py                         | 7 -------
 Allura/allura/lib/helpers.py                             | 7 +------
 Allura/allura/model/auth.py                              | 3 ++-
 Allura/allura/templates/oauth_authorize_ok.html          | 4 ++--
 Allura/allura/tests/functional/test_auth.py              | 4 ++--
 Allura/allura/tests/functional/test_user_profile.py      | 4 ++--
 Allura/allura/tests/scripts/test_create_sitemap_files.py | 6 +++---
 Allura/allura/tests/test_globals.py                      | 5 +----
 Allura/allura/tests/test_helpers.py                      | 9 +--------
 Allura/test.ini                                          | 2 ++
 ForgeGit/forgegit/tests/model/test_repository.py         | 8 ++++----
 ForgeSVN/forgesvn/tests/model/test_repository.py         | 6 +++---
 ForgeTracker/forgetracker/tests/functional/test_root.py  | 2 +-
 13 files changed, 24 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index 749edda..539e51f 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -544,13 +544,6 @@ class Globals(object):
         'h.set_context() is preferred over this method'
         c.app = c.project.app_instance(name)
 
-    def url(self, base, **kw):
-        params = urlencode(kw)
-        if params:
-            return '%s%s?%s' % (request.host_url, base, params)
-        else:
-            return '%s%s' % (request.host_url, base)
-
     def postload_contents(self):
         text = '''
 '''

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/Allura/allura/lib/helpers.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py
index c4116da..de9273a 100644
--- a/Allura/allura/lib/helpers.py
+++ b/Allura/allura/lib/helpers.py
@@ -455,12 +455,7 @@ def absurl(url):
         return None
     if '://' in url:
         return url
-    try:
-        # try request first, so we can get proper http/https value
-        host = request.host_url
-    except TypeError:
-        # for tests, etc
-        host = tg.config['base_url'].rstrip('/')
+    host = tg.config['base_url'].rstrip('/')
     return host + url
 
 

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 69a3bd7..780e8dd 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -206,7 +206,8 @@ please visit the following URL:
 %s
 ''' % (self.email,
        self.claimed_by_user(include_pending=True).username,
-       g.url('/auth/verify_addr', a=self.nonce))
+       h.absurl('/auth/verify_addr?a={}'.format(h.urlquote(self.nonce))),
+       )
         log.info('Verification email:\n%s', text)
         allura.tasks.mail_tasks.sendsimplemail.post(
             fromaddr=g.noreply,

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/Allura/allura/templates/oauth_authorize_ok.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/oauth_authorize_ok.html b/Allura/allura/templates/oauth_authorize_ok.html
index 02f1de0..a727b72 100644
--- a/Allura/allura/templates/oauth_authorize_ok.html
+++ b/Allura/allura/templates/oauth_authorize_ok.html
@@ -26,8 +26,8 @@
 {% block content %}
 <p>You have authorized {{ rtok.consumer_token.name }} access to your account.  If you wish
   to revoke this access at any time, please visit 
-  <a href="{{g.url('/auth/preferences/') }}">user preferences</a>
+  <a href="/auth/preferences">user preferences</a>
   and click 'revoke access'.</p>
 <h2>PIN: {{ rtok.validation_pin }}</h2>
-<a href="{{g.url('/auth/preferences/')}}">Return to preferences</a>
+<a href="/auth/preferences/">Return to preferences</a>
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/Allura/allura/tests/functional/test_auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_auth.py b/Allura/allura/tests/functional/test_auth.py
index 7def429..780e1cf 100644
--- a/Allura/allura/tests/functional/test_auth.py
+++ b/Allura/allura/tests/functional/test_auth.py
@@ -928,9 +928,9 @@ class TestAuth(TestController):
         r = self.app.get('/auth/logout')
         r = self.app.post('/auth/do_login', antispam=True, params=dict(
             username='test-user', password='foo',
-            return_to='http://localhost:8080/foo',
+            return_to='http://localhost/foo',
             _session_id=self.app.cookies['_session_id']))
-        assert_equal(r.location, 'http://localhost:8080/foo')
+        assert_equal(r.location, 'http://localhost/foo')
 
         r = self.app.get('/auth/logout')
         r = self.app.post('/auth/do_login', antispam=True, params=dict(

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/Allura/allura/tests/functional/test_user_profile.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_user_profile.py b/Allura/allura/tests/functional/test_user_profile.py
index 5655b4b..2707260 100644
--- a/Allura/allura/tests/functional/test_user_profile.py
+++ b/Allura/allura/tests/functional/test_user_profile.py
@@ -103,7 +103,7 @@ class TestUserProfile(TestController):
 
         sendsimplemail.post.assert_called_once_with(
             cc=User.by_username('test-admin').get_pref('email_address'),
-            text=u'test message\n\n---\n\nThis message was sent to you via the Allura web mail form.  You may reply to this message directly, or send a message to Test Admin at http://localhost:8080/u/test-admin/profile/send_message\n',
+            text=u'test message\n\n---\n\nThis message was sent to you via the Allura web mail form.  You may reply to this message directly, or send a message to Test Admin at http://localhost/u/test-admin/profile/send_message\n',
             toaddr=User.by_username('test-user').get_pref('email_address'),
             fromaddr=User.by_username('test-admin').get_pref('email_address'),
             reply_to=User.by_username('test-admin').get_pref('email_address'),
@@ -116,7 +116,7 @@ class TestUserProfile(TestController):
 
         sendsimplemail.post.assert_called_once_with(
             cc=None,
-            text=u'test message\n\n---\n\nThis message was sent to you via the Allura web mail form.  You may reply to this message directly, or send a message to Test Admin at http://localhost:8080/u/test-admin/profile/send_message\n',
+            text=u'test message\n\n---\n\nThis message was sent to you via the Allura web mail form.  You may reply to this message directly, or send a message to Test Admin at http://localhost/u/test-admin/profile/send_message\n',
             toaddr=User.by_username('test-user').get_pref('email_address'),
             fromaddr=User.by_username('test-admin').get_pref('email_address'),
             reply_to=User.by_username('test-admin').get_pref('email_address'),

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/Allura/allura/tests/scripts/test_create_sitemap_files.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/scripts/test_create_sitemap_files.py b/Allura/allura/tests/scripts/test_create_sitemap_files.py
index 240d7ba..df00e98 100644
--- a/Allura/allura/tests/scripts/test_create_sitemap_files.py
+++ b/Allura/allura/tests/scripts/test_create_sitemap_files.py
@@ -50,9 +50,9 @@ class TestCreateSitemapFiles(object):
             xml_index = ET.parse(os.path.join(tmpdir.path, 'sitemap.xml'))
             ns = {'ns0': 'http://www.sitemaps.org/schemas/sitemap/0.9'}
             locs = [loc.text for loc in xml_index.findall('ns0:sitemap/ns0:loc', ns)]
-            assert_in('http://localhost:8080/allura_sitemap/sitemap-0.xml', locs)
+            assert_in('http://localhost/allura_sitemap/sitemap-0.xml', locs)
 
             xml_0 = ET.parse(os.path.join(tmpdir.path, 'sitemap-0.xml'))
             urls = [loc.text for loc in xml_0.findall('ns0:url/ns0:loc', ns)]
-            assert_in('http://localhost:8080/p/wiki/', urls)
-            assert_in('http://localhost:8080/p/test/sub1/', urls)
+            assert_in('http://localhost/p/wiki/', urls)
+            assert_in('http://localhost/p/test/sub1/', urls)

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index ec87f16..a3dd87d 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -74,9 +74,6 @@ def test_app_globals():
     with h.push_context('test', 'wiki', neighborhood='Projects'):
         assert g.app_static(
             'css/wiki.css') == '/nf/_static_/wiki/css/wiki.css', g.app_static('css/wiki.css')
-        assert g.url(
-            '/foo', a='foo bar') == 'http://localhost/foo?a=foo+bar', g.url('/foo', a='foo bar')
-        assert g.url('/foo') == 'http://localhost/foo', g.url('/foo')
 
 
 @with_setup(setUp)
@@ -443,7 +440,7 @@ Some text in a regular paragraph
     for i in range(10):
         print i
 ''')
-    assert_in('http://localhost:8080/', g.forge_markdown(email=True).convert('[Home]'))
+    assert_in('http://localhost/', g.forge_markdown(email=True).convert('[Home]'))
     assert 'class="codehilite"' in g.markdown.convert('''
 ~~~~
 def foo(): pass

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/Allura/allura/tests/test_helpers.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_helpers.py b/Allura/allura/tests/test_helpers.py
index 8435a12..fbc9813 100644
--- a/Allura/allura/tests/test_helpers.py
+++ b/Allura/allura/tests/test_helpers.py
@@ -491,17 +491,10 @@ class TestUrlOpen(TestCase):
         self.assertEqual(urlopen.call_count, 1)
 
 
-def test_absurl_no_request():
+def test_absurl():
     assert_equals(h.absurl('/p/test/foobar'), 'http://localhost/p/test/foobar')
 
 
-@patch.object(h, 'request',
-              new=Request.blank('/p/test/foobar', base_url='https://www.mysite.com/p/test/foobar'))
-def test_absurl_with_request():
-    assert_equals(h.absurl('/p/test/foobar'),
-                  'https://www.mysite.com/p/test/foobar')
-
-
 def test_daterange():
     assert_equals(
         list(h.daterange(datetime(2013, 1, 1), datetime(2013, 1, 4))),

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/Allura/test.ini
----------------------------------------------------------------------
diff --git a/Allura/test.ini b/Allura/test.ini
index 4381cb6..8c7abb1 100644
--- a/Allura/test.ini
+++ b/Allura/test.ini
@@ -53,6 +53,8 @@ debug = false
 ; not necessary anyway
 stats.sample_rate = 0
 
+base_url = http://localhost
+
 ; specify these without any build_key being included
 ew.script_name = /nf/_ew_/
 ew.url_base = /nf/_ew_/

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 222a11f..a23e5f0 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -213,7 +213,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
         with open(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive')) as f:
             c = f.read()
         self.assertIn(
-            'curl -s http://localhost:8080/auth/refresh_repo/p/test/src-git/\n', c)
+            'curl -s http://localhost/auth/refresh_repo/p/test/src-git/\n', c)
         self.assertIn('exec $DIR/post-receive-user\n', c)
         shutil.rmtree(dirname)
 
@@ -247,7 +247,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
             with open(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive')) as f:
                 c = f.read()
             self.assertIn(
-                'curl -s http://localhost:8080/auth/refresh_repo/p/test/src-git/\n', c)
+                'curl -s http://localhost/auth/refresh_repo/p/test/src-git/\n', c)
             self.assertIn('exec $DIR/post-receive-user\n', c)
             shutil.rmtree(dirname)
 
@@ -469,12 +469,12 @@ http://example.com/
 
 By Dave Brondsema''', text_body)
         # these bracketed links could look like HTML tags, ensure they don't get removed
-        assert_in('further messages, please visit <http://localhost:8080/auth/subscriptions/>', text_body)
+        assert_in('further messages, please visit <http://localhost/auth/subscriptions/>', text_body)
 
         # limited markdown handling of commit messages (see `markdown_commit`)
         # and HTML escaped
         assert_in('''<hr/>
-<div class="markdown_content"><p>Add foo.txt.  Commit ref <a class="alink" href="http://localhost:8080/p/test/weird-chars/ci/616d24f8dd4e95cadd8e93df5061f09855d1a066/">[616d24f8dd4e95cadd8e93df5061f09855d1a066]</a> *bold* &lt;b&gt;bold&lt;/b&gt;</p>
+<div class="markdown_content"><p>Add foo.txt.  Commit ref <a class="alink" href="http://localhost/p/test/weird-chars/ci/616d24f8dd4e95cadd8e93df5061f09855d1a066/">[616d24f8dd4e95cadd8e93df5061f09855d1a066]</a> *bold* &lt;b&gt;bold&lt;/b&gt;</p>
 <p>* one<br/>
 * two<br/>
 * three</p>

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 18ec0fa..8a8814c 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -166,7 +166,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
         with open(os.path.join(g.tmpdir, 'testsvn/hooks/post-commit')) as f:
             hook_data = f.read()
         self.assertIn(
-            'curl -s http://localhost:8080/auth/refresh_repo/p/test/src/\n',
+            'curl -s http://localhost/auth/refresh_repo/p/test/src/\n',
             hook_data)
         self.assertIn('exec $DIR/post-commit-user "$@"\n', hook_data)
 
@@ -218,7 +218,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
         with open(os.path.join(g.tmpdir, 'testsvn/hooks/post-commit')) as f:
             c = f.read()
         self.assertIn(
-            'curl -s http://localhost:8080/auth/refresh_repo/p/test/src/\n', c)
+            'curl -s http://localhost/auth/refresh_repo/p/test/src/\n', c)
         self.assertIn('exec $DIR/post-commit-user "$@"\n', c)
 
         repo.refresh(notify=False)
@@ -877,7 +877,7 @@ class TestRepo(_TestWithRepo):
         for n in notifications:
             if '100 new commits' in n.subject:
                 assert_in(u'By Test Committer on 10/08/2010 15:32', n.text)
-                assert_in(u'http://localhost:8080/ci/foo99/', n.text)
+                assert_in(u'http://localhost/ci/foo99/', n.text)
                 break
         else:
             assert False, 'Did not find notification'

http://git-wip-us.apache.org/repos/asf/allura/blob/4a2a8b08/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 8113d02..40afa8c 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -2396,7 +2396,7 @@ class TestFunctionalController(TrackerTestController):
             # check subject
             assert 'Subject: [test:bugs] #1 test <h2> ticket' in body
             # check html, need tags escaped
-            assert_in('<p><strong> <a class="alink" href="http://localhost:8080/p/test/bugs/1/">[bugs:#1]</a>'
+            assert_in('<p><strong> <a class="alink" href="http://localhost/p/test/bugs/1/">[bugs:#1]</a>'
                       ' test &lt;h2&gt; ticket</strong></p>',
                       body)
             # check plaintext (ok to have "html" tags)


[6/6] allura git commit: [#7908] split step-by-step instructions to separate doc; Add note to docker setup about using production files

Posted by br...@apache.org.
[#7908] split step-by-step instructions to separate doc; Add note to docker setup about using production files


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/b7741298
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/b7741298
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/b7741298

Branch: refs/heads/db/docker-prod
Commit: b77412985b53c4edc126a746f5b7dfabf2598152
Parents: 5edd691
Author: Dave Brondsema <da...@brondsema.net>
Authored: Fri Sep 29 13:40:17 2017 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Sep 29 13:40:40 2017 -0400

----------------------------------------------------------------------
 Allura/docs/getting_started/index.rst           |   1 +
 .../docs/getting_started/install_each_step.rst  | 239 +++++++++++++++++++
 Allura/docs/getting_started/installation.rst    | 224 +----------------
 README.markdown                                 |   4 +-
 4 files changed, 250 insertions(+), 218 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/b7741298/Allura/docs/getting_started/index.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/getting_started/index.rst b/Allura/docs/getting_started/index.rst
index 6f59b58..f2c8a2c 100644
--- a/Allura/docs/getting_started/index.rst
+++ b/Allura/docs/getting_started/index.rst
@@ -25,6 +25,7 @@ Getting Started
 
     about
     installation
+    install_each_step
     using
     administration
     scm_host

http://git-wip-us.apache.org/repos/asf/allura/blob/b7741298/Allura/docs/getting_started/install_each_step.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/getting_started/install_each_step.rst b/Allura/docs/getting_started/install_each_step.rst
new file mode 100644
index 0000000..42f4a9b
--- /dev/null
+++ b/Allura/docs/getting_started/install_each_step.rst
@@ -0,0 +1,239 @@
+..     Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+
+.. _step-by-step-install:
+
+*************************
+Step-by-Step Installation
+*************************
+
+.. contents::
+   :local:
+
+Step-by-Step Installation
+-------------------------
+
+For a simpler setup using Docker images, see :ref:`docker-install` instead.
+
+In these instructions, we'll use `VirtualBox <http://www.virtualbox.org>`__ and `Ubuntu 16.04 <http://ubuntu.com>`_ (15.04 works too) to create a disposable sandbox for Allura development/testing.  Allura should work on other Linux systems (including OSX), but setting up all the dependencies will be different.
+
+* Download and install `VirtualBox <http://www.virtualbox.org/wiki/Downloads>`__ for your platform.
+
+* Download a minimal `Ubuntu 16.04 64-bit ISO <https://help.ubuntu.com/community/Installation/MinimalCD>`_.
+
+* Create a new virtual machine in Virtual Box, selecting Ubuntu (64 bit) as the OS type.  The rest of the wizards' defaults are fine.
+
+* When you launch the virtual machine for the first time, you will be prompted to attach your installation media.  Browse to the :file:`mini.iso` that you downloaded earlier.
+
+* After a text-only installation, you may end up with a blank screen and blinking cursor.  Press :code:`Alt-F1` to switch to the first console.
+
+* Consult `available documentation <https://help.ubuntu.com/>`_ for help installing Ubuntu.
+
+
+System Packages
+^^^^^^^^^^^^^^^
+
+Before we begin, you'll need to install some system packages.
+
+.. code-block:: bash
+
+    ~$ sudo apt-get install git-core python2.7-dev libssl-dev libldap2-dev libsasl2-dev libjpeg8-dev zlib1g-dev libffi-dev
+
+To install MongoDB, follow the instructions `here <https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/>`_.
+
+Optional, for SVN support:
+
+.. code-block:: bash
+
+    ~$ sudo apt-get install subversion python-svn
+
+Setting up a virtual python environment
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The first step to installing the Allura platform is installing a virtual environment via `virtualenv <https://virtualenv.pypa.io/en/latest/>`_.  This helps keep our distribution python installation clean.
+
+.. code-block:: bash
+
+    ~$ sudo apt-get install python-pip
+    ~$ sudo pip install virtualenv
+
+Once you have virtualenv installed, you need to create a virtual environment.  We'll call our Allura environment 'env-allura'.
+
+.. code-block:: bash
+
+    ~$ virtualenv env-allura
+
+This gives us a nice, clean environment into which we can install all the allura dependencies.
+In order to use the virtual environment, you'll need to activate it:
+
+.. code-block:: bash
+
+    ~$ . env-allura/bin/activate
+
+You'll need to do this whenever you're working on the Allura codebase so you may want to consider adding it to your :file:`~/.bashrc` file.
+
+Creating the log directory
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: bash
+
+    (env-allura)~$ sudo mkdir -p /var/log/allura
+    (env-allura)~$ sudo chown $(whoami) /var/log/allura
+
+Installing the Allura code and dependencies
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Now we can get down to actually getting the Allura code and dependencies downloaded and ready to go.  If you don't have the source code yet, run:
+
+.. code-block:: bash
+
+    (env-allura)~$ mkdir src
+    (env-allura)~$ cd src
+    (env-allura)~/src$ git clone https://git-wip-us.apache.org/repos/asf/allura.git allura
+
+If you already reading this file from an Allura release or checkout, you're ready to continue.
+
+Although the application :file:`setup.py` files define a number of dependencies, the :file:`requirements.txt` files are currently the authoritative source, so we'll use those with `pip <https://pip.pypa.io/en/stable/>`_ to make sure the correct versions are installed.
+
+.. code-block:: bash
+
+    (env-allura)~/src$ cd allura
+    (env-allura)~/src/allura$ pip install -r requirements.txt
+
+This will take a while.  If you get an error from pip, it is typically a temporary download error.  Just run the command again and it will quickly pass through the packages it already downloaded and then continue.
+
+Optional, for SVN support: symlink the system pysvn package into our virtual environment
+
+.. code-block:: bash
+
+    (env-allura)~/src/allura$ ln -s /usr/lib/python2.7/dist-packages/pysvn ~/env-allura/lib/python2.7/site-packages/
+
+Next, run this to set up all the Allura tools:
+
+.. code-block:: bash
+
+    (env-allura)~/src/allura$ ./rebuild-all.bash
+
+.. note::
+
+    If you only want to use a few tools, run this instead:
+
+    .. code-block:: bash
+
+        (env-allura)~/src/allura$ cd Allura
+        (env-allura)~/src/allura/Allura$ python setup.py develop
+        (env-allura)~/src/allura/Allura$ cd ../ForgeWiki   # required tool
+        (env-allura)~/src/allura/ForgeWiki$ python setup.py develop
+        # repeat for any other tools you want to use
+
+Initializing the environment
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The Allura forge consists of several components, all of which need to be running to have full functionality.
+
+SOLR search and indexing server
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+We have a custom config ready for use.
+
+.. code-block:: bash
+
+    (env-allura)~$ cd tmp
+    (env-allura)/tmp$ sudo apt-get install default-jre-headless unzip
+    (env-allura)/tmp$ wget -nv http://archive.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz
+    (env-allura)/tmp$ tar xvf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2
+    (env-allura)/tmp$ sudo ./install_solr_service.sh solr-5.3.1.tgz
+
+    (env-allura)/tmp$ cd ~/src/allura
+    (env-allura)~/src/allura$ sudo -H -u solr bash -c 'cp -R solr_config/allura/ /var/solr/data/'
+    (env-allura)~/src/allura$ sudo service solr start
+
+
+Create code repo directories
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The default configuration stores repos in :file:`/srv`, so we need to create those directories:
+
+.. code-block:: bash
+
+    ~$ sudo mkdir /srv/{git,svn,hg}
+    ~$ sudo chown $USER /srv/{git,svn,hg}
+    ~$ sudo chmod 775 /srv/{git,svn,hg}
+
+If you don't have :code:`sudo` permission or just want to store them somewhere else, change the :file:`/srv` paths in :file:`development.ini`
+
+If you want to set up remote access to the repositories, see :ref:`scm_hosting`
+
+Allura task processing
+~~~~~~~~~~~~~~~~~~~~~~
+
+Allura uses a background task service called "taskd" to do async tasks like sending emails, and indexing data into solr, etc.  Let's get it running
+
+.. code-block:: bash
+
+    (env-allura)~$ cd ~/src/allura/Allura
+    (env-allura)~/src/allura/Allura$ nohup paster taskd development.ini > /var/log/allura/taskd.log 2>&1 &
+
+
+A few more steps, if using git
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If you're using a released version of Allura, these are already done for you.  This transpiles JS into a version all browsers support.
+For non-Ubuntu installations see https://nodejs.org/en/download/package-manager/ for other options to replace the first line here:
+
+.. code-block:: bash
+
+    (env-allura)~$ curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash -
+    (env-allura)~$ sudo apt-get install nodejs
+    (env-allura)~$ cd ~/src/allura
+    (env-allura)~$ npm install
+    (env-allura)~$ npm run build
+
+
+The application server
+~~~~~~~~~~~~~~~~~~~~~~
+
+In order to initialize the Allura database, you'll need to run the following:
+
+For development setup:
+
+.. code-block:: bash
+
+    (env-allura)~/src/allura/Allura$ paster setup-app development.ini
+
+For production setup:
+
+.. code-block:: bash
+
+    (env-allura)~/src/allura/Allura$ ALLURA_TEST_DATA=False paster setup-app development.ini
+
+This shouldn't take too long, but it will start the taskd server doing tons of stuff in the background.  Once this is done, you can start the application server:
+
+.. code-block:: bash
+
+    (env-allura)~/src/allura/Allura$ gunicorn --reload --paste development.ini  # add --daemon to run in the background
+
+Next Steps
+^^^^^^^^^^
+
+Go to the Allura webapp running on your `local machine <http://localhost:8080/>`_ port 8080.
+
+* Read :ref:`post-setup-instructions`
+* Ask questions and discuss Allura on the `allura-dev mailing list <http://mail-archives.apache.org/mod_mbox/allura-dev/>`_
+* Run the test suite (slow): :code:`$ ALLURA_VALIDATION=none ./run_tests`
+* File bug reports at https://forge-allura.apache.org/p/allura/tickets/new/ (login required)
+* Contribute code according to :ref:`this guide <contributing>`

http://git-wip-us.apache.org/repos/asf/allura/blob/b7741298/Allura/docs/getting_started/installation.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/getting_started/installation.rst b/Allura/docs/getting_started/installation.rst
index 4b22e1f..4df2994 100644
--- a/Allura/docs/getting_started/installation.rst
+++ b/Allura/docs/getting_started/installation.rst
@@ -22,222 +22,7 @@ Installation
 .. contents::
    :local:
 
-.. _step-by-step-install:
-
-Step-by-Step Installation
--------------------------
-
-For a simpler setup using Docker images, see :ref:`docker-install` instead.
-
-In these instructions, we'll use `VirtualBox <http://www.virtualbox.org>`__ and `Ubuntu 16.04 <http://ubuntu.com>`_ (15.04 works too) to create a disposable sandbox for Allura development/testing.  Allura should work on other Linux systems (including OSX), but setting up all the dependencies will be different.
-
-* Download and install `VirtualBox <http://www.virtualbox.org/wiki/Downloads>`__ for your platform.
-
-* Download a minimal `Ubuntu 16.04 64-bit ISO <https://help.ubuntu.com/community/Installation/MinimalCD>`_.
-
-* Create a new virtual machine in Virtual Box, selecting Ubuntu (64 bit) as the OS type.  The rest of the wizards' defaults are fine.
-
-* When you launch the virtual machine for the first time, you will be prompted to attach your installation media.  Browse to the :file:`mini.iso` that you downloaded earlier.
-
-* After a text-only installation, you may end up with a blank screen and blinking cursor.  Press :code:`Alt-F1` to switch to the first console.
-
-* Consult `available documentation <https://help.ubuntu.com/>`_ for help installing Ubuntu.
-
-
-System Packages
-^^^^^^^^^^^^^^^
-
-Before we begin, you'll need to install some system packages.
-
-.. code-block:: bash
-
-    ~$ sudo apt-get install git-core python2.7-dev libssl-dev libldap2-dev libsasl2-dev libjpeg8-dev zlib1g-dev libffi-dev
-
-To install MongoDB, follow the instructions `here <https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/>`_.
-
-Optional, for SVN support:
-
-.. code-block:: bash
-
-    ~$ sudo apt-get install subversion python-svn
-
-Setting up a virtual python environment
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The first step to installing the Allura platform is installing a virtual environment via `virtualenv <https://virtualenv.pypa.io/en/latest/>`_.  This helps keep our distribution python installation clean.
-
-.. code-block:: bash
-
-    ~$ sudo apt-get install python-pip
-    ~$ sudo pip install virtualenv
-
-Once you have virtualenv installed, you need to create a virtual environment.  We'll call our Allura environment 'env-allura'.
-
-.. code-block:: bash
-
-    ~$ virtualenv env-allura
-
-This gives us a nice, clean environment into which we can install all the allura dependencies.
-In order to use the virtual environment, you'll need to activate it:
-
-.. code-block:: bash
-
-    ~$ . env-allura/bin/activate
-
-You'll need to do this whenever you're working on the Allura codebase so you may want to consider adding it to your :file:`~/.bashrc` file.
-
-Creating the log directory
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. code-block:: bash
-
-    (env-allura)~$ sudo mkdir -p /var/log/allura
-    (env-allura)~$ sudo chown $(whoami) /var/log/allura
-
-Installing the Allura code and dependencies
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Now we can get down to actually getting the Allura code and dependencies downloaded and ready to go.  If you don't have the source code yet, run:
-
-.. code-block:: bash
-
-    (env-allura)~$ mkdir src
-    (env-allura)~$ cd src
-    (env-allura)~/src$ git clone https://git-wip-us.apache.org/repos/asf/allura.git allura
-
-If you already reading this file from an Allura release or checkout, you're ready to continue.
-
-Although the application :file:`setup.py` files define a number of dependencies, the :file:`requirements.txt` files are currently the authoritative source, so we'll use those with `pip <https://pip.pypa.io/en/stable/>`_ to make sure the correct versions are installed.
-
-.. code-block:: bash
-
-    (env-allura)~/src$ cd allura
-    (env-allura)~/src/allura$ pip install -r requirements.txt
-
-This will take a while.  If you get an error from pip, it is typically a temporary download error.  Just run the command again and it will quickly pass through the packages it already downloaded and then continue.
-
-Optional, for SVN support: symlink the system pysvn package into our virtual environment
-
-.. code-block:: bash
-
-    (env-allura)~/src/allura$ ln -s /usr/lib/python2.7/dist-packages/pysvn ~/env-allura/lib/python2.7/site-packages/
-
-Next, run this to set up all the Allura tools:
-
-.. code-block:: bash
-
-    (env-allura)~/src/allura$ ./rebuild-all.bash
-
-.. note::
-
-    If you only want to use a few tools, run this instead:
-
-    .. code-block:: bash
-
-        (env-allura)~/src/allura$ cd Allura
-        (env-allura)~/src/allura/Allura$ python setup.py develop
-        (env-allura)~/src/allura/Allura$ cd ../ForgeWiki   # required tool
-        (env-allura)~/src/allura/ForgeWiki$ python setup.py develop
-        # repeat for any other tools you want to use
-
-Initializing the environment
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The Allura forge consists of several components, all of which need to be running to have full functionality.
-
-SOLR search and indexing server
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-We have a custom config ready for use.
-
-.. code-block:: bash
-
-    (env-allura)~$ cd tmp
-    (env-allura)/tmp$ sudo apt-get install default-jre-headless unzip
-    (env-allura)/tmp$ wget -nv http://archive.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz
-    (env-allura)/tmp$ tar xvf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2
-    (env-allura)/tmp$ sudo ./install_solr_service.sh solr-5.3.1.tgz
-
-    (env-allura)/tmp$ cd ~/src/allura
-    (env-allura)~/src/allura$ sudo -H -u solr bash -c 'cp -R solr_config/allura/ /var/solr/data/'
-    (env-allura)~/src/allura$ sudo service solr start
-
-
-Create code repo directories
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The default configuration stores repos in :file:`/srv`, so we need to create those directories:
-
-.. code-block:: bash
-
-    ~$ sudo mkdir /srv/{git,svn,hg}
-    ~$ sudo chown $USER /srv/{git,svn,hg}
-    ~$ sudo chmod 775 /srv/{git,svn,hg}
-
-If you don't have :code:`sudo` permission or just want to store them somewhere else, change the :file:`/srv` paths in :file:`development.ini`
-
-If you want to set up remote access to the repositories, see :ref:`scm_hosting`
-
-Allura task processing
-~~~~~~~~~~~~~~~~~~~~~~
-
-Allura uses a background task service called "taskd" to do async tasks like sending emails, and indexing data into solr, etc.  Let's get it running
-
-.. code-block:: bash
-
-    (env-allura)~$ cd ~/src/allura/Allura
-    (env-allura)~/src/allura/Allura$ nohup paster taskd development.ini > /var/log/allura/taskd.log 2>&1 &
-
-
-A few more steps, if using git
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-If you're using a released version of Allura, these are already done for you.  This transpiles JS into a version all browsers support.
-For non-Ubuntu installations see https://nodejs.org/en/download/package-manager/ for other options to replace the first line here:
-
-.. code-block:: bash
-
-    (env-allura)~$ curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash -
-    (env-allura)~$ sudo apt-get install nodejs
-    (env-allura)~$ cd ~/src/allura
-    (env-allura)~$ npm install
-    (env-allura)~$ npm run build
-
-
-The application server
-~~~~~~~~~~~~~~~~~~~~~~
-
-In order to initialize the Allura database, you'll need to run the following:
-
-For development setup:
-
-.. code-block:: bash
-
-    (env-allura)~/src/allura/Allura$ paster setup-app development.ini
-
-For production setup:
-
-.. code-block:: bash
-
-    (env-allura)~/src/allura/Allura$ ALLURA_TEST_DATA=False paster setup-app development.ini
-
-This shouldn't take too long, but it will start the taskd server doing tons of stuff in the background.  Once this is done, you can start the application server:
-
-.. code-block:: bash
-
-    (env-allura)~/src/allura/Allura$ gunicorn --reload --paste development.ini  # add --daemon to run in the background
-
-Next Steps
-^^^^^^^^^^
-
-Go to the Allura webapp running on your `local machine <http://localhost:8080/>`_ port 8080.
-(If you're running this inside a VM, you'll probably have to configure the port forwarding settings)
-
-* Read :ref:`post-setup-instructions`
-* Ask questions and discuss Allura on the `allura-dev mailing list <http://mail-archives.apache.org/mod_mbox/allura-dev/>`_
-* Run the test suite (slow): :code:`$ ALLURA_VALIDATION=none ./run_tests`
-* File bug reports at https://forge-allura.apache.org/p/allura/tickets/new/ (login required)
-* Contribute code according to :ref:`this guide <contributing>`
+To install without Docker requires installing and configuring many services.  See :ref:`step-by-step-install`.
 
 .. _docker-install:
 
@@ -253,6 +38,13 @@ Install `Docker <http://docs.docker.com/installation/>`_ and `Docker Compose <ht
 On Linux, you may need to `create a docker group <https://docs.docker.com/engine/installation/linux/ubuntulinux/#create-a-docker-group>`_.  On Mac, make sure
 you're in a directory that Virtual Box shares through to the VM (by default, anywhere in your home directory works).
 
+.. note::
+
+   For a production-ready Allura, follow the instructions in :file:`Allura/production-docker-example.ini`.
+   Then run :code:`export COMPOSE_FILE=docker-compose-prod.yml` and continue running the following commands.
+   This will give you HTTPS, settings for better performance and no debugging, and only expose necessary ports.
+
+
 Run the following commands in your allura directory:
 
 Build/fetch all required images:

http://git-wip-us.apache.org/repos/asf/allura/blob/b7741298/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index 3245ddd..b0bbc4b 100644
--- a/README.markdown
+++ b/README.markdown
@@ -40,8 +40,8 @@ Website: <https://allura.apache.org/>
 
 Before hacking on Allura, you’ll need to get an Allura instance up and running so you can see and test the changes you make. You can install Allura from scratch, or by using our Docker container images. Instructions for these approaches can be found here:
 
-- [Install from scratch](https://forge-allura.apache.org/docs/getting_started/installation.html#step-by-step-install)
-- [Install using Docker](https://forge-allura.apache.org/docs/getting_started/installation.html#docker-install)
+- [Install using Docker](https://forge-allura.apache.org/docs/getting_started/installation.html)
+- [Install from scratch](https://forge-allura.apache.org/docs/getting_started/install_each_step.html)
 
 To install Allura, see `Allura/docs/getting_started/installation.rst` or <https://forge-allura.apache.org/docs/getting_started/installation.html>.
 


[3/6] allura git commit: Replace forgemail.url with base_url

Posted by br...@apache.org.
Replace forgemail.url with base_url


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/401fcb06
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/401fcb06
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/401fcb06

Branch: refs/heads/db/docker-prod
Commit: 401fcb06d5d215120c27d0d0684af9bb5f07071c
Parents: 9838d01
Author: Dave Brondsema <da...@brondsema.net>
Authored: Wed Aug 23 12:39:14 2017 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Sep 29 12:28:02 2017 -0400

----------------------------------------------------------------------
 Allura/allura/model/notification.py | 2 +-
 Allura/allura/model/repository.py   | 2 +-
 Allura/development.ini              | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/401fcb06/Allura/allura/model/notification.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/notification.py b/Allura/allura/model/notification.py
index 80ff6a6..c4e2c24 100644
--- a/Allura/allura/model/notification.py
+++ b/Allura/allura/model/notification.py
@@ -688,7 +688,7 @@ class MailFooter(object):
         return cls._render('mail/footer.txt',
                            domain=config['domain'],
                            notification=notification,
-                           prefix=config['forgemail.url'],
+                           prefix=config['base_url'],
                            allow_email_posting=allow_email_posting,
                            **kw)
 

http://git-wip-us.apache.org/repos/asf/allura/blob/401fcb06/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 0a22230..25b5560 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -62,7 +62,7 @@ from .session import repository_orm_session
 log = logging.getLogger(__name__)
 config = utils.ConfigProxy(
     common_suffix='forgemail.domain',
-    common_prefix='forgemail.url')
+)
 
 README_RE = re.compile('^README(\.[^.]*)?$', re.IGNORECASE)
 VIEWABLE_EXTENSIONS = frozenset([

http://git-wip-us.apache.org/repos/asf/allura/blob/401fcb06/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index d740765..a644ae5 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -79,8 +79,6 @@ site_name = Allura
 domain = localhost
 ; Change this to your website's full URL
 base_url = http://localhost:8080
-; This should be the same as base_url
-forgemail.url = http://localhost:8080
 
 ; Change this to configure your image path and redirect link
 ; for the logo


[4/6] allura git commit: Include Date header in email, instead of assuming mail service will add it

Posted by br...@apache.org.
Include Date header in email, instead of assuming mail service will add it


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/9838d015
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/9838d015
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/9838d015

Branch: refs/heads/db/docker-prod
Commit: 9838d01592f6adcbf042da67fbabfb50d827f876
Parents: 4a2a8b0
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Aug 22 22:59:28 2017 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Sep 29 12:28:02 2017 -0400

----------------------------------------------------------------------
 Allura/allura/lib/mail_util.py | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/9838d015/Allura/allura/lib/mail_util.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/mail_util.py b/Allura/allura/lib/mail_util.py
index 68a9649..211d4e6 100644
--- a/Allura/allura/lib/mail_util.py
+++ b/Allura/allura/lib/mail_util.py
@@ -232,6 +232,7 @@ class SMTPClient(object):
         message['Reply-To'] = AddrHeader(reply_to)
         message['Subject'] = Header(subject)
         message['Message-ID'] = Header('<' + message_id + u'>')
+        message['Date'] = email.utils.formatdate()
         if sender:
             message['Sender'] = AddrHeader(sender)
         if cc:


[5/6] allura git commit: [#7908] docker-compose and .ini files for prod; httpd config proxies back to webapp, sample robots.txt too

Posted by br...@apache.org.
[#7908] docker-compose and .ini files for prod; httpd config proxies back to webapp, sample robots.txt too


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/5edd6914
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/5edd6914
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/5edd6914

Branch: refs/heads/db/docker-prod
Commit: 5edd69144dea9d2a2144761c8b8c59c788397fde
Parents: cc3b773
Author: Dave Brondsema <da...@brondsema.net>
Authored: Thu Sep 28 13:25:55 2017 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Sep 29 13:40:40 2017 -0400

----------------------------------------------------------------------
 Allura/docker-dev.ini                          |   6 +-
 Allura/docs/getting_started/administration.rst |  19 +-
 Allura/docs/getting_started/installation.rst   |  12 +-
 Allura/production-docker-example.ini           | 189 ++++++++++++++++++++
 docker-compose-prod.yml                        | 143 +++++++++++++++
 docker-compose.yml                             |   6 +-
 scm_config/git-http/Dockerfile                 |   4 +-
 scm_config/git-http/git-http.conf              |  22 ++-
 scripts/init-docker-dev.sh                     |   3 +
 9 files changed, 382 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/5edd6914/Allura/docker-dev.ini
----------------------------------------------------------------------
diff --git a/Allura/docker-dev.ini b/Allura/docker-dev.ini
index 709cd79..ee7734f 100644
--- a/Allura/docker-dev.ini
+++ b/Allura/docker-dev.ini
@@ -18,7 +18,7 @@
 [server:main]
 use = egg:Paste#http
 host = 0.0.0.0
-port = 8080
+port = 8088
 
 [app:main]
 use = config:development.ini#main
@@ -29,13 +29,13 @@ ming.main.uri = mongodb://mongo:27017/allura
 ming.project.uri = mongodb://mongo:27017/project-data
 ming.task.uri = mongodb://mongo:27017/task
 
-scm.repos.refresh_base_url = http://web:8080
+scm.repos.refresh_base_url = http://web:8088
 
 scm.repos.root = /allura-data/scm
 
 scm.clonechoices.git = [{"name": "HTTP", "key": "http", "title": "HTTP"}, {"name": "File", "key": "file", "title": "Filesystem"}]
 ; may need to change "localhost" to your remote host name, or docker-machine IP address
-scm.host.http.git = http://localhost:8081/git$path
+scm.host.http.git = http://localhost:8080/git$path
 scm.host.file.git = /allura-data/scm/git$path
 scm.clonechoices.hg = [{"name": "File", "key": "file", "title": "Filesystem"}]
 scm.host.file.hg = /allura-data/scm/hg$path

http://git-wip-us.apache.org/repos/asf/allura/blob/5edd6914/Allura/docs/getting_started/administration.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/getting_started/administration.rst b/Allura/docs/getting_started/administration.rst
index 9ed2f3d..cb4683c 100644
--- a/Allura/docs/getting_started/administration.rst
+++ b/Allura/docs/getting_started/administration.rst
@@ -84,14 +84,14 @@ Overview
 --------
 
 Allura has many commands and scripts that can be run from the server commandline to
-administrate Allura.  There are also tasks that can be run through the `taskd` system
+administrate Allura.  There are also tasks that can be run through the :code:`taskd` system
 in the background.  These tasks can be submitted via the web at
 http://MYSITE/nf/admin/task_manager  Some paster scripts have been set up
 so that they are runnable as tasks too, giving you the convenience of starting
-them through the web and letting `taskd` execute them, rather than from a server
+them through the web and letting :code:`taskd` execute them, rather than from a server
 shell.
 
-Commands can be discovered and run via the `paster` command when you are in the
+Commands can be discovered and run via the :code:`paster` command when you are in the
 'Allura' directory that has your .ini file.  For example::
 
      paster help
@@ -103,7 +103,7 @@ Commands can be discovered and run via the `paster` command when you are in the
      paster create-neighborhood development.ini myneighborhood myuser ...
 
 
-Scripts are in the `scripts/` directory and run slightly differently, via `paster script`.  An extra
+Scripts are in the :file:`scripts/` directory and run slightly differently, via :code:`paster script`.  An extra
 :kbd:`--` is required to separate script arguments from paster arguments.  Example::
 
      paster script development.ini ../scripts/add_user_to_group.py -- --help
@@ -111,16 +111,21 @@ Scripts are in the `scripts/` directory and run slightly differently, via `paste
 
      paster script development.ini ../scripts/add_user_to_group.py -- --nbhd /u/ johndoe Admin
 
-To run these when using docker, prefix with :code:`docker-compose run taskd` and use :code:`docker-dev.ini` like::
+To run these when using docker, prefix with :code:`docker-compose run taskd` and use :file:`docker-dev.ini` like::
 
     docker-compose run taskd paster create-neighborhood docker-dev.ini myneighborhood myuser ...
 
+Or with the docker *production* setup::
+
+    docker-compose run --rm oneoff paster create-neighborhood /allura-data/production.ini myneighborhood myuser ...
+
+
 Tasks can be run via the web interface at http://MYSITE/nf/admin/task_manager  You must know
 the full task name, e.g. :code:`allura.tasks.admin_tasks.install_app`  You can
 optionally provide a username and project and app which will get set on the
-current context (`c`).  You should specify what args and kwargs will be passed
+current context (:kbd:`c`).  You should specify what args and kwargs will be passed
 as parameters to the task.  They are specified in JSON format on the form.  If you are
-running a script via this interface, the `args/kwargs` JSON should be like::
+running a script via this interface, the :kbd:`args/kwargs` JSON should be like::
 
     {
         "args": ["--foo --bar baz"],

http://git-wip-us.apache.org/repos/asf/allura/blob/5edd6914/Allura/docs/getting_started/installation.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/getting_started/installation.rst b/Allura/docs/getting_started/installation.rst
index 1ff1b7d..4b22e1f 100644
--- a/Allura/docs/getting_started/installation.rst
+++ b/Allura/docs/getting_started/installation.rst
@@ -500,13 +500,19 @@ emails sent to that address will be added as comments on the ticket.  To set up
 
 By default this uses port 8825.  Depending on your mail routing, you may need to change that port number.
 And if the port is in use, this command will fail.  You can check the log file for any errors.
-To change the port number, edit `development.ini` and change `forgemail.port` to the appropriate port number for your environment.
+To change the port number, edit :file:`development.ini` and change :samp:`forgemail.port` to the appropriate port number for your environment.
 
 SMTP in development
 ^^^^^^^^^^^^^^^^^^^
 
-The following command can be used for quick and easy monitoring of smtp during development.
-Just be sure the port matches the `smtp_port` from your `development.ini` (8826 by default).
+The following command can be used for quick and easy monitoring of outgoing email during development.
+
+.. code-block:: bash
+
+    docker-compose logs -f outmail
+
+If you are running locally without docker, run this command.  Be sure the port matches the :samp:`smtp_port` from
+your :file:`development.ini` (8826 by default).
 
 .. code-block:: bash
 

http://git-wip-us.apache.org/repos/asf/allura/blob/5edd6914/Allura/production-docker-example.ini
----------------------------------------------------------------------
diff --git a/Allura/production-docker-example.ini b/Allura/production-docker-example.ini
new file mode 100644
index 0000000..f5f918d
--- /dev/null
+++ b/Allura/production-docker-example.ini
@@ -0,0 +1,189 @@
+;       Licensed to the Apache Software Foundation (ASF) under one
+;       or more contributor license agreements.  See the NOTICE file
+;       distributed with this work for additional information
+;       regarding copyright ownership.  The ASF licenses this file
+;       to you under the Apache License, Version 2.0 (the
+;       "License"); you may not use this file except in compliance
+;       with the License.  You may obtain a copy of the License at
+;
+;         http://www.apache.org/licenses/LICENSE-2.0
+;
+;       Unless required by applicable law or agreed to in writing,
+;       software distributed under the License is distributed on an
+;       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+;       KIND, either express or implied.  See the License for the
+;       specific language governing permissions and limitations
+;       under the License.
+
+
+; Copy this file to /allura-data/production.ini
+;
+; And then you MUST change several settings in here
+;
+; Find every reference of myexamplesite.com here and change it
+; Also change:
+;  site_name
+;  smtp_server
+;  beaker.session.validate_key
+;
+; This file inherits settings from docker-dev.ini and development.ini
+; You are free to make additional changes/additions to this file for other settings
+
+
+[server:main]
+use = egg:Paste#http
+host = 0.0.0.0
+port = 8080
+
+[app:main]
+;  this is a path within docker, thus it's just /allura
+use = config:/allura/Allura/docker-dev.ini#main
+
+; "set" must be used since we're inheriting with the "use" line above
+set debug = false
+
+; Used to uniquify references to static resources, can be a timestamp or any unique value
+; This should be updated each time you deploy (or make significant changes, like new tools, new css)
+build_key=1276635823
+
+base_url = https://myexamplesite.com
+domain = myexamplesite.com
+site_name = My Example Site
+;force_ssl.pattern = .
+
+; outgoing mail
+; result of `ip addr show docker0`
+; https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach
+smtp_server = 172.17.0.1
+smtp_port = 25
+smtp_tls = true
+
+forgemail.domain = .myexamplesite.com
+forgemail.return_path = noreply@myexamplesite.com
+
+beaker.session.validate_key = 712de83fa0cb0d0f0a383
+
+auth.allow_birth_date = false
+trovecategories.enableediting = admin
+
+scm.repos.refresh_base_url = http://web:8080
+scm.clonechoices.git = [{"name": "HTTPS", "key": "https", "title": "HTTPS"}]
+scm.host.https.git = https://myexamplesite.com/git$path
+;scm.host.rw.git = https://$username@myexamplesite.com/git$path
+scm.repos.tarball.enable = false
+
+jinja_bytecode_cache_type = filesystem
+auto_reload_templates = false
+lcd_timeout = 15
+markdown_cache_threshold = .1
+repo_refs_cache_threshold = .1
+
+stats.sample_rate = .01
+
+
+
+[app:task]
+use = main
+override_root = task ; TurboGears will use controllers/task.py as root controller
+
+
+
+[loggers]
+keys = root, allura, sqlalchemy, paste, pylons, ew, taskdstatus, timermiddleware, tmw_details
+
+[handlers]
+keys = console, stats, taskdstatus, timermiddleware
+
+[formatters]
+keys = generic, stats, timermiddleware
+
+; If you create additional loggers, add them as a key to [loggers]
+[logger_root]
+level = INFO
+handlers = console, stats
+
+[logger_allura]
+level = INFO
+handlers =
+qualname = allura
+
+[logger_sqlalchemy]
+level = INFO
+handlers =
+qualname = sqlalchemy.engine
+; "level = INFO" logs SQL queries.
+; "level = DEBUG" logs SQL queries and results.
+; "level = WARN" logs neither.  (Recommended for production systems.)
+
+[logger_paste]
+level = INFO
+qualname = paste
+handlers =
+
+[logger_pylons]
+level = INFO
+qualname = pylons
+handlers =
+
+[logger_ew]
+; easy widgets
+level = WARN
+qualname = ew
+handlers =
+
+[logger_tmw_details]
+; DEBUG will include every instrumented call in our logging
+level = INFO
+qualname = timermiddleware
+handlers =
+
+[logger_taskdstatus]
+level = INFO
+qualname = taskdstatus
+handlers = taskdstatus
+
+[logger_timermiddleware]
+level = INFO
+handlers = timermiddleware
+qualname = stats
+propagate = 0
+
+; If you create additional handlers, add them as a key to [handlers]
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[handler_stats]
+class = allura.lib.utils.StatsHandler
+args = ('rtstats.log', 'allura', 1)
+level = NOTSET
+formatter = stats
+
+[handler_taskdstatus]
+class = handlers.WatchedFileHandler
+args = ('taskd_status.log', 'a')
+level = NOTSET
+formatter = generic
+
+[handler_timermiddleware]
+class = handlers.WatchedFileHandler
+; if you run 'gunicorn' in allura/Allura/ then that's where this file will be
+; you may want to hard-code a specific directory here.
+args = ('stats.log', 'a')
+level = NOTSET
+formatter = timermiddleware
+
+; If you create additional formatters, add them as a key to [formatters]
+[formatter_generic]
+format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
+datefmt = %H:%M:%S
+
+[formatter_stats]
+format = %(asctime)s %(created)d %(kwpairs)s
+datefmt = %d/%b/%Y:%H:%M:%S UTC
+
+[formatter_timermiddleware]
+format = {"time": "%(asctime)s,%(msecs)03d", "level": "%(levelname)-5.5s", "name": "%(name)s", "message": %(message)s}
+datefmt = %Y-%m-%d %H:%M:%S
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/allura/blob/5edd6914/docker-compose-prod.yml
----------------------------------------------------------------------
diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml
new file mode 100644
index 0000000..19bcfaf
--- /dev/null
+++ b/docker-compose-prod.yml
@@ -0,0 +1,143 @@
+#       Licensed to the Apache Software Foundation (ASF) under one
+#       or more contributor license agreements.  See the NOTICE file
+#       distributed with this work for additional information
+#       regarding copyright ownership.  The ASF licenses this file
+#       to you under the Apache License, Version 2.0 (the
+#       "License"); you may not use this file except in compliance
+#       with the License.  You may obtain a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#       Unless required by applicable law or agreed to in writing,
+#       software distributed under the License is distributed on an
+#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#       KIND, either express or implied.  See the License for the
+#       specific language governing permissions and limitations
+#       under the License.
+
+
+##
+# How to use this file:
+#
+# Change these settings:
+#    VIRTUAL_HOST
+#    LETSENCRYPT_HOST
+#    LETSENCRYPT_EMAIL
+#
+# Copy Allura/production-docker-example.ini to /allura-data/production.ini and review its contents,
+#  making changes as appropriate
+#
+# In comparision to the development version of docker-compose.yml, this production ready version:
+#  * only exposes ports that are necessary, limiting them to within docker, or to 127.0.0.1
+#  * sets containers to always restart
+#  * has an nginx proxy to provide HTTPS via letsencrypt.  May take a little time to configure itself
+#  * has no debugging "outmail" container, emails should go out into the real world
+#  * git-http container serves git and also proxies back to the "web" container
+##
+
+version: "2"
+services:
+  web:
+    build: .
+    environment: &env
+      # PATH=/allura-data/virtualenv/bin:$PATH doesn't work; see https://github.com/docker/compose/issues/650
+      - PATH=/allura-data/virtualenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+    expose:
+      - "8080"
+    volumes: &volumes
+      - .:/allura  # Allura source code from local host
+      - /allura-data:/allura-data  # for virtualenv, scm repos, etc
+    links:
+      - mongo
+      - solr
+    command: gunicorn --paste /allura-data/production.ini
+    restart: always
+
+  taskd:
+    image: allura_web
+    working_dir: /allura/Allura
+    environment: *env
+    command: paster taskd /allura-data/production.ini
+    volumes: *volumes
+    links:
+      - mongo
+      - solr
+    restart: always
+
+  # This is a single-purpose container that does not auto-restart, good for running commands like:
+  # docker-compose run --rm oneoff paster ensure_index /allura-data/production.ini
+  oneoff:
+    image: allura_web
+    working_dir: /allura/Allura
+    environment: *env
+    volumes: *volumes
+    command: ls /dev/null
+    links:
+      - mongo
+
+  solr:
+    image: solr:6-alpine  # alpine is a very small distro base
+    expose:
+      - "8983"
+    volumes:
+      - ./solr_config/allura:/opt/solr/server/solr/allura
+      - /allura-data/solr:/opt/solr/server/solr/allura/data
+    restart: always
+
+  mongo:
+    image: mongo:3.4
+    ports:
+      - "127.0.0.1:27017:27017"
+    volumes:
+      - /allura-data/mongo:/data/db
+    command: mongod --storageEngine wiredTiger
+    restart: always
+
+  inmail:
+    image: allura_web
+    working_dir: /allura/Allura
+    environment: *env
+    volumes: *volumes
+    command: paster smtp_server /allura-data/production.ini
+    ports:
+      - "127.0.0.1:8825:8825"
+    links:
+      - mongo
+    restart: always
+
+  git-http:
+    build: scm_config/git-http/
+    expose:
+      - "80"
+    volumes: *volumes
+    links:
+      - mongo
+      - web
+    restart: always
+    environment:
+      VIRTUAL_HOST: allura-vm2.apache.org
+      LETSENCRYPT_HOST: allura-vm2.apache.org
+      LETSENCRYPT_EMAIL: dave@brondsema.net
+
+  # References for how we set up the nginx-proxy and letsencrypt-nginx-proxy-companion containers
+  # https://github.com/dataminelab/docker-jenkins-nginx-letsencrypt
+  # https://github.com/dmitrym0/simple-lets-encrypt-docker-compose-sample/blob/master/docker-compose.yml
+  nginx-proxy:
+    image: jwilder/nginx-proxy
+    ports:
+      - "80:80"
+      - "443:443"
+    volumes:
+      - "./nginx/vhost.d:/etc/nginx/vhost.d"
+      - "./nginx/html:/usr/share/nginx/html"
+      - "./nginx/certs:/etc/nginx/certs"
+      - "/var/run/docker.sock:/tmp/docker.sock:ro"
+    restart: always
+
+  letsencrypt-nginx-proxy-companion:
+    image: jrcs/letsencrypt-nginx-proxy-companion
+    volumes:
+      - "/var/run/docker.sock:/var/run/docker.sock:ro"
+    volumes_from:
+      - "nginx-proxy"
+    restart: always
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/allura/blob/5edd6914/docker-compose.yml
----------------------------------------------------------------------
diff --git a/docker-compose.yml b/docker-compose.yml
index 9374f90..b91a0a0 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -23,7 +23,7 @@ services:
       # PATH=/allura-data/virtualenv/bin:$PATH doesn't work; see https://github.com/docker/compose/issues/650
       - PATH=/allura-data/virtualenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
     ports:
-      - "8080:8080"
+      - "8088:8088"
     volumes: &volumes
       - .:/allura  # Allura source code from local host
       - /allura-data:/allura-data  # for virtualenv, scm repos, etc
@@ -78,10 +78,10 @@ services:
     links:
       - mongo
 
-  git-http:
+  http:
     build: scm_config/git-http/
     ports:
-      - "8081:80"
+      - "8080:80"
     volumes: *volumes
     links:
       - mongo

http://git-wip-us.apache.org/repos/asf/allura/blob/5edd6914/scm_config/git-http/Dockerfile
----------------------------------------------------------------------
diff --git a/scm_config/git-http/Dockerfile b/scm_config/git-http/Dockerfile
index b2e1b28..36111b1 100644
--- a/scm_config/git-http/Dockerfile
+++ b/scm_config/git-http/Dockerfile
@@ -40,12 +40,12 @@ ENV APACHE_SERVERNAME localhost
 ENV APACHE_SERVERALIAS docker.localhost
 ENV APACHE_DOCUMENTROOT /var/www
 
+RUN a2enmod cgi proxy proxy_http
+
 ADD ./git-http.conf /etc/apache2/sites-available/
 RUN a2dissite 000-default.conf
 RUN a2ensite git-http.conf
 
-RUN a2enmod cgi
-
 # so that git operations run as root, and can modify the scm repo files
 RUN chmod u+s /usr/lib/git-core/git-http-backend
 

http://git-wip-us.apache.org/repos/asf/allura/blob/5edd6914/scm_config/git-http/git-http.conf
----------------------------------------------------------------------
diff --git a/scm_config/git-http/git-http.conf b/scm_config/git-http/git-http.conf
index f6f059e..6919ed7 100644
--- a/scm_config/git-http/git-http.conf
+++ b/scm_config/git-http/git-http.conf
@@ -21,18 +21,25 @@ ErrorLog /dev/stderr
 
 <VirtualHost *:80>
 
+    # /git/ requests go to the git backend binary
     SetEnv GIT_PROJECT_ROOT /allura-data/scm/git
     SetEnv GIT_HTTP_EXPORT_ALL
     ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
 
     # disable access to default web content
     <Directory /var/www>
-        Order Deny,Allow
-        Deny from all
+        Require all denied
         Options None
         AllowOverride None
     </Directory>
 
+    # any Alias here must be excluded from ProxyPass (at bottom of file)
+    Alias /robots.txt /allura-data/www-misc/robots.txt
+    <Directory /allura-data/www-misc/>
+        Require all granted
+    </Directory>
+
+    # apply security checks to all /git/ requests
     <Location "/git/">
         Require all granted
 
@@ -43,10 +50,17 @@ ErrorLog /dev/stderr
         AuthType Basic
         AuthName "Git Access"
         AuthBasicAuthoritative off
-        PythonOption ALLURA_PERM_URL http://web:8080/auth/repo_permissions
-        PythonOption ALLURA_AUTH_URL http://web:8080/auth/do_login
+        PythonOption ALLURA_PERM_URL http://web:8088/auth/repo_permissions
+        PythonOption ALLURA_AUTH_URL http://web:8088/auth/do_login
         # for 'requests' lib only, doesn't have to be full allura venv
         PythonOption ALLURA_VIRTUALENV /allura-data/virtualenv
     </Location>
 
+    # declare what is being handled here
+    ProxyPass "/robots.txt" !
+    ProxyPass "/git/" !
+    # everything else gets proxied through to the Allura webapp
+    ProxyPass "/" "http://web:8088/"
+    ProxyPassReverse "/" "http://web:8088/"
+
 </VirtualHost>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/allura/blob/5edd6914/scripts/init-docker-dev.sh
----------------------------------------------------------------------
diff --git a/scripts/init-docker-dev.sh b/scripts/init-docker-dev.sh
index ddadf08..097c94e 100755
--- a/scripts/init-docker-dev.sh
+++ b/scripts/init-docker-dev.sh
@@ -32,6 +32,9 @@ mkdir -p /allura-data/solr
 echo -e "Changing it's permissions to 777 so that container will have access to it\n"
 chmod 777 /allura-data/solr
 
+mkdir -p /allura-data/www-misc
+echo "# No robots.txt rules here" > /allura-data/www-misc/robots.txt
+
 # share venv to allow update and sharing across containers
 if [ ! -e /allura-data/virtualenv ]; then
     echo -e "Creating virtualenv\n"


[2/6] allura git commit: Upgrade docker-compose file to v2 format

Posted by br...@apache.org.
Upgrade docker-compose file to v2 format


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/cc3b773a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/cc3b773a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/cc3b773a

Branch: refs/heads/db/docker-prod
Commit: cc3b773a8cefb9a1c56dc2657190a45710e12278
Parents: 401fcb0
Author: Dave Brondsema <da...@brondsema.net>
Authored: Thu Sep 28 12:00:48 2017 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Sep 29 12:28:02 2017 -0400

----------------------------------------------------------------------
 docker-compose.yml | 131 ++++++++++++++++++++++++------------------------
 1 file changed, 65 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/cc3b773a/docker-compose.yml
----------------------------------------------------------------------
diff --git a/docker-compose.yml b/docker-compose.yml
index a681c53..9374f90 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -15,75 +15,74 @@
 #       specific language governing permissions and limitations
 #       under the License.
 
-web:
-  build: .
-  environment: &env
-    # PATH=/allura-data/virtualenv/bin:$PATH doesn't work; see https://github.com/docker/compose/issues/650
-    - PATH=/allura-data/virtualenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
-  ports:
-    - "8080:8080"
-  volumes:
-    - .:/allura  # Allura source code from local host
-    - /allura-data:/allura-data  # for virtualenv, scm repos, etc
-  links:
-    - mongo
-    - solr
+version: "2"
+services:
+  web:
+    build: .
+    environment: &env
+      # PATH=/allura-data/virtualenv/bin:$PATH doesn't work; see https://github.com/docker/compose/issues/650
+      - PATH=/allura-data/virtualenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+    ports:
+      - "8080:8080"
+    volumes: &volumes
+      - .:/allura  # Allura source code from local host
+      - /allura-data:/allura-data  # for virtualenv, scm repos, etc
+    links:
+      - mongo
+      - solr
 
-taskd:
-  image: allura_web
-  working_dir: /allura/Allura
-  environment: *env
-  command: paster taskd docker-dev.ini
-  volumes_from:
-    - web
-  links:
-    - mongo
-    - solr
-    - outmail
+  taskd:
+    image: allura_web
+    working_dir: /allura/Allura
+    environment: *env
+    command: paster taskd docker-dev.ini
+    volumes: *volumes
+    links:
+      - mongo
+      - solr
+      - outmail
 
-solr:
-  image: solr:6-alpine  # alpine is a very small distro base
-  ports:
-    - "8983:8983"
-  volumes:
-    - ./solr_config/allura:/opt/solr/server/solr/allura
-    - /allura-data/solr:/opt/solr/server/solr/allura/data
+  solr:
+    image: solr:6-alpine  # alpine is a very small distro base
+    ports:
+      - "8983:8983"
+    volumes:
+      - ./solr_config/allura:/opt/solr/server/solr/allura
+      - /allura-data/solr:/opt/solr/server/solr/allura/data
 
-mongo:
-  image: mongo:3.4
-  ports:
-    - "27017:27017"
-  volumes:
-    - /allura-data/mongo:/data/db
-  command: mongod --storageEngine wiredTiger
+  mongo:
+    image: mongo:3.4
+    ports:
+      - "27017:27017"
+    volumes:
+      - /allura-data/mongo:/data/db
+    command: mongod --storageEngine wiredTiger
 
-outmail:
-  image: allura_web
-  environment: *env
-  volumes_from:
-    - web
-  command: python -u -m smtpd -n -c alluratest.smtp_debug.BetterDebuggingServer 0.0.0.0:8826
-  expose:
-    - "8826"
+  outmail:
+    image: allura_web
+    environment: *env
+    volumes_from:
+      - web
+    command: python -u -m smtpd -n -c alluratest.smtp_debug.BetterDebuggingServer 0.0.0.0:8826
+    expose:
+      - "8826"
 
-inmail:
-  image: allura_web
-  working_dir: /allura/Allura
-  environment: *env
-  command: paster smtp_server docker-dev.ini
-  volumes_from:
-    - web
-  ports:
-    - "8825:8825"
-  links:
-    - mongo
+  inmail:
+    image: allura_web
+    working_dir: /allura/Allura
+    environment: *env
+    volumes: *volumes
+    command: paster smtp_server docker-dev.ini
+    ports:
+      - "8825:8825"
+    links:
+      - mongo
 
-git-http:
-  build: scm_config/git-http/
-  ports:
-    - "8081:80"
-  volumes_from:
-    - web
-  links:
-    - mongo
-    - web
\ No newline at end of file
+  git-http:
+    build: scm_config/git-http/
+    ports:
+      - "8081:80"
+    volumes: *volumes
+    links:
+      - mongo
+      - web