in reply to apache::dbi how to switch between development or production database?
On command-line:
In httpd.conf:> httpd -DPROD
<IfDefine PROD> PerlSetVar DATABASE_NAME foo PerlSetVar DATABASE_USER bar PerlSetVar DATABASE_PASS baz </IfDefine>
You can do fancier stuff too. In one place that I worked, we used a small script with Template Toolkit to re-generate httpd.conf for different environments based on a small file of values keyed on different environments. It was nice because we had the ability to do inheritance, where we would define defaults and override them for development or other special cases.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: apache::dbi how to switch between development or production database?
by ignatz (Vicar) on Dec 18, 2001 at 01:18 UTC | |
by perrin (Chancellor) on Dec 18, 2001 at 01:21 UTC |