Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Fix php_extra_env_vars.
Browse files Browse the repository at this point in the history
  • Loading branch information
tharna committed Jan 3, 2018
1 parent 8f15533 commit b1f87f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,20 +252,20 @@ Example sublime text project configuration (via Project->Edit Project):

Using environment variables to pass environment specific configs and secrets is the recommended best practise.
By default WKV_SITE_ENV variable is exposed as environment variable to php and by defining `php_env_vars_include_db: True` also database credentials and connection info will be included.
To define any additional environment variables you can use `php_env_vars` variable like this in <env>.yml:
To define any additional environment variables you can use `php_extra_env_vars` variable like this in <env>.yml:
```
php_env_vars:
php_extra_env_vars:
- key: "your_variable"
value: "value for the key"
```
For sensitive info it is recommended to use ansible-vault files to store those values and only reference the variable when defining the `php_env_vars`
For sensitive info it is recommended to use ansible-vault files to store those values and only reference the variable when defining the `php_extra_env_vars`
For example in <env>-vars.yml (`ansible-vault edit --ask-vault-pass <env>-vars.yml`):
```
secret_variable: "secret value"
```
And then in <env>.yml:
```
php_env_vars:
php_extra_env_vars:
- key: "secret_key"
value: "{{ secret_variable }}"
```
Expand Down

0 comments on commit b1f87f9

Please sign in to comment.