Commit 635f6ec4 authored by Jérome Perrin's avatar Jérome Perrin

software/nginx-push-stream: add a promise for nginx

parent f3e733af
......@@ -4,8 +4,8 @@ md5sum = eb4c69df9a8dbb94fb76d0a6c11e360f
[template-nginx-configuration]
filename = template-nginx.cfg.in
md5sum = 1cff0aa9908d8ead05d9c8faef77d51f
md5sum = b957c4cbaa4d5644688a38f1eca7a516
[template-nginx]
filename = instance-nginx.cfg.in
md5sum = 71daee817cb08834ab1502d01a9b96d0
md5sum = 4a8c49421c7a36901d3ab8c0b4a07769
[buildout]
parts =
nginx-service
promises
publish-connection-information
extends = ${monitor-template:rendered}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
......@@ -53,6 +56,17 @@ 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'
base-url = http://[$${nginx-configuration:ip}]:$${nginx-configuration:port}
[promises]
recipe =
promises =
$${nginx-available-promise:recipe}
[nginx-available-promise]
<= monitor-promise-base
module = check_url_available
name = $${:_buildout_section_name_}.py
config-url = $${nginx-configuration:base-url}/status
[publish-connection-information]
recipe = slapos.cookbook:publish
publisher-url = $${nginx-configuration:base-url}$${nginx-configuration:publisher-location-prefix}
......
......@@ -2,6 +2,7 @@
extends =
../../stack/slapos.cfg
../../component/nginx/buildout.cfg
../../stack/monitor/buildout.cfg
./buildout.hash.cfg
parts =
......
......@@ -70,6 +70,11 @@ server {
return 204;
}
location = /status {
default_type "text/plain";
return 200 'OK';
}
location $${nginx-configuration:publisher-location-prefix} {
push_stream_publisher;
......
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