Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

Commit f280b05

Browse files
authored
Updating the readme.
1 parent 9c9ca41 commit f280b05

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

README.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
1-
# cloudways-restart-php-deployer-task
2-
A deployer task to restart php hosted on cloudways
1+
# Restarting php7.1-fpm on Cloudways servers from a [Deployer](https://deployer,org) file.
2+
3+
A quick and dirty deployer task to restart php7.1 fpm hosted on cloudways
4+
5+
Should be simple to modify to restart other services. See https://platform.cloudways.com/api
6+
7+
## Requirements
8+
9+
You need a [Cloudways](https://www.cloudways.com) account and server, an api key, and the id of the server you want to restart services on.
10+
11+
## Installation
12+
13+
It's just a couple of utility functions and a deployer task. Either download and include [restart-php7.1-fpm.php](restart-php7.1-fpm.php) or install via composer:
14+
15+
`composer require --dev samyapp/cloudways-restart-php-deployer-task:dev-master`
16+
17+
## Usage
18+
19+
In your `deploy.php` script, include [restart-php7.1-fpm.php](restart-php7.1-fpm.php) after you include your recipes.
20+
21+
Then set the following variables:
22+
23+
```php
24+
// The email attached to your cloudways account.
25+
set('cloudways_email', 'you@cloudways-account-email.com');
26+
27+
// the id of the cloudways server to restart
28+
set('cloudways_server_id', 42);
29+
30+
// your cloudways api key - you could hard code this in your deploy script of
31+
// just set it in your environment instead.
32+
set('cloudways_api_key', $_ENV['CLOUDWAYS_API_KEY']);
33+
```
34+
Finally, call the restart task from somewhere appropriate, eg:
35+
36+
```php
37+
after('deploy:symlink', 'deploy:restart-php7.1-fpm');
38+
```

0 commit comments

Comments
 (0)