December 13, 2004

Setting up things in production

A long while ago, I commented on having separate environments for test, production and development. This is one of those things, that need to be considered for whatever solution is being examined. If you have an opensource app you are testing, a place to do it is a good thing. If you are installing a CD that all of a sudden has Tomcat installed on the webserver. Maybe a separate box is best.

In developing there is logic that can be placed within code to have the application set up in which stage.

For example in MachII setting the development reloading can be as easy as

<--- Set the configuration mode (when to reload): -1=never, 0=dynamic, 1=always --->

<cfset request.isProductionMode = (listContainsNoCase(CGI.SERVER_NAME, "ProductionServerName")) />

<cfif not request.isProductionMode and structKeyExists(URL,"reloadApp")>
<cfset MACHII_CONFIG_MODE = 1 />
</cfif>

Its a neat trick for reloading and setting up the environments.

This is customized from the download on mach-ii.info

Posted by Elyse at December 13, 2004 7:32 PM | TrackBack
Comments
Post a comment









Remember personal info?