-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Spiral Framework recipe (#3582)
* Add Spiral framework recipe * Add docs
- Loading branch information
Showing
3 changed files
with
443 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,284 @@ | ||
<!-- DO NOT EDIT THIS FILE! --> | ||
<!-- Instead edit recipe/spiral.php --> | ||
<!-- Then run bin/docgen --> | ||
|
||
# How to Deploy a Spiral Project | ||
|
||
```php | ||
require 'recipe/spiral.php'; | ||
``` | ||
|
||
[Source](/recipe/spiral.php) | ||
|
||
Deployer is a free and open source deployment tool written in PHP. | ||
It helps you to deploy your Spiral application to a server. | ||
It is very easy to use and has a lot of features. | ||
|
||
Three main features of Deployer are: | ||
- **Provisioning** - provision your server for you. | ||
- **Zero downtime deployment** - deploy your application without a downtime. | ||
- **Rollbacks** - rollback your application to a previous version, if something goes wrong. | ||
|
||
Additionally, Deployer has a lot of other features, like: | ||
- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. | ||
- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. | ||
- **Secure** - Deployer uses SSH to connect to your server. | ||
- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. | ||
|
||
You can read more about Deployer in [Getting Started](/docs/getting-started.md). | ||
|
||
The [deploy](#deploy) task of **Spiral** consists of: | ||
* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release | ||
* [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment | ||
* [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy | ||
* [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy | ||
* [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release | ||
* [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code | ||
* [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs | ||
* [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs | ||
* [deploy:environment](/docs/recipe/spiral.md#deployenvironment) – Create .env file if it doesn't exist | ||
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors | ||
* [spiral:encrypt-key](/docs/recipe/spiral.md#spiralencrypt-key) – Generate a new encryption key if it doesn't already exist | ||
* [spiral:configure](/docs/recipe/spiral.md#spiralconfigure) – Configure the Spiral Framework | ||
* [deploy:download-rr](/docs/recipe/spiral.md#deploydownload-rr) – Download RoadRunner | ||
* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release | ||
* [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release | ||
* [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy | ||
* [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases | ||
* [deploy:success](/docs/recipe/common.md#deploysuccess) – | ||
|
||
|
||
The spiral recipe is based on the [common](/docs/recipe/common.md) recipe. | ||
|
||
## Configuration | ||
### shared_dirs | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L9) | ||
|
||
Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. | ||
|
||
|
||
|
||
```php title="Default value" | ||
['runtime'] | ||
``` | ||
|
||
|
||
### writable_dirs | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L10) | ||
|
||
Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. | ||
|
||
|
||
|
||
```php title="Default value" | ||
['runtime', 'public'] | ||
``` | ||
|
||
|
||
### roadrunner_path | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L13) | ||
|
||
Define the path to the RoadRunner server. | ||
|
||
```php title="Default value" | ||
'{{release_or_current_path}}' | ||
``` | ||
|
||
|
||
|
||
## Tasks | ||
|
||
### deploy:environment | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L16) | ||
|
||
Create .env file if it doesn't exist. | ||
|
||
|
||
|
||
|
||
### spiral:configure | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L58) | ||
|
||
Configure the Spiral Framework. | ||
|
||
Spiral Framework console commands | ||
|
||
|
||
### spiral:cycle | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L61) | ||
|
||
Update the CycleORM schema from the database and annotated classes. | ||
|
||
|
||
|
||
|
||
### spiral:migrate | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L64) | ||
|
||
Perform all outstanding migrations. | ||
|
||
|
||
|
||
|
||
### spiral:update | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L67) | ||
|
||
Update the project state. | ||
|
||
|
||
|
||
|
||
### spiral:cache:clean | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L70) | ||
|
||
Clean the application's runtime cache. | ||
|
||
|
||
|
||
|
||
### spiral:i18n:reset | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L73) | ||
|
||
Reset the translation cache. | ||
|
||
|
||
|
||
|
||
### spiral:encrypt-key | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L76) | ||
|
||
Generate a new encryption key if it doesn't already exist. | ||
|
||
|
||
|
||
|
||
### spiral:views:compile | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L79) | ||
|
||
Warm up the view cache. | ||
|
||
|
||
|
||
|
||
### spiral:views:reset | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L82) | ||
|
||
Clear the view cache. | ||
|
||
|
||
|
||
|
||
### cycle:migrate | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L88) | ||
|
||
Generate ORM schema migrations. | ||
|
||
Cycle ORM and migrations console commands | ||
|
||
|
||
### cycle:render | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L91) | ||
|
||
Render available CycleORM schemas. | ||
|
||
|
||
|
||
|
||
### cycle:sync | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L94) | ||
|
||
Sync Cycle ORM schema with database without intermediate migration (risk operation). | ||
|
||
|
||
|
||
|
||
### migrate:init | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L97) | ||
|
||
Init the migrations component and create the migrations table. | ||
|
||
|
||
|
||
|
||
### migrate:replay | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L100) | ||
|
||
Replay (down, up) one or multiple migrations. | ||
|
||
|
||
|
||
|
||
### migrate:rollback | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L103) | ||
|
||
Rollback one (default) or multiple migrations. | ||
|
||
|
||
|
||
|
||
### migrate:status | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L106) | ||
|
||
Get list of all available migrations and their statuses. | ||
|
||
|
||
|
||
|
||
### roadrunner:serve | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L112) | ||
|
||
Start RoadRunner server. | ||
|
||
RoadRunner console commands | ||
|
||
|
||
### roadrunner:stop | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L117) | ||
|
||
Stop RoadRunner server. | ||
|
||
|
||
|
||
|
||
### roadrunner:reset | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L120) | ||
|
||
Reset workers of all services. | ||
|
||
|
||
|
||
|
||
### deploy:download-rr | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L126) | ||
|
||
Download RoadRunner. | ||
|
||
Download and restart RoadRunner | ||
|
||
|
||
### deploy:restart-rr | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L132) | ||
|
||
Restart RoadRunner. | ||
|
||
|
||
|
||
|
||
### deploy | ||
[Source](https://github.com/deployphp/deployer/blob/master/recipe/spiral.php#L146) | ||
|
||
Deploys your project. | ||
|
||
Main task | ||
|
||
|
||
This task is group task which contains next tasks: | ||
* [deploy:prepare](/docs/recipe/common.md#deployprepare) | ||
* [deploy:environment](/docs/recipe/spiral.md#deployenvironment) | ||
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) | ||
* [spiral:encrypt-key](/docs/recipe/spiral.md#spiralencrypt-key) | ||
* [spiral:configure](/docs/recipe/spiral.md#spiralconfigure) | ||
* [deploy:download-rr](/docs/recipe/spiral.md#deploydownload-rr) | ||
* [deploy:publish](/docs/recipe/common.md#deploypublish) | ||
|
||
|
Oops, something went wrong.