Deployment tools
If you are using a version control system such as Git, for your project's code and pushing releases into remote repository, you can use Git to deploy code to your production server via the git pull
shell command instead of uploading files manually. Also, you can write your own shell script to pull new repository commits, update vendors, apply migrations, and do more things.
However, there are many tools available for automating the deployment process. In this recipe, we consider the tool named Deployer.
Getting ready
Create a new yii2-app-basic
application by using the Composer package manager, as described in the official guide at http://www.yiiframework.com/doc-2.0/guidestart-installation.html.
How to do it...
If you have a shared remote repository, you can use it for deployment source.
Step 1 - Preparing the remote host
- Go to your remote host and install Composer and
asset-plugin
too:global require 'fxp/composer-asset-plugin:~1.1.1'
- Generate the SSH key via
ssh...