-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from studio24/update-to-deployer-7
Update to deployer 7
- Loading branch information
Showing
56 changed files
with
2,048 additions
and
720 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,53 @@ | ||
# Deployer recipes | ||
|
||
Deployer recipes to aid deployment via https://deployer.org | ||
This package contains [Deployer](https://deployer.org/) recipes used to help deploy Studio 24 projects. | ||
|
||
[![license][license-badge]][LICENSE] | ||
|
||
## Installation | ||
|
||
Install via Composer: | ||
## Requirements | ||
|
||
``` | ||
composer require studio24/deployer-recipes:^1.1 --dev | ||
``` | ||
* PHP 8.0+ (Deployer 7) | ||
* PHP 7.2 (Deployer 6) | ||
* [Composer](https://getcomposer.org/) | ||
|
||
Install all Studio 24 Deployer tasks by adding this to your `deploy.php`: | ||
## Documentation | ||
|
||
```php | ||
require 'vendor/studio24/deployer-recipes/all.php'; | ||
``` | ||
View [documentation](docs/README.md). | ||
|
||
To only install individual tasks, see the docs for each task. | ||
If you want to contribute to this project, please read the [contribution guidelines](CONTRIBUTING.md). | ||
|
||
### Running Deployer | ||
## Installation | ||
|
||
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. | ||
### Deployer 7 (PHP 8.0+) | ||
|
||
To run deployments please use: | ||
Install via Composer: | ||
|
||
``` | ||
vendor/bin/dep deploy environment | ||
``` | ||
composer require studio24/deployer-recipes:^2.0 --dev | ||
``` | ||
|
||
rather than: | ||
See [installation instructions](docs/installation.md). | ||
|
||
``` | ||
dep deploy environment | ||
``` | ||
### Deployer 6 (PHP 7.2–7.4) | ||
|
||
If you wish, you can [install vendor binaries to another location](https://getcomposer.org/doc/articles/vendor-binaries.md#can-vendor-binaries-be-installed-somewhere-other-than-vendor-bin-) | ||
by editing your project composer.json file. For example, to install to `bin` so you can run deployer via `bin/dep`: | ||
Install via Composer: | ||
|
||
```json | ||
{ | ||
"config": { | ||
"bin-dir": "bin" | ||
} | ||
} | ||
``` | ||
composer require studio24/deployer-recipes:^1.1 --dev | ||
``` | ||
|
||
## Tasks | ||
|
||
The following tasks are available: | ||
|
||
* [s24:build-summary](docs/build-summary.md) - create a `_build_summary.json` file to record deployment info | ||
* [s24:check-branch](docs/check-branch.md) - ensure only default branch (main/master) is deployed to production | ||
* [s24:check-local-deployer](docs/check-local-deployer.md) - checks that deployment is running via the local Deployer install | ||
* [s24:confirm-continue](docs/confirm-continue.md) - ask confirmation from user before continuing with deployment | ||
* [s24:display-disk-space](docs/display-disk-space.md) - display server disk usage prior to deployment | ||
* [s24:notify-slack](docs/notify-slack.md) - send a notification to Slack on production deploy | ||
* [s24:show-summary](docs/show-summary.md) - display a summary of the current deployment info | ||
* [s24:vendors-subpath](docs/vendors-subpath.md) - Run composer install in a sub-path | ||
* [sync](docs/sync.md) - 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` | ||
See [installation instructions](https://github.com/studio24/deployer-recipes/tree/v1.1.0). | ||
|
||
To use this file in a project copy it to your project root and update the config variables. | ||
## Running Deployer | ||
|
||
Please edit `deploy.php` depending on your needs. For example if you don't need to run Composer during deployment remove the line: | ||
To run deployments use: | ||
|
||
``` | ||
// Composer install | ||
'deploy:vendors,', | ||
``` | ||
dep deploy <environment> --branch=<branch name> | ||
``` | ||
|
||
## Requirements | ||
See [usage documentation](docs/usage.md). | ||
|
||
* PHP 7.2+ | ||
* [Composer](https://getcomposer.org/) | ||
* [Deployer](https://deployer.org/) 6.8+ | ||
|
||
[LICENSE]: ./LICENSE | ||
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,20 +14,12 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Studio24\\Deployer\\": "src/" | ||
} | ||
}, | ||
"require": { | ||
"php": ">=7.2", | ||
"ext-json": "*", | ||
"deployer/deployer": "^6.8", | ||
"symfony/http-client": "^5.2" | ||
"php": ">=8.0", | ||
"deployer/deployer": "^7.3" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^9.5", | ||
"overtrue/phplint": "^2.3", | ||
"squizlabs/php_codesniffer": "^3.5" | ||
"squizlabs/php_codesniffer": "^3.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Studio 24 Deployer recipes documentation | ||
|
||
This package contains [Deployer](https://deployer.org/) recipes used to help deploy Studio 24 projects. | ||
|
||
## Installation | ||
|
||
* [Installation](installation.md) - how to use Deployer for a project | ||
* [Upgrading](upgrading.md) - how to upgrade from v1 (Deployer 6) to v2 (Deployer 7) | ||
|
||
## How to use Deployer | ||
|
||
* [Usage](usage.md) - how to perform different tasks with Deployer | ||
* [Common issues](common-issues.md) - common issues and how to resolve them | ||
|
||
## Recipes | ||
|
||
* [Slack](recipes/slack.md) - send a notification to Slack when a deployment is complete | ||
|
||
## Deployment tasks | ||
|
||
* [build-summary](tasks/build-summary.md) - create a `_build_summary.json` file to record deployment info | ||
* [check:branch](tasks/check-branch.md) - ensure only default branch (main/master) is deployed to production | ||
* [check:disk-space](tasks/check-disk-space.md) - display server disk usage prior to deployment | ||
* [confirm-continue](tasks/confirm-continue.md) - ask confirmation from user before continuing with deployment | ||
* [show](tasks/show-summary.md) - display a summary of the current deployment info | ||
* [vendors-subpath](tasks/vendors-subpath.md) - Run composer install in a sub-path | ||
|
||
## Utility tasks | ||
|
||
* [check:disk-space](tasks/check-disk-space.md) - display server disk usage prior to deployment | ||
* [check:ssh](tasks/check-ssh.md) - check SSH connection to remote server | ||
* [logs:list](tasks/logs.md) - list available log files | ||
* [logs:view](tasks/logs.md) - view a log file | ||
* [logs:search](tasks/logs.md) - search a log file | ||
* [logs:download](tasks/download.md) - download a log file | ||
* [show](tasks/show-summary.md) - display a summary of the current deployment info | ||
* [sync](tasks/sync.md) - sync files or folders from the remote host to local development |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.