L
L
Leonid Korsakov2014-11-10 16:40:05
PHP
Leonid Korsakov, 2014-11-10 16:40:05

How to deploy php projects?

Does anyone use systems for deploying applications to combat servers? What are the main differences from simply pulling the stable branch in source control? Is there any reason to use them?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Entelis, 2014-11-10
@DmitriyEntelis

Often, deployment requires
a) to perform certain actions: compile css, build js, roll up database migrations, etc.
b) during the deployment process, test what happened and decide whether it’s worth deploying at all (+ give the author of the commit that failed the tests in the head)
All these tasks and should do the CI server.

S
Sergey, 2014-11-10
Protko @Fesor

Don't forget rsync as a deployment tool.
In general, everything is simple, when deploying via git pull, the current version of the site stops working for you. And the downtime depends on the complexity of the deployment. For example, you need to install vendors - we are waiting for composer install to work. Then we clear the cache - again a simple one. Then migrations. Wait again, and migrations can take a long time depending on the complexity... although they rarely take longer than a couple of minutes.
And all sorts of tools like kapifoni, etc. have the option of versioning. That is, while you have a new version rising - the old one processes requests. As soon as the migrations are pumped up, capifoni will simply change the symlinks and reload nginx (not reload, but only realload).
And when you have to follow the environment every time you roll out to the server, ansible / puppet is also allowed to monitor the entrance. There is also Docker.

A
Alexander Kubintsev, 2014-11-10
@akubintsev

As a variant of phing .
Our project is deployed on 3 different servers, including the database.
You can also rollback the version. For migration workers, this is, in principle, an obvious operation, and for code versions, switching the symlink to a folder with another deployment and reloading the cache is used.
pull is also not convenient for security reasons - each server must be registered in the whitelist for the git server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question