deployer/docs/recipe/provision.md
2024-10-22 10:28:50 +02:00

135 lines
3.4 KiB
Markdown

<!-- DO NOT EDIT THIS FILE! -->
<!-- Instead edit recipe/provision.php -->
<!-- Then run bin/docgen -->
# Provision Recipe
```php
require 'recipe/provision.php';
```
[Source](/recipe/provision.php)
* Requires
* [databases](/docs/recipe/provision/databases.md)
* [nodejs](/docs/recipe/provision/nodejs.md)
* [php](/docs/recipe/provision/php.md)
* [user](/docs/recipe/provision/user.md)
* [website](/docs/recipe/provision/website.md)
## Configuration
### lsb_release
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L19)
Name of lsb_release like: focal, bionic, etc.
As only Ubuntu 20.04 LTS is supported for provision should be the `focal`.
```php title="Default value"
return run("lsb_release -s -c");
```
### provision_user
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L43)
Default user to use for provisioning.
```php title="Default value"
'root'
```
## Tasks
### provision {#provision}
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L24)
Provision the server.
This task is group task which contains next tasks:
* [provision:check](/docs/recipe/provision.md#provision-check)
* [provision:configure](/docs/recipe/provision.md#provision-configure)
* [provision:update](/docs/recipe/provision.md#provision-update)
* [provision:upgrade](/docs/recipe/provision.md#provision-upgrade)
* [provision:install](/docs/recipe/provision.md#provision-install)
* [provision:ssh](/docs/recipe/provision.md#provision-ssh)
* [provision:firewall](/docs/recipe/provision.md#provision-firewall)
* [provision:user](/docs/recipe/provision/user.md#provision-user)
* [provision:php](/docs/recipe/provision/php.md#provision-php)
* [provision:node](/docs/recipe/provision/nodejs.md#provision-node)
* [provision:databases](/docs/recipe/provision/databases.md#provision-databases)
* [provision:composer](/docs/recipe/provision/php.md#provision-composer)
* [provision:server](/docs/recipe/provision/website.md#provision-server)
* [provision:website](/docs/recipe/provision/website.md#provision-website)
* [provision:verify](/docs/recipe/provision.md#provision-verify)
### provision\:check {#provision-check}
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L46)
Checks pre-required state.
### provision\:configure {#provision-configure}
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L71)
Collects required params.
### provision\:update {#provision-update}
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L123)
Adds repositories and update.
### provision\:upgrade {#provision-upgrade}
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L140)
Upgrades all packages.
### provision\:install {#provision-install}
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L148)
Installs packages.
### provision\:ssh {#provision-ssh}
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L183)
Configures the ssh.
### provision\:firewall {#provision-firewall}
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L195)
Setups a firewall.
### provision\:verify {#provision-verify}
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L204)
Verifies what provision was successful.