updating readme
This commit is contained in:
10
README.md
10
README.md
@@ -102,7 +102,7 @@ Sometimes you need a custom config file for nginx to do rewrites or password pro
|
|||||||
### Scripting
|
### 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.
|
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
|
#### 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.
|
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
|
#### Setup
|
||||||
@@ -116,7 +116,6 @@ Lets Encrypt certs expire every 90 days, to renew simply run:
|
|||||||
```
|
```
|
||||||
sudo docker exec -t <CONTAINER_NAME> /usr/bin/letsencrypt-renew
|
sudo docker exec -t <CONTAINER_NAME> /usr/bin/letsencrypt-renew
|
||||||
```
|
```
|
||||||
|
|
||||||
## Special Git Features
|
## 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.
|
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 <CONTAINER_NAME> /usr/bin/pull
|
sudo docker exec -t -i <CONTAINER_NAME> /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.
|
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
|
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 and Errors
|
||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
|
|||||||
Reference in New Issue
Block a user