peony 0.1.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/bin/peony +2 -2
  3. data/lib/peony/actions.rb +66 -20
  4. data/lib/peony/{utils.rb → configure.rb} +13 -40
  5. data/lib/peony/default.rb +9 -2
  6. data/lib/peony/rake.rb +1 -1
  7. data/lib/peony/scope.rb +82 -0
  8. data/lib/peony/settings.rb +24 -23
  9. data/lib/peony/shell/basic.rb +19 -17
  10. data/lib/peony/shell.rb +3 -4
  11. data/lib/peony/version.rb +1 -1
  12. data/lib/peony.rb +6 -3
  13. data/recipes/db/mongo.rake +26 -26
  14. data/recipes/db/mysql.rake +46 -28
  15. data/recipes/db/pg.rake +20 -17
  16. data/recipes/db/redis.rake +22 -20
  17. data/recipes/elasticsearch.rake +14 -12
  18. data/recipes/httpd.rake +20 -18
  19. data/recipes/nginx/www.rake +8 -6
  20. data/recipes/nginx.rake +25 -23
  21. data/recipes/php.rake +10 -5
  22. data/spec/peony_spec.rb +3 -0
  23. data/spec/scope_spec.rb +48 -0
  24. data/spec/settings_in_rake_spec.rb +61 -1
  25. data/spec/settings_spec.rb +2 -2
  26. data/spec/spec_helper.rb +1 -3
  27. data/templates/elasticsearch/config.yml.erb +48 -34
  28. data/templates/elasticsearch/logging.yml.erb +3 -1
  29. data/templates/httpd/extra/httpd-autoindex.conf.erb +2 -2
  30. data/templates/httpd/extra/httpd-dav.conf.erb +4 -4
  31. data/templates/httpd/extra/httpd-mpm.conf.erb +1 -1
  32. data/templates/httpd/extra/httpd-multilang-errordoc.conf.erb +2 -2
  33. data/templates/httpd/httpd.conf.erb +8 -8
  34. data/templates/mongo/master.conf.erb +8 -8
  35. data/templates/mongo/slave.conf.erb +9 -9
  36. data/templates/mysql/my.cnf.erb +48 -34
  37. data/templates/nginx/sites-enabled/php.conf.erb +7 -7
  38. data/templates/nginx/sites-enabled/static.conf.erb +4 -4
  39. data/templates/nginx/www.conf.erb +77 -77
  40. data/templates/redis.conf.erb +13 -13
  41. metadata +6 -3
@@ -1,13 +1,13 @@
1
- ##################### ElasticSearch Configuration Example #####################
1
+ ##################### Elasticsearch Configuration Example #####################
2
2
 
3
3
  # This file contains an overview of various configuration settings,
4
4
  # targeted at operations staff. Application developers should
5
5
  # consult the guide at <http://elasticsearch.org/guide>.
6
6
  #
7
7
  # The installation procedure is covered at
8
- # <http://elasticsearch.org/guide/reference/setup/installation.html>.
8
+ # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>.
9
9
  #
10
- # ElasticSearch comes with reasonable defaults for most settings,
10
+ # Elasticsearch comes with reasonable defaults for most settings,
11
11
  # so you can try it out without bothering with configuration.
12
12
  #
13
13
  # Most of the time, these defaults are just fine for running a production
@@ -20,8 +20,8 @@
20
20
  #
21
21
  # node.rack: ${RACK_ENV_VAR}
22
22
 
23
- # See <http://elasticsearch.org/guide/reference/setup/configuration.html>
24
- # for information on supported formats and syntax for the configuration file.
23
+ # For information on supported formats and syntax for the config file, see
24
+ # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html>
25
25
 
26
26
 
27
27
  ################################### Cluster ###################################
@@ -29,7 +29,7 @@
29
29
  # Cluster name identifies your cluster for auto-discovery. If you're running
30
30
  # multiple clusters on the same network, make sure you're using unique names.
31
31
  #
32
- cluster.name: <%= es_cluster_name %>
32
+ cluster.name: <%= es.cluster_name %>
33
33
 
34
34
 
35
35
  #################################### Node #####################################
@@ -72,8 +72,10 @@ cluster.name: <%= es_cluster_name %>
72
72
  # node.data: false
73
73
 
74
74
  # Use the Cluster Health API [http://localhost:9200/_cluster/health], the
75
- # Node Info API [http://localhost:9200/_cluster/nodes] or GUI tools
76
- # such as <http://github.com/lukas-vlcek/bigdesk> and
75
+ # Node Info API [http://localhost:9200/_nodes] or GUI tools
76
+ # such as <http://www.elasticsearch.org/overview/marvel/>,
77
+ # <http://github.com/karmi/elasticsearch-paramedic>,
78
+ # <http://github.com/lukas-vlcek/bigdesk> and
77
79
  # <http://mobz.github.com/elasticsearch-head> to inspect the cluster state.
78
80
 
79
81
  # A node can have generic attributes associated with it, which can later be used
@@ -96,8 +98,8 @@ cluster.name: <%= es_cluster_name %>
96
98
  # Note, that it makes more sense to configure index settings specifically for
97
99
  # a certain index, either when creating it or by using the index templates API.
98
100
  #
99
- # See <http://elasticsearch.org/guide/reference/index-modules/> and
100
- # <http://elasticsearch.org/guide/reference/api/admin-indices-create-index.html>
101
+ # See <http://elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules.html> and
102
+ # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/indices-create-index.html>
101
103
  # for more information.
102
104
 
103
105
  # Set the number of shards (splits) of an index (5 by default):
@@ -128,7 +130,7 @@ cluster.name: <%= es_cluster_name %>
128
130
  # The "number_of_replicas" can be increased or decreased anytime,
129
131
  # by using the Index Update Settings API.
130
132
  #
131
- # ElasticSearch takes care about load balancing, relocating, gathering the
133
+ # Elasticsearch takes care about load balancing, relocating, gathering the
132
134
  # results from nodes, etc. Experiment with different settings to fine-tune
133
135
  # your setup.
134
136
 
@@ -144,7 +146,7 @@ cluster.name: <%= es_cluster_name %>
144
146
 
145
147
  # Path to directory where to store index data allocated for this node.
146
148
  #
147
- path.data: <%= es_data_dir %>
149
+ path.data: <%= es.data_dir %>
148
150
  #
149
151
  # Can optionally include more than one location, causing data to be striped across
150
152
  # the locations (a la RAID 0) on a file level, favouring locations with most free
@@ -162,7 +164,7 @@ path.logs: <%= log_dir %>/elasticsearch/
162
164
 
163
165
  # Path to where plugins are installed:
164
166
  #
165
- path.plugins: <%= es_plugins_dir %>
167
+ path.plugins: <%= es.plugins_dir %>
166
168
 
167
169
 
168
170
  #################################### Plugin ###################################
@@ -174,7 +176,7 @@ path.plugins: <%= es_plugins_dir %>
174
176
 
175
177
  ################################### Memory ####################################
176
178
 
177
- # ElasticSearch performs poorly when JVM starts swapping: you should ensure that
179
+ # Elasticsearch performs poorly when JVM starts swapping: you should ensure that
178
180
  # it _never_ swaps.
179
181
  #
180
182
  # Set this property to true to lock the memory:
@@ -183,15 +185,15 @@ path.plugins: <%= es_plugins_dir %>
183
185
 
184
186
  # Make sure that the ES_MIN_MEM and ES_MAX_MEM environment variables are set
185
187
  # to the same value, and that the machine has enough memory to allocate
186
- # for ElasticSearch, leaving enough memory for the operating system itself.
188
+ # for Elasticsearch, leaving enough memory for the operating system itself.
187
189
  #
188
- # You should also make sure that the ElasticSearch process is allowed to lock
190
+ # You should also make sure that the Elasticsearch process is allowed to lock
189
191
  # the memory, eg. by using `ulimit -l unlimited`.
190
192
 
191
193
 
192
194
  ############################## Network And HTTP ###############################
193
195
 
194
- # ElasticSearch, by default, binds itself to the 0.0.0.0 address, and listens
196
+ # Elasticsearch, by default, binds itself to the 0.0.0.0 address, and listens
195
197
  # on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node
196
198
  # communication. (the range means that if the port is busy, it will automatically
197
199
  # try the next port).
@@ -207,7 +209,7 @@ path.plugins: <%= es_plugins_dir %>
207
209
 
208
210
  # Set both 'bind_host' and 'publish_host':
209
211
  #
210
- network.host: <%= es_network_host %>
212
+ network.host: <%= es.network_host %>
211
213
 
212
214
  # Set a custom port for the node to node communication (9300 by default):
213
215
  #
@@ -237,8 +239,8 @@ network.host: <%= es_network_host %>
237
239
  # in the gateway, and when the cluster starts up for the first time,
238
240
  # it will read its state from the gateway.
239
241
 
240
- # There are several types of gateway implementations. For more information,
241
- # see <http://elasticsearch.org/guide/reference/modules/gateway>.
242
+ # There are several types of gateway implementations. For more information, see
243
+ # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-gateway.html>.
242
244
 
243
245
  # The default gateway type is the "local" gateway (recommended):
244
246
  #
@@ -296,8 +298,8 @@ network.host: <%= es_network_host %>
296
298
  # and master node is elected. Multicast discovery is the default.
297
299
 
298
300
  # Set to ensure a node sees N other master eligible nodes to be considered
299
- # operational within the cluster. Set this option to a higher value (2-4)
300
- # for large clusters (>3 nodes):
301
+ # operational within the cluster. Its recommended to set it to a higher value
302
+ # than 1 when running more than 2 nodes in the cluster.
301
303
  #
302
304
  # discovery.zen.minimum_master_nodes: 1
303
305
 
@@ -307,8 +309,8 @@ network.host: <%= es_network_host %>
307
309
  #
308
310
  # discovery.zen.ping.timeout: 3s
309
311
 
310
- # See <http://elasticsearch.org/guide/reference/modules/discovery/zen.html>
311
- # for more information.
312
+ # For more information, see
313
+ # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-zen.html>
312
314
 
313
315
  # Unicast discovery allows to explicitly control which nodes will be used
314
316
  # to discover the cluster. It can be used when multicast is not present,
@@ -321,18 +323,29 @@ network.host: <%= es_network_host %>
321
323
  # 2. Configure an initial list of master nodes in the cluster
322
324
  # to perform discovery when new nodes (master or data) are started:
323
325
  #
324
- # discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"]
326
+ # discovery.zen.ping.unicast.hosts: ["host1", "host2:port"]
325
327
 
326
328
  # EC2 discovery allows to use AWS EC2 API in order to perform discovery.
327
329
  #
328
330
  # You have to install the cloud-aws plugin for enabling the EC2 discovery.
329
331
  #
330
- # See <http://elasticsearch.org/guide/reference/modules/discovery/ec2.html>
331
- # for more information.
332
+ # For more information, see
333
+ # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-ec2.html>
332
334
  #
333
- # See <http://elasticsearch.org/tutorials/2011/08/22/elasticsearch-on-ec2.html>
335
+ # See <http://elasticsearch.org/tutorials/elasticsearch-on-ec2/>
334
336
  # for a step-by-step tutorial.
335
337
 
338
+ # GCE discovery allows to use Google Compute Engine API in order to perform discovery.
339
+ #
340
+ # You have to install the cloud-gce plugin for enabling the GCE discovery.
341
+ #
342
+ # For more information, see <https://github.com/elasticsearch/elasticsearch-cloud-gce>.
343
+
344
+ # Azure discovery allows to use Azure API in order to perform discovery.
345
+ #
346
+ # You have to install the cloud-azure plugin for enabling the Azure discovery.
347
+ #
348
+ # For more information, see <https://github.com/elasticsearch/elasticsearch-cloud-azure>.
336
349
 
337
350
  ################################## Slow Log ##################################
338
351
 
@@ -355,10 +368,11 @@ network.host: <%= es_network_host %>
355
368
 
356
369
  ################################## GC Logging ################################
357
370
 
358
- #monitor.jvm.gc.ParNew.warn: 1000ms
359
- #monitor.jvm.gc.ParNew.info: 700ms
360
- #monitor.jvm.gc.ParNew.debug: 400ms
371
+ #monitor.jvm.gc.young.warn: 1000ms
372
+ #monitor.jvm.gc.young.info: 700ms
373
+ #monitor.jvm.gc.young.debug: 400ms
374
+
375
+ #monitor.jvm.gc.old.warn: 10s
376
+ #monitor.jvm.gc.old.info: 5s
377
+ #monitor.jvm.gc.old.debug: 2s
361
378
 
362
- #monitor.jvm.gc.ConcurrentMarkSweep.warn: 10s
363
- #monitor.jvm.gc.ConcurrentMarkSweep.info: 5s
364
- #monitor.jvm.gc.ConcurrentMarkSweep.debug: 2s
@@ -1,4 +1,6 @@
1
- rootLogger: INFO, console, file
1
+ # you can override this using by setting a system property, for example -Des.logger.level=DEBUG
2
+ es.logger.level: INFO
3
+ rootLogger: ${es.logger.level}, console, file
2
4
  logger:
3
5
  # log action execution errors for easier debugging
4
6
  action: DEBUG
@@ -17,9 +17,9 @@ IndexOptions FancyIndexing HTMLTable VersionSort
17
17
  # We include the /icons/ alias for FancyIndexed directory listings. If
18
18
  # you do not use FancyIndexing, you may comment this out.
19
19
  #
20
- Alias /icons/ "<%= httpd_share_dir %>/icons/"
20
+ Alias /icons/ "<%= httpd.share_dir %>/icons/"
21
21
 
22
- <Directory "<%= httpd_share_dir %>/icons">
22
+ <Directory "<%= httpd.share_dir %>/icons">
23
23
  Options Indexes MultiViews
24
24
  AllowOverride None
25
25
  Order allow,deny
@@ -12,11 +12,11 @@
12
12
  # on the directory where the DavLockDB is placed and on any directory where
13
13
  # "Dav On" is specified.
14
14
 
15
- DavLockDB "<%= webdav_dir %>/DavLock"
15
+ DavLockDB "<%= httpd.webdav_dir %>/DavLock"
16
16
 
17
- Alias /webdav "<%= webdav_dir %>"
17
+ Alias /webdav "<%= httpd.webdav_dir %>"
18
18
 
19
- <Directory "<%= webdav_dir %>">
19
+ <Directory "<%= httpd.webdav_dir %>">
20
20
  Dav On
21
21
  Options +Indexes
22
22
  IndexOptions FancyIndexing
@@ -31,7 +31,7 @@ Alias /webdav "<%= webdav_dir %>"
31
31
 
32
32
  # You can use the htdigest program to create the password database:
33
33
  # htdigest -c "/usr/user.passwd" DAV-upload admin
34
- AuthUserFile "<%= auth_user_file %>"
34
+ AuthUserFile "<%= httpd.auth_user_file %>"
35
35
  AuthDigestProvider file
36
36
 
37
37
  # Allow universal read-access, but writes are restricted
@@ -17,7 +17,7 @@
17
17
  #
18
18
  <IfModule !mpm_winnt_module>
19
19
  <IfModule !mpm_netware_module>
20
- LockFile "<%= httpd_log_dir %>/accept.lock"
20
+ LockFile "<%= httpd.log_dir %>/accept.lock"
21
21
  </IfModule>
22
22
  </IfModule>
23
23
 
@@ -19,9 +19,9 @@
19
19
  # your Apache version number and your ServerAdmin email address regardless
20
20
  # of the setting of ServerSignature.
21
21
 
22
- Alias /error/ "<%= httpd_share_dir %>/error/"
22
+ Alias /error/ "<%= httpd.share_dir %>/error/"
23
23
 
24
- <Directory "<%= httpd_share_dir %>/error">
24
+ <Directory "<%= httpd.share_dir %>/error">
25
25
  AllowOverride None
26
26
  Options IncludesNoExec
27
27
  AddOutputFilter Includes html
@@ -37,7 +37,7 @@ ServerRoot "/usr"
37
37
  # prevent Apache from glomming onto all bound IP addresses.
38
38
  #
39
39
  #Listen 12.34.56.78:80
40
- Listen <%= httpd_port %>
40
+ Listen <%= httpd.port %>
41
41
 
42
42
  #
43
43
  # Dynamic Shared Object (DSO) Support
@@ -150,7 +150,7 @@ Group _www
150
150
  # e-mailed. This address appears on some server-generated pages, such
151
151
  # as error documents. e.g. admin@your-domain.com
152
152
  #
153
- ServerAdmin "<%= httpd_server_admin %>"
153
+ ServerAdmin "<%= httpd.server_admin %>"
154
154
 
155
155
  #
156
156
  # ServerName gives the name and port that the server uses to identify itself.
@@ -159,7 +159,7 @@ ServerAdmin "<%= httpd_server_admin %>"
159
159
  #
160
160
  # If your host doesn't have a registered DNS name, enter its IP address here.
161
161
  #
162
- ServerName <%= httpd_server_name %>
162
+ ServerName <%= httpd.server_name %>
163
163
 
164
164
  #
165
165
  # DocumentRoot: The directory out of which you will serve your
@@ -264,7 +264,7 @@ DocumentRoot "<%= www_dir %>"
264
264
  # logged here. If you *do* define an error logfile for a <VirtualHost>
265
265
  # container, that host's errors will be logged there and not here.
266
266
  #
267
- ErrorLog "<%= httpd_log_dir %>/error.log"
267
+ ErrorLog "<%= httpd.log_dir %>/error.log"
268
268
 
269
269
  #
270
270
  # LogLevel: Control the number of messages logged to the error_log.
@@ -293,7 +293,7 @@ LogLevel warn
293
293
  # define per-<VirtualHost> access logfiles, transactions will be
294
294
  # logged therein and *not* in this file.
295
295
  #
296
- CustomLog "<%= httpd_log_dir %>/access.log" common
296
+ CustomLog "<%= httpd.log_dir %>/access.log" common
297
297
 
298
298
  #
299
299
  # If you prefer a logfile with access, agent, and referer information
@@ -368,7 +368,7 @@ DefaultType text/plain
368
368
  # TypesConfig points to the file containing the list of mappings from
369
369
  # filename extension to MIME-type.
370
370
  #
371
- TypesConfig <%= httpd_etc_dir %>/mime.types
371
+ TypesConfig <%= httpd.etc_dir %>/mime.types
372
372
 
373
373
  #
374
374
  # AddType allows you to add to or override the MIME configuration
@@ -451,7 +451,7 @@ TraceEnable off
451
451
  # necessary.
452
452
 
453
453
  # Server-pool management (MPM specific)
454
- Include <%= httpd_etc_dir %>/extra/*.conf
454
+ Include <%= httpd.etc_dir %>/extra/*.conf
455
455
 
456
456
 
457
457
  #
@@ -464,4 +464,4 @@ SSLRandomSeed startup builtin
464
464
  SSLRandomSeed connect builtin
465
465
  </IfModule>
466
466
 
467
- #Include <%= httpd_etc_dir %>/other/*.conf
467
+ #Include <%= httpd.etc_dir %>/other/*.conf
@@ -1,19 +1,19 @@
1
- # Store data in <%= mongo_master_dir %> instead of the default /data/db
2
- dbpath = <%= mongo_master_dir %>
1
+ # Store data in <%= mongo.master_dir %> instead of the default /data/db
2
+ dbpath = <%= mongo.master_dir %>
3
3
 
4
4
  # Only accept local connections
5
5
  #bind_ip = 127.0.0.1
6
6
 
7
- logpath = <%= mongo_log_dir %>/<%= mongo_master_name %>.log
7
+ logpath = <%= mongo.log_dir %>/<%= mongo.master_name %>.log
8
8
 
9
- pidfilepath = <%= mongo_run_dir %>/<%= mongo_master_name %>.pid
9
+ pidfilepath = <%= mongo.run_dir %>/<%= mongo.master_name %>.pid
10
10
 
11
- fork = <%= mongo_fork %>
11
+ fork = <%= mongo.fork %>
12
12
 
13
- jsonp = <%= mongo_jsonp %>
13
+ jsonp = <%= mongo.jsonp %>
14
14
 
15
- rest = <%= mongo_rest %>
15
+ rest = <%= mongo.rest %>
16
16
 
17
- port = <%= mongo_master_port %>
17
+ port = <%= mongo.master_port %>
18
18
 
19
19
  master = true
@@ -1,21 +1,21 @@
1
- # Store data in <%= mongo_slave_dir %> instead of the default /data/db
2
- dbpath = <%= mongo_slave_dir %>
1
+ # Store data in <%= mongo.slave_dir %> instead of the default /data/db
2
+ dbpath = <%= mongo.slave_dir %>
3
3
 
4
4
  # Only accept local connections
5
5
  #bind_ip = 127.0.0.1
6
6
 
7
- logpath = <%= mongo_log_dir %>/<%= mongo_slave_name %>.log
7
+ logpath = <%= mongo.log_dir %>/<%= mongo.slave_name %>.log
8
8
 
9
- pidfilepath = <%= mongo_run_dir %>/<%= mongo_slave_name %>.pid
9
+ pidfilepath = <%= mongo.run_dir %>/<%= mongo.slave_name %>.pid
10
10
 
11
- fork = <%= mongo_fork %>
11
+ fork = <%= mongo.fork %>
12
12
 
13
- jsonp = <%= mongo_jsonp %>
13
+ jsonp = <%= mongo.jsonp %>
14
14
 
15
- rest = <%= mongo_rest %>
15
+ rest = <%= mongo.rest %>
16
16
 
17
17
  slave = true
18
18
 
19
- port = <%= mongo_slave_port %>
19
+ port = <%= mongo.slave_port %>
20
20
 
21
- source = <%= mongo_slave_source %>
21
+ source = <%= mongo.slave_source %>
@@ -1,34 +1,48 @@
1
- [client]
2
- character-set-server=<%= mysql_charset %>
3
- port=<%= mysql_port %>
4
- socket=<%= mysql_socket %>
5
-
6
-
7
- [mysqld]
8
- character-set-server=<%= mysql_charset %>
9
- user=<%= user %>
10
- port=<%= mysql_port %>
11
- socket=<%= mysql_socket %>
12
- basedir=<%= mysql_home %>
13
- datadir=<%= mysql_dir %>
14
-
15
- pid-file=<%= mysql_pid_file %>
16
- log-error=<%= mysql_log_dir %>/error.log
17
-
18
- slow_query_log=<%= mysql_slow_query_log %>
19
- slow_query_log_file=<%= mysql_log_dir %>/slow-query.log
20
-
21
- general_log=<%= mysql_general_log %>
22
- general_log_file=<%= mysql_log_dir %>/general.log
23
-
24
-
25
- relay-log-index=<%= mysql_log_dir %>/relay-index.log
26
- relay-log-info-file=<%= mysql_log_dir %>/relay-info.log
27
- relay-log=<%= mysql_log_dir %>/relay.log
28
-
29
- explicit_defaults_for_timestamp=TRUE
30
-
31
-
32
- [mysqldump]
33
- quick
34
- max_allowed_packet=24M
1
+ # For advice on how to change settings please see
2
+ # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
3
+
4
+ [mysql]
5
+ default-character-set = <%= mysql.charset %>
6
+
7
+ [mysqlshow]
8
+ default-character-set = <%= mysql.charset %>
9
+
10
+ [mysqlimport]
11
+ default-character-set = <%= mysql.charset %>
12
+
13
+ [mysqlcheck]
14
+ default-character-set = <%= mysql.charset %>
15
+
16
+ [mysql_upgrade]
17
+ default-character-set = <%= mysql.charset %>
18
+
19
+ [mysqld]
20
+
21
+ # Remove leading # and set to the amount of RAM for the most important data
22
+ # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
23
+ innodb_buffer_pool_size = 128M
24
+
25
+ log-error = <%= mysql.log_error %>
26
+ pid-file = <%= mysql.pid_file %>
27
+
28
+ # Remove leading # to turn on a very important data integrity option: logging
29
+ # changes to the binary log between backups.
30
+ log_bin = mysqld-bin
31
+
32
+ # These are commonly set, remove the # and set as required.
33
+ basedir = <%= mysql.home %>
34
+ datadir = <%= mysql.data_dir %>
35
+ port = <%= mysql.port %>
36
+ # server_id = .....
37
+ socket = <%= mysql.socket %>
38
+
39
+ # Remove leading # to set options mainly useful for reporting servers.
40
+ # The server defaults are faster for transactions and fast SELECTs.
41
+ # Adjust sizes as needed, experiment to find the optimal values.
42
+ # join_buffer_size = 128M
43
+ # sort_buffer_size = 2M
44
+ # read_rnd_buffer_size = 2M
45
+
46
+ character-set-server = <%= mysql.charset %>
47
+
48
+ sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
@@ -1,12 +1,12 @@
1
1
  location / {
2
- root <%= www_dir %>;
3
- index index.php index.html index.htm;
2
+ root <%= nginx.www_dir %>;
3
+ index index.php index.html index.htm;
4
4
  }
5
5
 
6
6
  location ~ \.php$ {
7
- root <%= www_dir %>;
8
- fastcgi_pass fastcgi_server;
9
- fastcgi_index index.php;
10
- fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
11
- include conf/fastcgi_params;
7
+ root <%= nginx.www_dir %>;
8
+ fastcgi_pass fastcgi_server;
9
+ fastcgi_index index.php;
10
+ fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
11
+ include conf/fastcgi_params;
12
12
  }
@@ -1,11 +1,11 @@
1
- <%- www_paths.each do|loc, alias_path| -%>
1
+ <%- nginx.www_paths.each do|loc, alias_path| -%>
2
2
  location <%= loc %> {
3
- charset utf-8;
3
+ charset utf-8;
4
4
 
5
- autoindex on;
5
+ autoindex on;
6
6
  autoindex_localtime on;
7
7
  autoindex_exact_size off;
8
8
 
9
- alias <%= alias_path %>;
9
+ alias <%= alias_path %>;
10
10
  }
11
11
  <%- end -%>