perspikapps/php-easy-deployer

A deployer.org recipe with url-based easy configuration

v1.0.0 2022-05-23 19:36 UTC

This package is not auto-updated.

Last update: 2024-04-16 14:48:22 UTC


README

Packagist Packagist Packagist

Commitizen friendly semantic-release

Buy me a coffee

This package handles deployement configuration via a deploy.yaml file to define deploy strategy and a .hostmap file to define target strategy

Installation

Install via composer

composer require perspikapps/php-easy-deployer

Usage

Deployment is handled by deployphp/deployer package.

deploy.yaml

See deployer config for details

import:
    - vendor/perspikapps/php-easy-deployer/src/strategy_laravel.php
    - vendor/perspikapps/php-easy-deployer/src/strategy_upload.php
    - vendor/perspikapps/php-easy-deployer/src/strategy_update.php
    - vendor/perspikapps/php-easy-deployer/src/strategy_shared.php
    - vendor/perspikapps/php-easy-deployer/src/strategy.php

config:
    source_path: './'
    shared_dirs:
        - storage
    shared_files:
        - .env
    writable_dirs:
        - bootstrap/cache
        - storage
        - storage/app
        - storage/app/public
        - storage/framework
        - storage/framework/cache
        - storage/framework/sessions
        - storage/framework/views
        - storage/logs
    log_files:
        - storage/logs/*.log

.hostname

Specify ONE deployement target per line as url:

  • url scheme = strategies to activate (+ separated, each must be loaded in import section of deploy.yaml file)
  • url user/host/port = server to deploy to
  • url path = path on server to deploy to
  • url query = deploy options to use
  • url anchor = variables to set in .env file after deployment
upload+laravel://user@dev.exemple.com/var/home/{{hostname}}?bin/php=/opt/plesk/php/7.4/bin/php&writable_mode=chmod#debug=true&env=staging
upload+laravel://user@beta.exemple.com/var/home/{{hostname}}?bin/php=/opt/plesk/php/7.4/bin/php&writable_mode=chmod#debug=true&env=beta
upload+laravel://user@www.exemple.com/var/home/{{hostname}}?bin/php=/opt/plesk/php/7.4/bin/php&writable_mode=chmod#debug=false&env=production

Security

If you discover any security related issues, please email instead of using the issue tracker.

Credits