Mobile app version of vmapp.org
Login or Join
Vandalay111

: Whats the best way to create/handle a dev server? As I expand on different website changes I'm trying to find a better and safer alternative to my current testing.domain.com and FTP solution.

@Vandalay111

Posted in: #Development #Git

As I expand on different website changes I'm trying to find a better and safer alternative to my current testing.domain.com and FTP solution. My goal is to put the site in revision control (probably Git due to its excellent branching and tagging ability) and still be able to view my dynamic site (PHP) in real time along with clients.

So for some questions


Is there any free or very cheap software that does this already? I don't want to reinvent the wheel.
What would be the best way to implement version control in this setup? Use the testing folders on the server as a git repo? Sync the dev and local copies and use local as a repository? Do I make the whole site (production and dev) a repository?
How can I sync dev and production?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

2 Comments

Sorted by latest first Latest Oldest Best

 

@Hamm4606531

I have development server on my notebook, there is git repository too. The configuration is quite similar to production server. If I need synchronize, I just upload all source files.

10% popularity Vote Up Vote Down


 

@Pierce454

You'll probably want to branch your code or at the very least start using tags. I prefer the branch method so I can keep 2 copies of the site. One being my trunk version ( dev ) and another being the live production copy. Then I can just merge the changes to the production branch when I'm ready to publish and if something goes wrong on production I have a current 1 for 1 match with production I can work on to fix.

As for the dev server part. I often use a subdomain of "QA.example.com" and restrict all access by IP to it. This way if I need a 3rd party to see it to proof something before it goes live, I can add their IP range.

Since you're using a database with your PHP site ( I'm assuming this since you mentioned it's dynamic ), you might also want to make a copy of the database and rename it with a suffix like 'dev' so that you can edit it without effecting production in your QA environment. It's fairly easy to export a DB and just insert it into another with a different name if you're doing it from scratch each time. I actually have a script through Hudson that allows me to do a simple backup from my production DB and then drop my QA DB and replace with the production copy.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme