Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best/Better/Optimal way to setup a Staging/Development server

I recently launched a service, meaning I can no longer work directly on the site, or I do so at a risk.

I haven't been able to find any "standard" or "best" way to make a development server. The two things I have seen are

a) Using a GIT or SVN to host the data (this doesn't quite solve my problem, I need to be able to develop somewhere, preferably not my home computer)

b) Capistrano (for Rails, is there something for PHP?)


The current solution I'm looking at is putting a complete copy of the server on "development.domain.com", which would then allow me to work on everything, and I can simply copy the files over to the main section.

Is this a workable solution? What's the optimal solution? (Separate server, special tools, etc.)


EDIT This system be developed by a number of developers. The server settings have been tweaked considerably to allow for the full functionality and security of the system. Having the development on my own computer is not a workable solution, nor on an intranet type of system as none of our programmers are in the same location.

I'm looking for an on-a-server solution.

like image 889
Kerry Jones Avatar asked Oct 21 '10 18:10

Kerry Jones


1 Answers

Three suggestions:

1) You are on the right track with making sure that your source code is in some form of source control (git and svn are both excellent choices). This should be priority #1.

2) Have EVERYTHING that has deviated from a standard configuration be in some form of source control. This means your apache configs, your php.ini, database configs, etc. Then when you setup your staging and dev servers you can be (relatively) assured that everything is the same across all of your servers, otherwise you are just guessing.

3) Look into some sort of build scripts, either ant, phing, or anything that you can use to reliable build your environment from scratch on any machine.

There are tons of other things you can do, but if you implement these three you'll be well on your way to having the ability to easily setup a dev/staging server. This will also give you the added benefit of ensuring that all of your developers have a similar environment when doing their development as well.

like image 172
jsuggs Avatar answered Sep 29 '22 00:09

jsuggs