Best way to deploy websites?

Hey guys, how do you deploy your sites? For example: Im developing a website with php framework and supporting it with git version with all my local configurations. When I want to place it on a web server for testing or updating a live application, I need to copy it to the server, change configuration files, delete test materials, etc.

So how do you deal with these tasks? I thought about using ant and wrote a deployment script for it. Is there already a general solution to this "problem" .. because I do not think that this is the only one who needs something like this.

Hello

+4
source share
2 answers

There is quite a lot of material, but you might like Phing (e.g. ANT for java).

PHP + Phing related questions:

Do you use phing?

How do you control the build process [using Phing]?

Setting Up Deployment / Build / CI Cycle for PHP Projects

what can phing do that ant cannot?

Also read these questions, it sounds very interesting. How to deploy your PHP applications?

At the moment, a specific question has been asked (a possible duplicate of your questions), take a look at it. Deploy the project using Git push

+4
source

It seems you are using php, you should be good to go with capistrano. It is very easy to use capistrano for deployment with rails, but it can also be tricked a bit for use in php.

Basically what you do with capistrano is

  • Tell me which application server you are using.
  • Tell the database server
  • Tell the web server (in most cases the web server, application server and db server are the same)
  • Specify the git repository with the branch you want to deploy from

After configuration, you can deploy using capistrano with a single command. You can even roll back your deployments from some of the backups created by capistrano. Now create some repetitive tasks, such as copying configuration files, such as database configurations (which are usually ignored in git), you create some tasks that simply create symbolic links or copy files in the appropriate place. These tasks will be called using deploy_hookes, for example. after_symlink.

Here you can find more about capistrano - https://github.com/capistrano/capistrano/wiki It comes with very good documentation, after receiving a review you can find your approach to the infrastructure for this.

+2
source

All Articles