rockbuzz/lara-cwapi

Cloudways Api

dev-main 2022-06-04 21:37 UTC

This package is auto-updated.

Last update: 2022-07-04 21:55:41 UTC


README

Api Cloudways

badge.svg

Requirements

PHP >=7.3

Install

$ composer require rockbuzz/lara-cwapi

Usage

NOTE Sensitive values such as server and app id must be set in environment variables

CLOUDWAYS_EMAIL=
CLOUDWAYS_API_KEY=

Pull repo changes and deploy them

$ app('cloudways')->startGitPull(
    int $server,
    int $app,
    string $git,
    string $branch,
    string $path = ''
);

or

CLOUDWAYS_SERVER_ID=
CLOUDWAYS_APP_ID=
CLOUDWAYS_GIT_URL=
CLOUDWAYS_GIT_BRANCH_NAME=
CLOUDWAYS_DEPLOY_PATH=
$ php artisan cw:deploy

Take application backup

$ app('cloudways')->appManageBackup(
    int $server,
    int $app
);

or

CLOUDWAYS_SERVER_ID=
CLOUDWAYS_APP_ID=
$ php artisan cw:app-backup

Optional

$ php artisan vendor:publish --provider="Rockbuzz\LaraCwApi\ServiceProvider" --tag="config"

License

The Lara Cw Api is open-sourced software licensed under the MIT license.