From 04ecbabbc47c590308733d99a82c5ccf5346b78a Mon Sep 17 00:00:00 2001 From: rhy-jot Date: Fri, 20 Jun 2014 10:38:48 -0700 Subject: [PATCH] Allow root directory to be overridden via environment variable --- README.md | 3 +++ conf/nginx.conf.erb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 76b3af2..a46b4ef 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,6 @@ * nginx.conf.erb - Optional File: overrides `conf/nginx.conf.erb` * mime.types - Optional File: overrides `conf/mime.types` * custom-build - Optional File: executes commands before build is finished + +## Environment Variables +* root - Optional: overrides root directory diff --git a/conf/nginx.conf.erb b/conf/nginx.conf.erb index 5a25216..8843805 100644 --- a/conf/nginx.conf.erb +++ b/conf/nginx.conf.erb @@ -12,7 +12,7 @@ http { server { listen <%= ENV['PORT'] %>; server_name _; - root /app/www; + root <%= ENV.fetch('root', '/app/www') %>; index index.html; } }