Strategy for dev, test, and production

Hello, I was wondering what sort of strategies people use for development, test, and production versions of sites. In particular, how do you switch amongst them.

1) I realize that you could have 3 different linodes, but even so, I am wondering what sort of practices people use for the domain name. Could your dev and test sites be on the same linode and be accessible through different ports using the same domain name?

2) Regardless of strategy, I'm thinking that you would want to have a special indexDEV.html page, which would redirect to the index.html, that would need a password to prevent others from accessing your dev environment. Then, once you're finished with dev or test, you would leave the indexDEV.html or indexTEST.html behind, when you copy over to production. Makes sense?

Thanks for your assistance.

Joe

8 Replies

Thanks, James.

So, you might have

1.2.3.4 TestMyServer.com

1.2.3.4 ProdMyServer.com

in the /etc/host. Is that the idea?

I have *.dev.mydomain.com set to point to 10.0.0.8 which is my local dev box which allows all my devices on my home network to test dev sites.

I have my local dev box running lighttpd set to detect that subdomain and load /var/www/$subdomain so I can easily create a new folder and instantly get working on a new site without having to deal with new conf.

I use SVN to put my code on the testing & live sites. I know people say this is bad but I've done it in a smart way :).

I use a subdomain on each site (eg testing.domain.com) which is password protected in the lighttpd conf and which loads the /var/www/projectname/testing folder.

Once tested by the client, the live folder is updated over SVN which is almost instant.

This way I only need a single server using virtual hosts and no extra domains or dealing with hosts files. If I didn't want to run a local dev server it'd be fairly easy to do that on the live box too. With some sites I have a more complicated SVN setup but that's not really part of this discussion.

Does the password protection for the test subdomain cause an html authentication like popup to require the password? I'm guessing you just don't have that set for the prod, then. Thanks.

If I tried phrozen's approach - I'm using apache - is a subdomain set up like another virtual host?

Local server running Proxmox for dev and testing, VPS or Colo for production.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct