Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lorisleiva committed Feb 29, 2020
1 parent a2bfb7e commit fbe1293
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/how-to-reload-fpm.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to reload php-fpm?

In order to reload php-fpm after each deployment, you will need to add the `fpm:reload` task at the end of your deployment flow. You also have to set up which version of php-fpm you are using.
In order to reload php-fpm after each deployment, you will need to add the `fpm:reload` task at the end of your deployment flow (including, if necessary, rolling back to a previous version). You also have to set up which version of php-fpm you are using.

```php
// config/deploy.php
Expand All @@ -10,6 +10,7 @@ In order to reload php-fpm after each deployment, you will need to add the `fpm:
],
'hooks' => [
'done' => ['fpm:reload'],
'rollback' => ['fpm:reload'],
],
```

Expand All @@ -21,4 +22,4 @@ If you wish to customize the command executed by `fpm:reload`, you can override
'options' => [
'php_fpm_command' => 'echo "" | sudo -S /usr/sbin/service {{php_fpm_service}} reload',
],
```
```
5 changes: 5 additions & 0 deletions docs/overview-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ Before starting you first deployment, you should go check your `config/deploy.ph

// Deployment failed. This can happen at any point of the deployment.
'fail' => [],

// After a deployment has been rolled back.
'rollback' => [
'fpm:reload',
],
],
```

Expand Down

0 comments on commit fbe1293

Please sign in to comment.