Symfony rollout process with rsync


Symfony has a build-in rsync command line, which makes it easy to rollout your code into production. You can define multiple connections, in case you have multiple servers, a load balancer, backups…

In project/config/properties.ini:

[symfony]

name=codingfolder

[production1]

host=myapp.example.com

port=22

user=myuser

dir=/home/myaccount/myproject/

[production2]

host=myapp.example.com

port=22

user=myuser

dir=/home/myaccount/myproject/

Then, from the root directory of your project:

php symfony project:deploy production1

php symfony project:deploy production2

This will show you the files to be uploaded. Once you verify the list, add the option –go to proceed to synchronization:

php symfony project:deploy production1 –go

php symfony project:deploy production2 –go