Download the PHP package mohdishrat/autodeployment without Composer

On this page you can find all versions of the php package mohdishrat/autodeployment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package autodeployment

Autodeployment Package

📜 Overview

This Laravel package mohdishrat/autodeployment provides a simplified solution to automatically deploy code through predefined routes and logic. It includes:

🚀 Features


⚙️ Project Installation

Step 1: Install via Composer

Step 2: Update Provider

Open bootstrap/providers.php
    add  Mohdishrat\Autodeployment\Providers\AutoDeploymentProvider::class in bootstrap/providers.php
If bootstrap/provider.php is not present in project then
    add Mohdishrat\Autodeployment\Providers\AutoDeploymentProvider::class in config/app.php under providers key

Step 3: Update Composer.json

Open project composer.json
add "Mohdishrat\\Autodeployment\\ComposerScripts::createPlaybooksDirectory" under scripts.post-autoload-dump key
    It will create necessary playbooks to start deployment

Step 4: Setup .env

These are the supported .env variables for deployment
    dv = default value
    PRODUCTION .env variables
        PROD_AUTODEPLOY_DEFAULT_BRANCH  // [dv = master] Default branch name for deployment.[take pull for this branch]
        PROD_DEPLOYMENT_PASSWORD  // Password to start deployment (password should be hashed with laravel Hash::make())
        PROD_AUTO_DEPLOY  // [dv = false] [true, false] true if set for start deployment when PR merge and false when need human interaction for deployment.
        SSH_KEY_PATH    // full path of ssh_key which will be used to pull the key. Please make sure ssh_key don't have passphrase.
        PROD_AUTODEPLOY_AUTH  // [dv = true][true, false] true when need authentication to open deployment page and false for no authentication required for deployment pages.
        PROD_SONARQUBE_SCAN_BRANCH  // if added sonar scan in project

        // Mandatory .env_variables to send email
        MAIL_MAILER
        MAIL_HOST
        MAIL_PORT
        MAIL_USERNAME
        MAIL_PASSWORD
        MAIL_ENCRYPTION
        MAIL_FROM_ADDRESS
        MAIL_FROM_NAME
        MAIL_TO

    DEVELOPMENT .env variables
        DEV_AUTODEPLOY_DEFAULT_BRANCH
        DEV_DEPLOYMENT_PASSWORD
        DEV_AUTO_DEPLOY
        SSH_KEY_PATH
        DEV_AUTODEPLOY_AUTH
        DEV_SONARQUBE_SCAN_BRANCH

        // Mandatory .env_variables to send email
        MAIL_MAILER
        MAIL_HOST
        MAIL_PORT
        MAIL_USERNAME
        MAIL_PASSWORD
        MAIL_ENCRYPTION
        MAIL_FROM_ADDRESS
        MAIL_FROM_NAME
        MAIL_TO

Step 5: Run Artisan command and Composer Autoload

run command
    composer dump-autoload
    php artisan optimize:clear

this will load .env values and create necessary playbooks

Step 6: Update .gitignore

add playbooks/*   // it will ignore the playbooks in git.

⚙️ Server Installation

Step 1: Install Ansible Playbook

Linux
    $ sudo apt update
    $ sudo apt install software-properties-common
    $ sudo add-apt-repository --yes --update ppa:ansible/ansible
    $ sudo apt install ansible

For Other OS installation please follow the documentation
    https://docs.ansible.com/ansible/latest/installation_guide/installation_distros.html

Step 2: Install supervisor

Linux
    $ sudo apt update
    $ sudo apt install supervisor

Add config to run playbooks
    goto /etc/supervisor/conf.d
        nano cicd.conf
            past below lines [before save update projectpath]

            [program:cicd]
            process_name=%(program_name)s_%(process_num)02d
            command=php app/to/projectpath/artisan queue:work --queue=cicd --timeout=6000 --max-jobs=2
            autostart=true
            autorestart=true
            user=root
            numprocs=1
            redirect_stderr=true
            stdout_logfile=/var/log/supervisor/laravel-queue.log

Load config file
    $ sudo supervisorctl update

⚙️ Git Setup

Step 1: Add Webhook

Add webhook to send webhook notification for Pull Request create or merge.
    URL: domain/deploymentwebhook
    METHOD: POST

Webhook Setting
    enable Pull request Setting
        Pull request Created  // this will be used for sonar qube scan
        Pull request Merged   // this will be used for deployment

All versions of autodeployment with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mohdishrat/autodeployment contains the following files

Loading the files please wait ...