If anyone bumps into this thread here is a great solution

http://groups.google.com/group/cake-php/browse_thread/thread/fd5fd9d30fb1c343/2316245e32c91097?lnk=gst


On Jan 8, 1:51 pm, Langdon Stevenson <[EMAIL PROTECTED]> wrote:
> Personally I use an Ant build task (through Eclipse) to deploy my
> applications to dev, test, and production.  It keeps the deployment
> specific info out of the code and all in one place.  It also means that
> I can easily add a new target or change a target with little effort.
>
> Ant is pretty powerful and I only need a fraction of what it is capable
> of for deployment of my Cake applications.  The integration with Eclipse
> is also very handy as it is trivial to trigger specific builds.
>
> Regards,
> Langdon
>
> rtconner wrote:
> > Yeah if anyone find's a great way to do this .. lemme know. For me, I
> > just toss some if statements into my config that recongnize the url
> > and pick a db config based on it. Not the best idea.. I know.
>
> > I think *best* case scenario is to not commit the database config
> > file. And have deploy scripts to given servers generate the database
> > config file somehow. but that is a bit of work.
>
> > On Jan 8, 12:04 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> >> On Jan 8, 2008 1:39 PM, Alfredo <[EMAIL PROTECTED]> wrote:
>
> >>> Hi, I need to handle multiple environments (dev, qa, production...)
> >>> and for each I need a set of values, diffrent api keys,  base urls
> >>> resource locations etc.  Is there a way to define an array for each
> >>> environment and have an global environment_config array that can be
> >>> accessed from controllers/models/views? Is there a default technique
> >>> for this?
> >> While this is not a Cake-specific thing, I have done similar stuff by
> >> defining an Apache environment variable for each environment, then in
> >> my "load values depending on environment" section I would check the
> >> value of that variable.
>
> >> In Cake-1.2-specific terms, I imagine you'd need some code that would
> >> look at that environment variable and then load things into the
> >> Configure object:
>
> >>http://tempdocs.cakephp.org/#TOC33079
>
> >> Where that code should go, I don't know.  Perhaps in the
> >> beforeFilter() for AppController?
>
> >> Hope that helps.
>
> >> --
> >> Chris Hartjes
> >> Internet Loudmouth
> >> Motto for 2008: "Moving from herding elephants to handling snakes..."
> >> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to