From d3fffbc3ad9029f891d09776741c83c5bc53f585 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sat, 16 Jan 2016 21:07:43 +0000 Subject: [PATCH] image updates --- Dockerfile | 2 +- README.md | 5 ++++- start.sh | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a64b105..17d1bb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ nginx=stable && \ add-apt-repository ppa:nginx/$nginx && \ apt-get update && \ apt-get upgrade -y && \ -BUILD_PACKAGES="supervisor nginx php5-fpm git php5-mysql php-apc php5-curl php5-gd php5-intl php5-mcrypt php5-memcache php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-pgsql php5-mongo pwgen" && \ +BUILD_PACKAGES="supervisor nginx php5-fpm git php5-mysql php-apc php5-curl php5-gd php5-intl php5-mcrypt php5-memcache php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-pgsql php5-mongo php5-ldap pwgen" && \ apt-get -y install $BUILD_PACKAGES && \ apt-get remove --purge -y software-properties-common && \ apt-get autoremove -y && \ diff --git a/README.md b/README.md index a82b30d..e9bd538 100644 --- a/README.md +++ b/README.md @@ -151,9 +151,12 @@ database_pass = $$_MYSQL_PASS_$$ ``` ### Skip Templating In order to speed up install time if templating is not required and you have a lot of files in your web root that you don't wish to be scanned, simply include the flag below: - ```-e TEMPLATE_NGINX_HTML=0``` +### Display Errors +If you want to display PHP errors on screen for debugging use this feature: +```-e ERRORS=1``` + ### Template anything Yes ***ANYTHING***, any variable exposed by a linked container or the **-e** flag lets you template your config files. This means you can add redis, mariaDB, memcache or anything you want to your application very easily. diff --git a/start.sh b/start.sh index 502c5b2..90f85e7 100644 --- a/start.sh +++ b/start.sh @@ -25,6 +25,12 @@ if [ ! -z "$GIT_REPO" ]; then chown -Rf nginx.nginx /usr/share/nginx/* fi +# Display PHP error's or not +if [[ "$ERRORS" != "1" ]] ; then + sed -i -e "s/error_reporting =.*=/error_reporting = E_ALL/g" /etc/php5/fpm/php.ini + sed -i -e "s/display_errors =.*/display_errors = On/g" /etc/php5/fpm/php.ini +fi + # Tweak nginx to match the workers to cpu's procs=$(cat /proc/cpuinfo |grep processor | wc -l)