You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-6Lines changed: 34 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,37 @@ A few simple tools to manage configuration data sanely. These tools are to hold
5
5
6
6
* Config file generator
7
7
8
-
* Environment settings
8
+
* Environment settings generator
9
9
10
10
* Convert PHP ini files to PHP-FPM format
11
11
12
-
## Config file generator
12
+
Philosophy
13
+
----------
14
+
15
+
Environment variables need to be granular controls. Although they can be grouped together as "environments", they need to be configurable on a per-deploy basis without duplicating large blocks of information.
16
+
17
+
They also need to be stored stored alongside the applications code so that they can be maintained easily.
18
+
19
+
This library allows you to do these two thing. All environment settings can be stored in a simple way, and then extracted and combined with arbitrary combinations. e.g. using 'centos,dev' as the environment setting uses all the 'centos' environment settings, with the 'dev' settings over-riding any duplicate settings.
20
+
21
+
22
+
Example usage for people who don't like reading instructions
Running the command `configurate data/nginx.conf.php var/generated/nginx.conf centos,dave -p settings.php` would generated the file:
83
+
Running the command `configurate data/nginx.conf.php var/generated/nginx.conf centos,john -p settings.php` would generated the file:
58
84
59
85
60
86
```
@@ -76,7 +102,8 @@ environment - a comma separated list of environment settings to apply.
76
102
77
103
78
104
79
-
## Generate environment settings
105
+
Generate environment settings
106
+
-----------------------------
80
107
81
108
A tool that will parse the environment settings required by an application, and the data files that hold the settings for all environments, and will generated a file that contains a function that returns an array of what env settings are required by this application
82
109
@@ -147,7 +174,8 @@ input - the input template file.
147
174
output - the output file to write.
148
175
environment - a comma separated list of environment settings to apply.
149
176
150
-
## Convert PHP ini files to PHP-FPM format
177
+
Convert PHP ini files to PHP-FPM format
178
+
---------------------------------------
151
179
152
180
Because of reasons, PHP-FPM doesn't use the standard PHP in file format when including ini files in a pool in the PHP-FPM conf file. This aspect of the Configurator converts PHP style ini files to the format PHP-FPM expects:
0 commit comments