This is the LUYA recipe to deploy an application with Deployer, the Deployment Tool for PHP.
This is the recipe to deploy your LUYA Website with deployer.
Version 2.0 of LUYA Deployer uses latest deployer which does not support the password() method. In order to use
password()install verison ^1.0 of luya composer!
Add the deployer composer package to your project:
composer require luyadev/luya-deployer --dev
deploy.php file with the content of your server configuration(s) and store it in the root directory of your project:
<?php namespace Deployer; require 'vendor/luyadev/luya-deployer/luya.php'; // define your configuration here host('SSHHOST.COM') ->stage('prod') ->port(22) ->user('SSHUSER') ->set('deploy_path', '/var/www/vhosts/path/httpdocs'); set('repository', 'https://USER:PASSWORD@github.com/VENDOR/REPO.git');
To deploy to the above configured server just go into the console and run:
./vendor/bin/dep luya prod
If you have defined other servers like
dev etc you can just changed the server in the command. Lets say you have defined also a
./vendor/bin/dep luya dev
In order to configure a branch to deploy use
Set your vhost entry directory
In order to run your website, you have to modify the root directory of your website to
current/public_html folder. Deployer will create the following folders:
Those folders are located in your defined