How do you deploy a website to your webservers?

前端 未结 7 729
礼貌的吻别
礼貌的吻别 2020-12-24 08:59

At my company we have a group of 8 web developers for our business web site (entirely written in PHP, but that shouldn\'t matter). Everyone in the group is working on differ

7条回答
  •  悲&欢浪女
    2020-12-24 09:17

    Cassy - you obviously have a long way to go before you'll get your source code management entirely in order, but it sounds like you are on your way!

    Having individual sandboxes will definitely help on things. Next then make sure that the website is ALWAYS just a clean checkout of a particular revision, tag or branch from subversion.

    We use git, but we have a similar setup. We tag a particular version with a version number (in git we also get to add a description to the tag; good for release notes!) and then we have a script that anyone with access to "do a release" can run that takes two parameters -- which system is going to be updated (the datacenter and if we're updating the test or the production server) and then the version number (the tag).

    The script uses sudo to then run the release script in a shared account. It does a checkout of the relevant version, minimizes javascript and CSS1, pushes the code to the relevant servers for the environment and then restarts what needs to be restarted. The last line of the release script connects to one of the webservers and tails the error log.

    On our websites we include an html comment at the bottom of each page with the current server name and the version -- makes it easy to see "What's running right now?"

    1 and a bunch of other housekeeping tasks like that...

提交回复
热议问题