rockbuzz/lara-cwapi

Cloudways Api

0.1.5 2024-01-30 21:45 UTC

This package is auto-updated.

Last update: 2024-10-30 01:26:40 UTC


README

Api Cloudways

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.