We run Fusebox 2.0 here so use app_globals.cfm but the concept we use should
work in an application.cfm file too.

We set a value in attributes.livestat that tells which environment we are in
and then have a couple of switch statements that sets any values that change
from place to place.  This lets each developer have a sandbox configured
anyway they like and nothing interferes with anything else.


<cfset attributes.liveStat = "sandbox">

<cfswitch expression="#attributes.liveStat#">
   <cfcase value="live">
      <cfset nm = "somedomain.com_cms">
      <cfset dsn = "PRODDB">
   </cfcase>

   <cfcase value="prodtest">
      <cfset nm = "somedomain.com_cms_prodtest">
      <cfset dsn = "TESTDB">
   </cfcase>

   <cfcase value="sandbox">
      <cfset nm = "somedomain.com_cms_mckee">
      <cfset dsn = "ANOTHERTESTDB">
   </cfcase>
</cfswitch>

<!--- define the CFAPPLICATION--->
<cfapplication name="#nm#"
            applicationtimeout=#CreateTimeSpan(1, 0, 0, 0)#
            clientstorage="#dsn#"
            clientmanagement="Yes"
            setclientcookies="Yes"
            setdomaincookies="Yes">
 
<cflock timeout="10" throwontimeout="No" type="EXCLUSIVE"
scope="APPLICATION">
     <cfset application.dsn = "#dsn#">
</cflock>

<cfswitch expression="#attributes.liveStat#">
   <cfcase value="live">
      <cfset attributes.path = "/livecm">
      <cfset attributes.mailto = "[EMAIL PROTECTED]">
      <cfset attributes.mailfrom = "[EMAIL PROTECTED]">
      <cfset attributes.sendmail = "yes">
      <cfset attributes.debug = "no">
      <cfset attributes.secureURL = "https://www.somedomain.com";>
      <cfset attributes.signupURL =
"https://www.somedomain.com/index.cfm?fuseaction=signup";>
      <cfset attributes.clientpath = "/livewww">
      <cfset attributes.signuppath = "/livesu">
   </cfcase>

   <cfcase value="prodtest">
      <cfset attributes.path = "/cmtest">
      <cfset attributes.mailto = "[EMAIL PROTECTED]">
      <cfset attributes.mailfrom = "[EMAIL PROTECTED]">
      <cfset attributes.sendmail = "yes">
      <cfset attributes.debug = "no">
      <cfset attributes.secureURL = "https://wwwtest.somedomain.com";>
      <cfset attributes.signupURL =
"https://wwwtest.somedomain.com/index.cfm?fuseaction=signup";>
      <cfset attributes.clientpath = "/wwwtest">
      <cfset attributes.signuppath = "/sutest">
   </cfcase>

   <cfcase value="sandbox">
      <cfset attributes.path = "/mckeecml">
      <cfset attributes.mailto = "[EMAIL PROTECTED]">
      <cfset attributes.mailfrom = "[EMAIL PROTECTED]">
      <cfset attributes.sendmail = "no">
      <cfset attributes.debug = "yes">
      <cfset attributes.cmSecureURL = "https://mckeecml";>
      <cfset attributes.cgiURL = "http://mckee/cgi-bin";>
      <cfset attributes.secureURL = "https://mckeewwwl";>
      <cfset attributes.signupURL =
"https://mckeewwwl/index.cfm?fuseaction=signup";>
      <cfset attributes.clientpath = "/mckeewwwl">
      <cfset attributes.signuppath = "/mckeesul">
   </cfcase>

</cfswitch>

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 04, 2002 1:19 PM
To: CF-Server
Subject: RE: dev -> test -> production tool?


lets see if this reply gets to the list in less than three hours this
time...wierd...

RE: application.cfm    We run into this issue too.  One method we use is to
look at cgi.server_name.  Depending on ths var, you can decide what to set
your datasource name or whatever else is server dependent.  This way your
application.cfm file can be 'universal'


Doug
>-----Original Message-----
>From: Kevin Graeme [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, December 04, 2002 2:13 PM
>To: CF-Server
>Subject: RE: dev -> test -> production tool?
>
>
>Our servers are mostly a mix of Linux and Win2K. It looks like 
>we're moving
>to primarily Linux, but may also be introducing Sun into the mix.
>
>The goal is just to keep developer's fingers off the production server.
>Ever. One problem we might have related to CF dev is the 
>Application.cfm and
>our database mappings. We use Oracle and have 
>dev/test/production instances
>of the database. Those instances correspond to the web server stage
>something is running at and the datasources to these instances 
>are defined
>in the Application.cfm. Just moving an the Application.cfm 
>from server to
>server isn't going to work because the DB instance name 
>referenced in that
>file needs to change as well.
>
>-Kevin
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, December 04, 2002 12:07 PM
>> To: CF-Server
>> Subject: RE: dev -> test -> production tool?
>>
>>
>> Out of curiosity, how did you set VSS up to maintain dev,
>> staging, and prod code?  I'm trying to set this up and have not
>> got a smooth way yet.  With VSS you can only 'deploy' to one 
>location.
>>
>>
>> All...Kevin didn't mention his OS...under Windows, there is
>> FRS/DFS for replicating files/dirs.
>>
>> Doug
>>
>> >-----Original Message-----
>> >From: Alex Ninan [mailto:[EMAIL PROTECTED]]
>> >Sent: Wednesday, December 04, 2002 12:56 PM
>> >To: CF-Server
>> >Subject: RE: dev -> test -> production tool?
>> >
>> >
>> >"Visual source safe" is a really great tool for your need. 
>For a free
>> >version you can also look at CVS
>> >
>> >Hope that helps
>> >Alex Ninan
>> >
>> >-----Original Message-----
>> >From: Kevin Graeme [mailto:[EMAIL PROTECTED]]
>> >Sent: Wednesday, December 04, 2002 9:38 AM
>> >To: CF-Server
>> >Subject: dev -> test -> production tool?
>> >
>> >
>> >Does anyone have a tool to migrate pages and sites from server
>> >to server
>> >when you have seperate dev, test, and production servers?
>> >
>> >It would be really, really great if it could have versioning too.
>> >
>> >
>> >Kevin Graeme
>> >
>> >
>> >
>> 
>

______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to