2021-09-26 15:25:58 +02:00
|
|
|
<!-- DO NOT EDIT THIS FILE! -->
|
|
|
|
<!-- Instead edit recipe/yii.php -->
|
|
|
|
<!-- Then run bin/docgen -->
|
|
|
|
|
2022-07-26 00:12:23 +02:00
|
|
|
# How to Deploy Yii
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
[Source](/recipe/yii.php)
|
|
|
|
|
2022-07-26 00:12:23 +02:00
|
|
|
## How to deploy a Yii project with zero downtime?
|
|
|
|
|
|
|
|
First, [install](/docs/installation.md) the Deployer.
|
|
|
|
Second, require `recipe/yii.php` recipe into your _deploy.php_ or _deploy.yaml_ file.
|
|
|
|
Third, run `dep deploy` command.
|
|
|
|
|
|
|
|
Did you know that you can deploy **Yii** project with a single command? Just run `dep deploy`.
|
|
|
|
Also, you can take an advantages of the [Deployer's CLI](/docs/cli.md) to deploy your project.
|
|
|
|
|
|
|
|
Another feature of the Deployer is provisioning. Take any server, and run `dep provision` command.
|
|
|
|
This command will configure webserver, databases, php, https, and more.
|
|
|
|
You will get everything you need to run your **Yii** project.
|
|
|
|
|
|
|
|
The yii recipe is based on [common](/docs/recipe/common.md) recipe.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
### shared_dirs
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/recipe/yii.php#L9)
|
|
|
|
|
2021-10-18 18:29:14 +02:00
|
|
|
Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
Yii shared dirs
|
|
|
|
|
|
|
|
```php title="Default value"
|
|
|
|
['runtime']
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### writable_dirs
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/recipe/yii.php#L12)
|
|
|
|
|
|
|
|
Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`.
|
|
|
|
|
|
|
|
Yii writable dirs
|
|
|
|
|
|
|
|
```php title="Default value"
|
|
|
|
['runtime']
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Tasks
|
|
|
|
|
|
|
|
### deploy
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/recipe/yii.php#L18)
|
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
Deploys your project.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
Main task
|
|
|
|
|
|
|
|
|
|
|
|
This task is group task which contains next tasks:
|
|
|
|
* [deploy:prepare](/docs/recipe/common.md#deployprepare)
|
|
|
|
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors)
|
|
|
|
* [deploy:publish](/docs/recipe/common.md#deploypublish)
|
|
|
|
|
|
|
|
|