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