Merge branch 'html5as' of https://git.erp5.org/repos/slapos into html5as
[slapos.git] / software / html5as / instance_html5as.cfg
1 [buildout]
2 parts =
3     nginx_conf
4     html5as_bin
5     website_download
6     publish-connection-information
7
8 offline = true
9
10 eggs-directory = ${buildout:eggs-directory}
11 develop-eggs-directory = ${buildout:develop-eggs-directory}
12
13 # partition tree
14 # /
15 # |- etc/
16 # |    |- nginx.conf
17 # |    |- run/
18 # |         |- html5as (binary)
19 # |- var/
20 # |    |- run/
21 # |    |    |- nginx.pid
22 # |    |- log/
23 # |    |    |- nginx.log
24 # |    |    |- nginx.access.log
25 # |- srv/
26 # |    |- html5as/ (doc root)
27 # |    |        |- index.html
28 # |    |- backup/
29
30 [rootdirectory]
31 recipe = slapos.cookbook:mkdirectory
32 etc = $${buildout:directory}/etc
33 var = $${buildout:directory}/var
34 srv = $${buildout:directory}/srv
35
36 [basedirectory]
37 recipe = slapos.cookbook:mkdirectory
38 services = $${rootdirectory:etc}/run
39 log = $${rootdirectory:var}/log
40 run = $${rootdirectory:var}/run
41 backup = $${rootdirectory:srv}/backup
42 data = $${rootdirectory:srv}/html5as
43
44 [html5as]
45 # Options
46 nb_workers = 2
47
48 # Network
49 ip = $${slap-network-information:global-ipv6}
50 port = 8080
51
52 # Paths
53 # Log
54 path_pid = $${basedirectory:run}/nginx.pid
55 path_log = $${basedirectory:log}/nginx.log
56 path_access_log = $${basedirectory:log}/nginx.access.log
57 path_error_log = $${basedirectory:log}/nginx.error.log
58 path_tmp = $${buildout:directory}/tmp
59 # Docroot
60 docroot = $${basedirectory:data}
61 default_index = $${basedirectory:data}/index.html
62 # Config files
63 path_nginx_conf = $${rootdirectory:etc}/nginx.conf
64 # Executables
65 bin_nginx = ${nginx:location}/sbin/nginx
66 bin_html5as = $${basedirectory:services}/html5as
67
68 # Utils
69 path_shell = ${dash:location}/bin/dash
70
71 [website_download]
72 recipe = hexagonit.recipe.download
73 # Website tarball
74 url = $${slap-parameter:download_url}
75 destination = $${html5as:docroot}
76
77 [nginx_conf]
78 recipe = slapos.recipe.template:jinja2
79 template = ${:_profile_base_location_}/templates/nginx_conf.in
80 rendered = $${html5as:path_nginx_conf}
81 md5sum = 6338abecda61f4414392b6f4c1d09e8a
82 context = section param_html5as html5as
83
84 [html5as_bin]
85 recipe = slapos.recipe.template:jinja2
86 template = ${:_profile_base_location_}/templates/html5as_bin.in
87 rendered = $${html5as:bin_html5as}
88 md5sum = 0ddb3dfbd963819a1666ca47aa37bbc5
89 context = section param_html5as html5as
90 mode = 700
91
92 [publish-connection-information]
93 recipe = slapos.cookbook:publish
94 server_url = http://[$${html5as:ip}]:$${html5as:port}