updating docs
This commit is contained in:
2
docs/nginx_configs.md
Normal file
2
docs/nginx_configs.md
Normal file
@@ -0,0 +1,2 @@
|
||||
## Custom Nginx Config files
|
||||
Sometimes you need a custom config file for nginx to do rewrites or password protection, etc. For this reason we've included the ability to have custom nginx configs pulled directly from your git source. Please have a read of the [repo layout guidelines](docs/repo_layout.md) for more information. Its pretty simple to enable this, all you need to do is include a folder in the root of your repository called ```conf/nginx/``` within this folder you need to include a file called ```nginx-site.conf``` which will contain your default nginx site config. If you wish to have a custom file for SSL you simply include a file called ```nginx-site-ssl.conf``` in the same directory. These files will then be swapped in after you code is cloned.
|
||||
19
docs/scripting.md
Normal file
19
docs/scripting.md
Normal file
@@ -0,0 +1,19 @@
|
||||
### 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.
|
||||
|
||||
### Using environment variables / templating
|
||||
To set the variables pass them in as environment variables on the docker command line.
|
||||
Example:
|
||||
```
|
||||
sudo docker run -d -e 'YOUR_VAR=VALUE' richarvey/nginx-php-fpm
|
||||
```
|
||||
You can then use PHP to get the environment variable into your code:
|
||||
```
|
||||
string getenv ( string $YOUR_VAR )
|
||||
```
|
||||
Another example would be:
|
||||
```
|
||||
<?php
|
||||
echo $_ENV["APP_ENV"];
|
||||
?>
|
||||
```
|
||||
0
docs/scripting_templating.md
Normal file
0
docs/scripting_templating.md
Normal file
Reference in New Issue
Block a user