Etherpad-lite software release v1
[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-deps-script]
46 recipe = slapos.recipe.template
47 url = ${template-deps-script:location}/${template-deps-script:filename}
48 etherpad-location = $${directory:etherpad-repository-location}
49 nodejs-location = ${nodejs:location}
50 curl-location = ${curl:location}
51 mode = 0755
52 output = $${rootdirectory:bin}/installDeps.sh
53
54 [etherpad-run-script]
55 recipe = slapos.recipe.template
56 url = ${template-run-script:location}/${template-run-script:filename}
57 etherpad-location = ${etherpad-lite-repository:location}
58 etherpad-repository-location = $${directory:etherpad-repository-location}
59 nodejs-location = ${nodejs:location}
60 postgre-location = ${postgresql:location}
61 etherpad-deps-script-location = $${etherpad-deps-script:output}
62 etherpad-conf-location = $${etherpad-conf-generation:output}
63 etherpad-conf-name = settings-$${slap-connection:partition-id}.json
64 mode = 0755
65 output = $${rootdirectory:bin}/run.sh
66
67 # Command line comes from the run script of etherpad-lite
68 [etherpad-lite]
69 recipe = slapos.cookbook:wrapper
70 wrapper-path = $${basedirectory:run}/etherpad-lite 
71 command-line = $${etherpad-run-script:output} -s $${etherpad-run-script:etherpad-conf-name}
72
73 [request-frontend]
74 <= slap-connection
75 recipe = slapos.cookbook:request
76 name = Frontend
77 # XXX We have hardcoded SR URL here.
78 software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
79 slave = true
80 config = url
81 config-url = http://$${etherpad-conf-generation:ip}:$${etherpad-conf-generation:port}
82 return = site_url
83
84 [frontend-etherpad]
85 recipe = slapos.cookbook:check_url_available
86 path = $${basedirectory:promises}/frontend-etherpad
87 url = $${request-frontend:connection-site_url}
88 dash_path = ${dash:location}/bin/dash
89 curl_path = ${curl:location}/bin/curl