How to release web applications?

前端 未结 6 1695
逝去的感伤
逝去的感伤 2021-01-31 22:17

I don\'t really know how to perform deployment from offline development to live webserver correctly in web development. I mostly resort on intuition, but this is more or less wh

6条回答
  •  野的像风
    2021-01-31 22:56

    I recommend leveraging SVN export instead of checkout. This way, you will not expose any of the SVN files to the world. It also generally creates a cleaner folder structure.

    I have leveraged rsync before when moving files between stage and production.

    My typical deployment proceeds as follows:

    • backup production site
    • Restore from backup to stage server
    • Lock the server down from all external IP addresses
    • Export the code from the repository into a temp folder (optionally diff the two folders for small changes)
    • rsyc files from the temp folder to the stage server folder
    • Validate that only the files you expect to have changed have actually changed.
    • Apply SQL scripts to the DB
    • Test the upgrade
    • Unlock the webserver

    Now, to deploy to production, replay these steps in fast forward. Using scripts make it much easier.

提交回复
热议问题