Commit ce4dff4b authored by Jérome Perrin's avatar Jérome Perrin

software/nginx-push-stream: use proper case for buildout options

Buildout and SlapOS convention is to use "-" not "_"

cf https://slapos.nexedi.com/slapos-Tutorial.Create.Software.Release#:~:text=Buildout%20Profile%20Conventions
parent 241a3bb4
...@@ -4,8 +4,8 @@ md5sum = eb4c69df9a8dbb94fb76d0a6c11e360f ...@@ -4,8 +4,8 @@ md5sum = eb4c69df9a8dbb94fb76d0a6c11e360f
[template-nginx-configuration] [template-nginx-configuration]
filename = template-nginx.cfg.in filename = template-nginx.cfg.in
md5sum = f5658154b82282bc1871f18ddf4529d8 md5sum = d22b53eaf4b3d6b5cff043bf8e6cd7c1
[template-nginx] [template-nginx]
filename = instance-nginx.cfg.in filename = instance-nginx.cfg.in
md5sum = ae50345b1c72db78ada8f36bbe91643b md5sum = 3ed378222e0529bd2aa6e43239a07f1c
...@@ -37,22 +37,22 @@ recipe = slapos.recipe.template ...@@ -37,22 +37,22 @@ recipe = slapos.recipe.template
url = ${template-nginx-configuration:output} url = ${template-nginx-configuration:output}
output = $${directory:etc}/nginx.cfg output = $${directory:etc}/nginx.cfg
mode = 0600 mode = 0600
access_log = $${directory:log}/nginx-access.log access-log = $${directory:log}/nginx-access.log
error_log = $${directory:log}/nginx-error.log error-log = $${directory:log}/nginx-error.log
ip = $${slap-network-information:global-ipv6} ip = $${slap-network-information:global-ipv6}
local_ip = $${slap-network-information:local-ipv4} local-ip = $${slap-network-information:local-ipv4}
port = 9443 port = 9443
publisher_location_prefix = /pub publisher-location-prefix = /pub
publisher_push_stream_store_messages = off publisher-push-stream-store-messages = off
publisher_client_max_body_size = 16k publisher-client-max-body-size = 16k
publisher_client_body_buffer_size = 16k publisher-client-body-buffer-size = 16k
subscriber_allow_origin = '*' subscriber-allow-origin = '*'
subscriber_location_prefix = /sub subscriber-location-prefix = /sub
# Prevent to use credential if origin is star # Prevent to use credential if origin is star
subscriber_allow_credential = 'false' subscriber-allow-credential = 'false'
subscriber_allow_methods = 'GET, HEAD, OPTIONS' subscriber-allow-methods = 'GET, HEAD, OPTIONS'
subscriber_allow_headers = 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since' subscriber-allow-headers = 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since'
[htpasswd] [htpasswd]
recipe = slapos.cookbook:generate.password recipe = slapos.cookbook:generate.password
...@@ -72,5 +72,5 @@ password = $${htpasswd:passwd} ...@@ -72,5 +72,5 @@ password = $${htpasswd:passwd}
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
init-password = $${htpasswd:passwd} init-password = $${htpasswd:passwd}
init-user = $${htpasswd-runner:user} init-user = $${htpasswd-runner:user}
publisher-url = http://$${htpasswd-runner:user}:$${htpasswd:passwd}@[$${nginx-configuration:ip}]:$${nginx-configuration:port}$${nginx-configuration:publisher_location_prefix} publisher-url = http://$${htpasswd-runner:user}:$${htpasswd:passwd}@[$${nginx-configuration:ip}]:$${nginx-configuration:port}$${nginx-configuration:publisher-location-prefix}
subscriber-url = http://$${htpasswd-runner:user}:$${htpasswd:passwd}@[$${nginx-configuration:ip}]:$${nginx-configuration:port}$${nginx-configuration:subscriber_location_prefix} subscriber-url = http://$${htpasswd-runner:user}:$${htpasswd:passwd}@[$${nginx-configuration:ip}]:$${nginx-configuration:port}$${nginx-configuration:subscriber-location-prefix}
...@@ -8,7 +8,7 @@ events { ...@@ -8,7 +8,7 @@ events {
# multi_accept on; # multi_accept on;
} }
error_log $${nginx-configuration:error_log}; error_log $${nginx-configuration:error-log};
http { http {
...@@ -33,8 +33,8 @@ http { ...@@ -33,8 +33,8 @@ http {
# Logging Settings # Logging Settings
## ##
access_log $${nginx-configuration:access_log}; access_log $${nginx-configuration:access-log};
error_log $${nginx-configuration:error_log}; error_log $${nginx-configuration:error-log};
## ##
# Gzip Settings # Gzip Settings
...@@ -56,7 +56,7 @@ http { ...@@ -56,7 +56,7 @@ http {
server { server {
listen [$${nginx-configuration:ip}]:$${nginx-configuration:port}; listen [$${nginx-configuration:ip}]:$${nginx-configuration:port};
listen $${nginx-configuration:local_ip}:$${nginx-configuration:port}; listen $${nginx-configuration:local-ip}:$${nginx-configuration:port};
fastcgi_temp_path $${directory:varnginx} 1 2; fastcgi_temp_path $${directory:varnginx} 1 2;
uwsgi_temp_path $${directory:varnginx} 1 2; uwsgi_temp_path $${directory:varnginx} 1 2;
...@@ -73,27 +73,27 @@ server { ...@@ -73,27 +73,27 @@ server {
return 204; return 204;
} }
location $${nginx-configuration:publisher_location_prefix} { location $${nginx-configuration:publisher-location-prefix} {
push_stream_publisher; push_stream_publisher;
push_stream_channels_path $arg_id; push_stream_channels_path $arg_id;
# store messages in memory # store messages in memory
push_stream_store_messages $${nginx-configuration:publisher_push_stream_store_messages}; push_stream_store_messages $${nginx-configuration:publisher-push-stream-store-messages};
# Message size limit # Message size limit
# client_max_body_size MUST be equal to client_body_buffer_size or # client_max_body_size MUST be equal to client_body_buffer_size or
# you will be sorry. # you will be sorry.
client_max_body_size $${nginx-configuration:publisher_client_max_body_size}; client_max_body_size $${nginx-configuration:publisher-client-max-body-size};
client_body_buffer_size $${nginx-configuration:publisher_client_body_buffer_size}; client_body_buffer_size $${nginx-configuration:publisher-client-body-buffer-size};
} }
location ~ $${nginx-configuration:subscriber_location_prefix}/(.*) { location ~ $${nginx-configuration:subscriber-location-prefix}/(.*) {
# activate subscriber mode for this location # activate subscriber mode for this location
add_header "Access-Control-Allow-Origin" $${nginx-configuration:subscriber_allow_origin}; add_header "Access-Control-Allow-Origin" $${nginx-configuration:subscriber-allow-origin};
add_header 'Access-Control-Allow-Credentials' $${nginx-configuration:subscriber_allow_credential}; add_header 'Access-Control-Allow-Credentials' $${nginx-configuration:subscriber-allow-credential};
add_header 'Access-Control-Allow-Methods' $${nginx-configuration:subscriber_allow_methods}; add_header 'Access-Control-Allow-Methods' $${nginx-configuration:subscriber-allow-methods};
add_header 'Access-Control-Allow-Headers' $${nginx-configuration:subscriber_allow_headers}; add_header 'Access-Control-Allow-Headers' $${nginx-configuration:subscriber-allow-headers};
push_stream_subscriber eventsource; push_stream_subscriber eventsource;
# positional channel path # positional channel path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment