diff --git a/README.md b/README.md index c5ea1e3..2691340 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ * 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. Note that this script does not run in the application root. To execute commands in the application root you must do `cd "$1"`. +* custom-nginx-install - Optional File: executed where nginx otherwise would be installed via a default apt-get installation ## Environment Variables * root - Optional: overrides root directory diff --git a/bin/compile b/bin/compile index e7078dd..806af5f 100755 --- a/bin/compile +++ b/bin/compile @@ -1,8 +1,12 @@ #!/usr/bin/env bash set -e -apt-get update -apt-get -y install nginx +if [[ -e $1/${CUSTOM_NGINX_INSTALL:-custom-nginx-install} ]]; then + $1/${CUSTOM_NGINX_INSTALL:-custom-nginx-install} "$@" +else + apt-get update + apt-get -y install nginx +fi BINDIR=$(dirname "$0")