V
V
Vladislav Altyncev2017-10-18 20:16:23
PHP
Vladislav Altyncev, 2017-10-18 20:16:23

How to properly deploy using deployer?

Can you advise on the structure? Or help me understand how to do it right)
As I understand it, from the deployer git, everything is pulled into `/releases/1/`, or rather, everything that can be controlled using the deployer.
In `/shared/` you can add everything that does not need to be "released", in principle, I don't have this.
So, in order not to create symlinks, as I understand it, you will have to, for example, using `rsync`, upon successful deployment, copy files from `/releases/1/` to `/` the site root?
Or is there an easier option?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Stepanov, 2017-10-26
@Vdm17

Deployer creates a new folder each time it runs, with an incrementing number in releases. But at the same time, the last successful release is always available via a symbolic link in current
. it turns out something like
releases/1
releases/2
releases/3
current ---> releases/3
shared
Why are you not satisfied with symbolic links? They are quite convenient in this case.
Unless you need to restart php-fpm after deployment, because. otherwise, active worker processes will use the old symbolic link value (meaning they will refer to the previous release).
Set up your web server to load the project from the current folder.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question