On Wed, Nov 19, 2008 at 5:50 PM, MrEMan <[EMAIL PROTECTED]> wrote: > > I've been developing a Zend app for awhile now. It's a project I adopted from > a previous contractor and I am not the one responsible for deploying it. > I've recently encountered a production bug and really need to run the app in > production mode locally to figure this out. > > How do I run my Zend Framework app in production? It must be obvious, > because it doesn't seem to be documented _anywhere_. > > Thanks
I store my configuration details in Zend_Config_Ini. I have different section in there, [production], [staging:production], etc.. The environment is set in my "index.php", which means that trunk is always [staging] (or development). When we deploy a release, we create a tag in SVN where, once it's created, I change the environment. We checkout the tag to a new folder in production, so for example, on one of my frontends, the directory layout is as follows: /usr/www/domain.com/1.0 /usr/www/domain.com/1.1 /usr/www/domain.com/1.2 ... Each folder contains the entire application - including ZendFramework code, etc.. The directories are symlinked from /usr/www/domain.com/www. This allows us to rollback anytime without going nuts. ;-) For other dependencies - such as PHP version, extension, PEAR packages, etc. - I started creating a meta PEAR package which i keep updated and distribute using a private PEAR channel. I install it via, "pear install VendorMeta-1.0.0.tgz" and it will alert me in case dependencies are not met. The meta PEAR package is pretty slim - it contains a pretty comprehensive package.xml, which has all the dependencies listed. Staying up to date doesn't get any easier than this. Cheers, Till
