luyadev/luya-deployer

This is the LUYA recipe to deploy an application with Deployer, the Deployment Tool for PHP.

Installs: 23 604

Dependents: 4

Suggesters: 0

Security: 0

Stars: 5

Watchers: 5

Forks: 3

Open Issues: 0

Type:luya-core

1.0.8.1 2020-01-20 09:08 UTC

This package is auto-updated.

Last update: 2020-03-25 19:43:46 UTC


README

LUYA Logo

LUYA Deployer

LUYA Total Downloads Latest Stable Version Join the chat at https://gitter.im/luyadev/luya

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!

Install

Add the deployer composer package to your project:

composer require luyadev/luya-deployer --dev

Create a 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 prep, dev etc you can just changed the server in the command. Lets say you have defined also a dev server:

./vendor/bin/dep luya dev

In order to configure a branch to deploy use set('branch', 'myCheckoutBranch');

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:

  • releases
  • current
  • shared

Those folders are located in your defined deploy_path folder.