diff --git a/software/slaprunner/README.txt b/software/slaprunner/README.txt index 1188a9b5fad16b6ac8333f4fe1d0d2edc5963070..0065f4546ef103da4c67333757e96193e2df0d98 100644 --- a/software/slaprunner/README.txt +++ b/software/slaprunner/README.txt @@ -29,6 +29,12 @@ Optional parameter. Default: 10 + +Public-directory +---------------- +You can serve static files with the webrunner. For that, just put your data in "srv/runner/public". All these files will be served throught the url of the webrunner + "/public/". Useful for developping your own static website. + + AUTO-DEPLOYMENT --------------- diff --git a/software/slaprunner/instance-runner.cfg b/software/slaprunner/instance-runner.cfg index fe9da8e9e008b5dd76b5c123a60e974dde71e230..00f030234f239b1bed183334c45fc6c2d8e68e53 100644 --- a/software/slaprunner/instance-runner.cfg +++ b/software/slaprunner/instance-runner.cfg @@ -122,6 +122,7 @@ recipe = slapos.cookbook:mkdirectory home = $${directory:srv}/runner/ test = $${directory:srv}/test/ project = $${:home}/project +public = $${:home}/public software-root = $${:home}/software instance-root = $${:home}/instance project-test = $${:test}/project diff --git a/software/slaprunner/nginx_conf.in b/software/slaprunner/nginx_conf.in index 55a5b57996129c6b5c4ca1cfe1c9b29c3a12063a..93055ad3ec442462be49f3318966e236f7c56234 100644 --- a/software/slaprunner/nginx_conf.in +++ b/software/slaprunner/nginx_conf.in @@ -64,6 +64,10 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $http_host; } + location /public/ { + root {{ param_nginx_frontend['work_dir'] }}; + index index.html index.htm; + } location /share { rewrite ^/share / break;