Nginx: compile software with push stream module and add template and configuration...
[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 port = 9443
37 publisher_push_stream_store_messages = off
38 publisher_client_max_body_size = 16k
39 publisher_client_body_buffer_size = 16k
40 subscriber_allow_origin = '*'
41 # Prevent to use credential if origin is star
42 subscriber_allow_credential = 'false'
43 subscriber_allow_methods = 'GET, HEAD, OPTIONS'
44 subscriber_allow_headers = 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since'
45
46 # Add parts generated by template
47 [buildout]
48 parts =
49   nginx-service
50 {% for part in part_list -%}
51 {{ '    %s' % part }}
52 {% endfor -%}
53
54 eggs-directory = ${buildout:eggs-directory}
55 develop-eggs-directory = ${buildout:develop-eggs-directory}
56 offline = true