slaprunner: add configurable cpu-ratio parameter
[slapos.git] / software / nginx-push-stream / instance-nginx.cfg.in
1 {% set part_list = [] -%}
2 {% set crontab_line_list = [] -%}
3 [directory]
4 recipe = slapos.cookbook:mkdirectory
5 etc = $${buildout:directory}/etc
6 bin = $${buildout:directory}/bin
7 srv = $${buildout:directory}/srv
8 var = $${buildout:directory}/var
9 run = $${:var}/run
10 log = $${:var}/log
11 varnginx = $${:var}/nginx
12 services = $${:etc}/service
13 cron-entries = $${:etc}/cron.d
14 www = $${:srv}/www
15 ssl = $${:etc}/ssl
16
17 #################################
18 # Nginx service
19 #################################
20 [nginx-service]
21 recipe = slapos.recipe.template
22 url = ${template-nginx-service:output}
23 output = $${directory:services}/nginx
24 mode = 0700
25 virtual-depends =
26   $${nginx-configuration:ip}
27
28 [nginx-configuration]
29 recipe = slapos.recipe.template
30 url = ${template-nginx-configuration:output}
31 output = $${directory:etc}/nginx.cfg
32 mode = 0600
33 access_log = $${directory:log}/nginx-access.log
34 error_log = $${directory:log}/nginx-error.log
35 ip = $${slap-network-information:global-ipv6}
36 local_ip = $${slap-network-information:local-ipv4}
37 port = 9443
38 publisher_push_stream_store_messages = off
39 publisher_client_max_body_size = 16k
40 publisher_client_body_buffer_size = 16k
41 subscriber_allow_origin = '*'
42 # Prevent to use credential if origin is star
43 subscriber_allow_credential = 'false'
44 subscriber_allow_methods = 'GET, HEAD, OPTIONS'
45 subscriber_allow_headers = 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since'
46
47 # Add parts generated by template
48 [buildout]
49 parts =
50   nginx-service
51 {% for part in part_list -%}
52 {{ '    %s' % part }}
53 {% endfor -%}
54
55 eggs-directory = ${buildout:eggs-directory}
56 develop-eggs-directory = ${buildout:develop-eggs-directory}
57 offline = true