From ccbb3d7ed564f12a76db7310778b0f109c0a43dc Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Wed, 25 Nov 2015 10:43:01 -0800 Subject: [PATCH] change ROOT env var and doc it --- README.md | 4 ++-- conf/nginx.conf.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1f5b03a..fc15ecd 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,10 @@ This buildpack has been successfully run on Digital Ocean instances of Ubuntu 14 2. Add another, *empty* file called `.static` to your root directory of your web project. It signals that this buildpack shall be used 3. Push your project to Dokku -All static files that you want to serve should be in the root directory of your repository. No need to use a seperate `www` folder. `buildpack-nginx` will automatically download the buildpack, download NGINX, compile it, and install it. The next time you push your project, the buildpack will reuse the precompiled binaries. +All static files that you want to serve should be in the root directory of your repository. No need to use a seperate `www` folder. `buildpack-nginx` will automatically download the buildpack, download NGINX, compile it, and install it. The next time you push your project, the buildpack will reuse the precompiled binaries. ## NGINX CONFIGURATION -Override default configuration by adding `nginx.conf.erb` in the root directory +Override default configuration by adding `nginx.conf.erb` in the root directory. You can also override the nginx root by setting `$NGINX_ROOT` ## Credits and License `buildpack-nginx` is licensed under the CC0 1.0 Universal license and has been informed by many similar projects on the web diff --git a/conf/nginx.conf.erb b/conf/nginx.conf.erb index 82e8b4d..bde59e6 100644 --- a/conf/nginx.conf.erb +++ b/conf/nginx.conf.erb @@ -13,8 +13,8 @@ http { server { listen <%= ENV["PORT"] %>; server_name _; - <% if ENV["ROOT"] %> - root /app/www/<%= ENV["ROOT"] %>; + <% if ENV["NGINX_ROOT"] %> + root /app/www/<%= ENV["NGINX_ROOT"] %>; <% else %> root /app/www; <% end %>