[buildout]
develop = .
parts = test app-sw db-sw ctl buildout-source-release

[test]
recipe = zc.recipe.testrunner
eggs = cmsapp

[app-sw]
recipe = zc.recipe.egg
eggs = ${test:eggs}
       PasteScript
       zc.zodbwsgi
interpreter = py

[db-sw]
recipe = zc.recipe.egg
eggs = ZODB3
       zc.queue
       zope.app.keyreference
       zope.minmax
       zc.catalogqueue
       zc.zlibstorage

[ctl]
recipe = zc.recipe.rhrc
dest = ${buildout:bin-directory}
parts =
    main-db-server
    index-db-server
    app-server

[db-server]
recipe = zc.zodbrecipes:server
zeo.conf =
   <zeo>
      address ${:address}
   </zeo>
   %import zc.zlibstorage
   <zlibstorage>
     <filestorage>
        path ${:path}
     </filestorage>
   </zlibstorage>

[main-db]
recipe = zc.recipe.filestorage

[main-db-server]
<= db-server
address = :8100
path = ${main-db:path}

[index-db]
recipe = zc.recipe.filestorage

[index-db-server]
<= db-server
address = :8101
path = ${index-db:path}


[paste.ini]
recipe = zc.recipe.deployment:configuration
s =
text =
  ${:s}[app:main]
  ${:s}use = egg:bobo
  ${:s}bobo_resources = cmsapp
  ${:s}filter-with = zodb
  ${:s}
  ${:s}[filter:zodb]
  ${:s}use = egg:zc.zodbwsgi
  ${:s}configuration =
  ${:s}  <zodb main>
  ${:s}     <zeoclient>
  ${:s}        server ${main-db-server:address}
  ${:s}     </zeoclient>
  ${:s}  </zodb>
  ${:s}  <zodb index>
  ${:s}     <zeoclient>
  ${:s}        server ${index-db-server:address}
  ${:s}     </zeoclient>
  ${:s}  </zodb>
  ${:s}
  ${:s}[server:main]
  ${:s}use = egg:Paste#http
  ${:s}host = localhost
  ${:s}port = 8080

[app-server]
recipe = zc.zdaemonrecipe
program = ${buildout:bin-directory}/paster serve ${paste.ini:location}

[buildout-source-release]
recipe = zc.recipe.egg:scripts
eggs = zc.sourcerelease