Download the PHP package pipestream/light-hook-deploy without Composer

On this page you can find all versions of the php package pipestream/light-hook-deploy. 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 light-hook-deploy

πŸš€ Light Hook Deploy

Introduction 🌟

Light Hook Deploy is a microservice designed to streamline automated deployments using webhooks. This service is not meant to replace comprehensive tools like Jenkins, CodeDeploy, Azure Pipelines, or other CI/CD methods. Instead, it offers a lightweight, easily configurable solution for environments that need automated deployment without the overhead of more complex or resource-heavy tools.

🎯 Why choose Light Hook Deploy?

πŸ“‹ Table of Contents

Description

Light Hook Deploy enables automated deployments via webhooks from services like GitHub, GitLab, and Bitbucket. By leveraging a webhook-based strategy, this microservice seamlessly integrates with your repositories and triggers deployment scripts when specific events occur, such as pushing changes to a particular branch.

Unlike Jenkins or Azure Pipelines, which often require more elaborate configurations and several dependencies, Light Hook Deploy is designed to be:

Features

Getting Started

πŸ“‹ Prerequisites

Before you begin, make sure your server is set up with the following:

βš™οΈ Installation

To install Light Hook Deploy, run the following command using Composer:

Next, copy the .env.example file to .env to set up your environment configuration:

The .env file contains the following configuration settings:

Important Note: The MAX_EXECUTION_TIME variable is crucial for ensuring sufficient execution time for scripts to avoid 502 Gateway Timeout errors. It is recommended to extend the timeout settings in Apache or Nginx (or both, if using Nginx as a reverse proxy).

Additionally, there is Redis configuration available to block IPs that attempt to execute deployments through trial and error (brute force). To enable Redis for rate limiting, set the following variables in your .env file:

In this configuration, you can have a maximum of 100 deployment attempts per hour.

Once the environment is set up, you need to set the permissions for the cli folder to 755 to allow the use of the command-line system:

Once installed, navigate to the cli folder and run the ./lhd-install.sh script, passing the username as a parameter. This user will be used to execute the deployment scripts from the ./deployments/scripts/ directory.

πŸ‘€ User Configuration

The lhd-install.sh script expects a <username> to be passed when running. You can use an existing user, or if needed, the script will guide you through creating a new one. The selected user will be configured to have the necessary permissions for executing the deployment scripts.

🌐 Web Server Configuration

Make sure your web server (Apache or Nginx) is configured to point to the public directory, where the index.php file is located. This is necessary for the proper functioning of the application.

Ensure that your Apache or Nginx configuration file is updated to serve content from this directory.

Deployment Methods

  1. Webhook-based Deployment ⚑

This method utilizes webhooks from services like GitHub, GitLab, or Bitbucket. The service can be configured to listen for any event specified in the webhook section of your repository, such as:

When these events are triggered, Light Hook Deploy executes the deployment scripts that have been configured for the project.

πŸ”’ You can secure the webhook with a token to ensure that only authenticated requests trigger deployments.

πŸ“š Read more about Webhook-based Deployment

  1. Manual Deployment via Endpoint πŸ”

Alternatively, you can deploy your project by sending a request to a specific deployment endpoint. This method requires you to provide the project name and a password to authorize the deployment.

This approach is particularly recommended when continuous integration is handled by the same repository or across different servers and tools, and it’s necessary to connect directly with the project for deployment. For example, if you're using:

or if you have another server configured for continuous integration, this method ensures that the deployment can be handled on the specific host where the project resides.

βœ… This option is ideal when your CI/CD setup needs to interact directly with the deployment host, providing more control over when and how deployments are triggered.

πŸ“š Read more about Manual Deployment via Endpoint

Next Steps

πŸ“œ To configure your deployments and scripts effectively, proceed with the following documentation:

By following these steps, you’ll ensure a robust setup for automated deployments and a clear understanding of how to manage your deployment lifecycle effectively.

CLI Scripts Overview

πŸ“œ To better understand the functionality of the CLI scripts within the cli directory, please refer to the following documentation:

πŸ‘₯ Credits

Special thanks to the following contributors for their work on this project:

Crisian Martinez Blanco Gabriel Parra
Cristian-Blanco Gparrac

All versions of light-hook-deploy with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
slim/slim Version 4.*
php-di/php-di Version ^6.4
vlucas/phpdotenv Version ^5.6
guzzlehttp/psr7 Version ^2
monolog/monolog Version ^3.7
predis/predis Version ^2.2
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 pipestream/light-hook-deploy contains the following files

Loading the files please wait ....