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