studio24 / deployer-recipes
Deployer recipes to aid deployment
Installs: 2 504
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 2
Requires
- php: >=7.2
- ext-json: *
- deployer/deployer: ^6.8
- symfony/http-client: ^5.2
Requires (Dev)
- overtrue/phplint: ^2.3
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2023-03-10 17:31:10 UTC
README
Deployer recipes to aid deployment via https://deployer.org
Installation
Install via Composer:
composer require studio24/deployer-recipes --dev
Install all Studio 24 Deployer tasks by adding this to your deploy.php
:
require 'vendor/studio24/deployer-recipes/all.php';
To only install individual tasks, see the docs for each task.
Running Deployer
Please note this project uses a local Deployer installation (via Composer) not a global version of Deployer. This is so we can make use of other Composer packages in deployment tasks reliably.
To run deployments please use:
vendor/bin/dep deploy environment
rather than:
dep deploy environment
If you wish, you can install vendor binaries to another location
by editing your project composer.json file. For example, to install to bin
so you can run deployer via bin/dep
:
{ "config": { "bin-dir": "bin" } }
Tasks
The following tasks are available:
- s24:build-summary - create a
_build_summary.json
file to record deployment info - s24:check-branch - ensure only default branch (main/master) is deployed to production
- s24:check-local-deployer - checks that deployment is running via the local Deployer install
- s24:confirm-continue - ask confirmation from user before continuing with deployment
- s24:display-disk-space - display server disk usage prior to deployment
- s24:notify-slack - send a notification to Slack on production deploy
- s24:show-summary - display a summary of the current deployment info
- s24:vendors-subpath - Run composer install in a sub-path
- sync - sync files or folders from the remote host to local development
Full deploy example
A sample of a full deploy file can be found in examples/deploy.php
To use this file in a project copy it to your project root and update the config variables.
Please edit deploy.php
depending on your needs. For example if you don't need to run Composer during deployment remove the line:
// Composer install
'deploy:vendors,',