[Dancer-users] how to set different running environment with Plack::Handler?

franck franck at lumberjaph.net
Fri Aug 20 08:42:45 CEST 2010


On Fri, Aug 20, 2010 at 3:40 AM, P Kishor <punk.kish at gmail.com> wrote:

> The docs say that I can have different config settings for development
> and production, and one or the other will be automatically used
> depending on my running environment, which I can specify with
> --environment command line switch. But, how do I specify this command
> line switch when I am running the application via Plack::Handler?
> Right now I run the application with the help of the following lines
> in my httpd.conf
>
>    <Location />
>        SetHandler perl-script
>        PerlHandler Plack::Handler::Apache2
>        PerlSetVar psgi_app /Users/punkish/Sites/lca/app.psgi
>    </Location>
>

I don't remember where you can export environment variable with apache
(something like /etc/apache/envvar, not sure), but you can set PLACK_ENV to
production, or DANCER_ENVIRONMENT, dancer use the first one if the second
one is not set. Or if you want to set this variable for each application,
you can do a 'environment: production' in your config.yml.

I will try to summarize all your questions you had lately on the mailing
list, and do a big upgrade on our deployment.pod.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20100820/8470b703/attachment-0001.htm>


More information about the Dancer-users mailing list