Merge remote-tracking branch 'origin/master' into erp5testnode
[slapos.git] / software / etherpad-lite / instance-etherpad-lite.cfg
1 [buildout]
2 parts =
3   etherpad-lite
4   publish-connection-informations
5 #  frontend-etherpad
6
7 eggs-directory = ${buildout:eggs-directory}
8 develop-eggs-directory = ${buildout:develop-eggs-directory}
9 offline = true
10
11 [rootdirectory]
12 recipe = slapos.cookbook:mkdirectory
13 etc = $${buildout:directory}/etc/
14 var = $${buildout:directory}/var/
15 srv = $${buildout:directory}/srv/
16 bin = $${buildout:directory}/bin/
17 tmp = $${buildout:directory}/tmp/
18
19 [basedirectory]
20 recipe = slapos.cookbook:mkdirectory
21 log = $${rootdirectory:var}/log/
22 services = $${rootdirectory:etc}/run/
23 run = $${rootdirectory:etc}/run/
24 backup = $${rootdirectory:srv}/backup/
25 promises = $${rootdirectory:etc}/promise/
26
27 [directory]
28 recipe = slapos.cookbook:mkdirectory
29 etherpad-conf = $${rootdirectory:etc}/etherpad/
30 etherpad-repository-location = $${buildout:directory}/parts/etherpad-lite-repository
31
32 [publish-connection-informations]
33 recipe = slapos.cookbook:publish
34 url = $${request-frontend:connection-site_url}
35
36 [etherpad-conf-generation]
37 recipe = slapos.recipe.template
38 url = ${template-conf:location}/${template-conf:filename}
39 ip = $${slap-network-information:global-ipv6}
40 dirtydb-location = $${rootdirectory:var}/dirty.db
41 port = 9001
42 mode = 0644
43 output = $${directory:etherpad-conf}/settings.json
44
45 [etherpad-run-script]
46 recipe = slapos.recipe.template
47 url = ${template-run-script:location}/${template-run-script:filename}
48 etherpad-location = ${etherpad-lite-repository:location}
49 etherpad-repository-location = $${directory:etherpad-repository-location}
50 nodejs-location = ${nodejs:location}
51 etherpad-deps-script-location = ${template-deps-script:output}
52 etherpad-conf-location = $${etherpad-conf-generation:output}
53 etherpad-conf-name = settings-$${slap-connection:partition-id}.json
54 mode = 0755
55 output = $${rootdirectory:bin}/run.sh
56
57 # Command line comes from the run script of etherpad-lite
58 [etherpad-lite]
59 recipe = slapos.cookbook:wrapper
60 wrapper-path = $${basedirectory:run}/etherpad-lite 
61 command-line = $${etherpad-run-script:output} -s $${etherpad-run-script:etherpad-conf-name}
62
63 [request-frontend]
64 <= slap-connection
65 recipe = slapos.cookbook:request
66 name = Frontend
67 # XXX We have hardcoded SR URL here.
68 software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
69 slave = true
70 config = url
71 config-url = http://$${etherpad-conf-generation:ip}:$${etherpad-conf-generation:port}
72 return = site_url
73
74 [frontend-etherpad]
75 recipe = slapos.cookbook:check_url_available
76 path = $${basedirectory:promises}/frontend-etherpad
77 url = $${request-frontend:connection-site_url}
78 dash_path = ${dash:location}/bin/dash
79 curl_path = ${curl:location}/bin/curl