unleashedtech / deployer-recipes
Deployer 7+ functionality used by Unleashed Technologies
Installs: 5 697
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 8
Forks: 2
Open Issues: 2
Type:deployer-recipe
Requires
- php: ^7.3 || ^8.0
- deployer/deployer: ^7
Requires (Dev)
- deployer/deployer: ^7
- roave/security-advisories: dev-latest
- unleashedtech/php-coding-standard: ^3.1
- dev-main / 0.5.x-dev
- 0.5.0
- 0.4.0
- 0.3.23
- 0.3.22
- 0.3.21
- 0.3.20
- 0.3.19
- 0.3.18
- 0.3.17
- 0.3.16
- 0.3.15
- 0.3.14
- 0.3.13
- 0.3.12
- 0.3.11
- 0.3.10
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- v0.1.2
- v0.1.0
- dev-magento2-auth-json-shared
- dev-less-maint
- dev-dependabot/github_actions/actions/checkout-3
- dev-feature/db-copy
- dev-acquia
- dev-magento2-syntax-fix
- dev-feature/symfony
- dev-feature/virtual-machine-classes
- dev-import-fix
- dev-dev-master-test
- dev-backup-dir-fix
This package is auto-updated.
Last update: 2024-11-25 22:54:22 UTC
README
This package uses Deployer 7, which supports recipes defined by YAML or PHP.
Deployer will import the recipes in a linear fashion. Placeholders will be replaced
with actual values as late as possible. Deployer looks for deploy.php
or
deploy.yaml
when run.
Installation
All recipe paths have been adjusted to use the files in the vendor directory and thus should be installed with composer:
composer require unleashedtech/deployer-recipes
Usage
Recipes have been organized to easily support any version of any software. They make several assumptions about git repository settings, deployment locations & host settings. These assumed default values are only applied if you haven't already defined them. Please choose a platform below for more.
Please note that tasks assume databases on relevant stages have already been
configured. If you need to skip all database operations, you can set
skip_db_ops
to true
via the command line.
Run vendor/bin/deployer.phar tree deploy
to view the deploy
recipe tree.
Run vendor/bin/deployer.phar deploy
to deploy.
Run vendor/bin/deployer.phar
to review available recipes.
Before/After Hooks
Deployer supports running tasks before or after other defined tasks. Defining
custom tasks to trigger before & after other defined tasks is trivial. Such
functionality can be added to the end of deploy.yaml
, as shown below:
tasks: foo: script: - "echo 'foo'" bar: script: - "echo 'bar'" after: deploy:symlink: foo before: deploy:unlock: bar
SSH Hosts
This package will dynamically define hosts based on global configuration values.
It loops over a CSV list of environments in the environments
variable, defining
0 or more hosts for each environment. By default, production
, staging
& dev
environments are defined. For each environment, the package defines a number of
hosts based on the integer value of the matching {environment}_webservers
variable (e.g. two hosts defined for production
based on the production_webservers
variable value). These hosts will be linked together by their environment name
(or stage
, in Deployer parlance). When you want to deploy to production, you would
probably run a command similar to dep deploy stage=production
. This package assumes
there are 2 production webservers, by default.
config: #### production_domain: "production1.example" production_webservers: 3
Configuring SSH
The hosts defined by Deployer are merely aliases. During execution, Deployer will
assume hosts defined internally are available via SSH. You can add hosts to your
~/.ssh/config
file, or you can add Include
directive(s) which will load config provided by other files into your main SSH config.
Such definitions can occur immediately before an automated deployment.
Each project can provide its own SSH config. Consider creating an .ssh
folder in your
project root & creating a config
file within.
You can manually include config for specific projects:
Include ~/projects/foo/.ssh/config
You can also use a pattern to auto-include project config from many folders:
Include ~/projects/*/.ssh/config