Permalink
Browse files

Just use give the config object to TT

  • Loading branch information...
perlDreamer committed Dec 31, 2011
1 parent f208687 commit 707ed08d22d77a04d23d14c87b8b9486852f7e42
Showing with 6 additions and 10 deletions.
  1. +1 −0 wre/lib/WRE/File.pm
  2. +1 −6 wre/var/setupfiles/my.cnf
  3. +4 −4 wre/var/setupfiles/nginx.conf
@@ -332,6 +332,7 @@ sub processTemplate {
}

# add in some template template variables
$var->{config} = $config;
$var->{databaseHost} = $config->get("mysql/hostname");
$var->{databasePort} = $config->get("mysql/port");
$var->{nginxPort} = $config->get("nginx/port");
@@ -14,12 +14,7 @@ ft_min_word_len=2
wait_timeout=600
query_cache_size=32M
default-character-set=utf8
port=[% databasePort %]
[% IF osName == "windows" %]
pid-file=c:\data\wre\var\mysql.pid
datadir=c:\data\wre\var\mysqldata
lower_case_table_names=2
[% END %]
port=[% config.get(database/port) %]
[% IF osName == "darwin" %]
lower_case_table_names=2
[% END %]
@@ -1,9 +1,9 @@
user [% wreUser %];
worker_processes 10;

error_log [% wreRoot %]/var/logs/error.log;
error_log [% config.getRoot %]/var/logs/error.log;

pid [% wreRoot %]/var/run/nginx.pid;
pid [% config.getRoot %]/var/run/nginx.pid;

events {
worker_connections 1024;
@@ -33,10 +33,10 @@ http {
}

location ~ /.* {
proxy_pass http://localhost:[% starmanPort %];
proxy_pass http://localhost:[% config.get(starman/port) %];
}

##Include per-server vhost configuration files.
include [% wreRoot %]/etc/*.nginx
include [% config.getRoot %]/etc/*.nginx

}

0 comments on commit 707ed08

Please sign in to comment.