From 470544f1f3b321055362a500fe1eb540c249f8f6 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Wed, 21 Sep 2016 20:50:39 +0100 Subject: [PATCH] updating readme --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c2e08a2..552e5d3 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ Sometimes you need a custom config file for nginx to do rewrites or password pro ### Scripting There is often an occasion where you need to run a script on code to do a transformation once code lands in the container. For this reason we have developed scripting support. By including a scripts folder in your git repository and passing the __RUN_SCRIPTS=1__ flag to your command line the container will execute your scripts. Please see the [repo layout guidelines](https://github.com/ngineered/nginx-php-fpm/blob/master/docs/repo_layout.md) for more details on how to organise this. -### Lets Encrypt support (Experimental) +### Lets Encrypt support #### Enabling SSL or Special Nginx Configs You can either map a local folder containing your configs to /etc/nginx or (recommended method) edit the files within the __conf__ directory in a copy of this git repo, and then rebuilding the base image. #### Setup @@ -116,7 +116,6 @@ Lets Encrypt certs expire every 90 days, to renew simply run: ``` sudo docker exec -t /usr/bin/letsencrypt-renew ``` - ## Special Git Features Specify the ```GIT_EMAIL``` and ```GIT_NAME``` variables for this to work. They are used to set up git correctly and allow the following commands to work. @@ -132,7 +131,7 @@ In order to refresh the code in a container and pull newer code from git run: sudo docker exec -t -i /usr/bin/pull ``` -### Using environment variables +### Using environment variables / templating To set the variables pass them in as environment variables on the docker command line. @@ -140,7 +139,10 @@ Example: ``` sudo docker run -d -e 'YOUR_VAR=VALUE' richarvey/nginx-php-fpm ``` - +You can then use PHP to get teh environment variable into your code: +``` +string getenv ( string $YOUR_VAR ) +``` ## Logging and Errors ### Logging