Search code examples
testingxamppproductionstagingenvironments

Setting up development server references


What would you guys recommend as good references for setting up a testing server (xampp on xp pro), a staging server and a production server while also having svn? I'm a noob to "hardcore" development but want to start off on the right foot and set up my environments like the pros do. I have several projects coming up and want to take two steps forward instead of one step forward and two back.

My main areas of least understanding are... keeping file paths correct between all servers and databases (dealing with localhost/site.com/file.html vs www.site.com/file.com), pushing updates to the next server - testing to staging to production, as well as using svn (we will be having several people working on the same projects at the same time).

Each project will have a single server so info on load-balancing and setting up several servers isn't needed. We are also planning to use netbeans or eclipse for svn unless otherwise suggested.

Production and staging servers will be LAMP while testing will be xampp on xp pro. Thanks for all the help!


Solution

  • In response to Chad's request for more examples of the environment folders & config files, here is further info:

    We have any settings used by the project split into config files; we are building websites, so those config files are referenced from the web.config.

    For instance in our Configuration folder we have a ConnectionStrings.config with this inside (filling in your info instead of the []s of course):

    <connectionStrings>
        <add name="APP"
             connectionString="Data Source=[];Initial Catalog=[];uid=[];password=[]"
             providerName="System.Data.SqlClient" />
    </connectionStrings>
    

    Path to it is:

    Site root
    |--> Configuration
    

    So it is referenced in the web config with this:

    <connectionStrings configSource="Configuration\ConnectionStrings.config" />
    

    So in our solution folder we would have this structure:

    Solution folder
    |--> Environments
      |--> Development
        |-->Configuration
          |--> ConnectionStrings.config
      |--> Production
        |-->Configuration
          |--> ConnectionStrings.config
      |--> Staging
        |-->Configuration
          |--> ConnectionStrings.config
    |--> Src
      |--> Project folder (site root)
        |--> Configuration
          |--> ConnectionStrings.config
    

    Same thing with any other settings, normally put into our AppSettings.config. So things like the paths to files or any other setting that would change.

    <appSettings>
        <add key="FilePath" value="C:\FileStorage"/>
    </appSettings>