Download the PHP package erdmenchen/laravel-bitbucket-deploy without Composer

On this page you can find all versions of the php package erdmenchen/laravel-bitbucket-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 laravel-bitbucket-deploy

laravel-bitbucket-deploy

Deploy your laravel app via bitbucket pipelines and envoyer.

Important:
Be sure, that your project (migrations!) is working as expected (tests!), because there is no backup mechanism during the deployment!
Do not deploy to production only, always test releases on staging before!

Prerequisites

Installation

You can easily install this package using Composer by running the following command:

After installation completed run the following command in order to install all required assets:

Bitbucket Configuration

In order to get the build and deployment pipeline going at Bitbucket, you need to make the following steps in your Bitbucket repository:

  1. Enable Pipelines
  2. Add the repository variables: DEPLOY_HOST and DEPLOY_USER
  3. Create a new SSH key, add your host to the known hosts and copy the public key to your hosting
  4. Create the following deployment environments and set the variable DEPLOY_PATH for each:
    • Staging
    • Production

Hosting Configuration

The deployment script requires the following folder structure on the web hosting in order to work:

During each deployment, the .env file and the storage folder are referenced into the current build folder via symlinks. Additionally a symlink current will be created (or updated) in the deployment folder, which points to the latest build folder.

To always point the webserver to the latest release, just create a symlink, that points on the current symlink (e.g. cool_website.com -> cool_website_staging/current/public. You don´t need to edit it during deployment. It will always point to the latest release.

Requirements

This package has the following requirements:

How it works

This package scaffolds a Bitbucket pipeline script and a Laravel Envoyer script into your Laravel project.

When a new pipeline run is triggered (via git commit or manually) a full CI/CD (Continuous Integration/Continuous Delivery) build is executed with the following steps:

  1. Fetch source code and install PHP dependencies (Build PHP)
  2. Run phpunit and gather results - stops on any failed test (Test PHP)
  3. Install javascript dependencies via npm and build UI assets(Build Assets)
  4. Deploy to staging / production - connects to hosting via ssh and pushes build (Deploy)
    • Create manifest file with original trigger commit details
    • Create symlinks to .env and storage
    • Check Laravel health (running php artisan --version)
    • Activate build by updating the current symlink
    • Optimise, migrate and cleanup Laravel project

The last step (step 4) is only executed when triggered from a commit on develop or master branch. Feature branches are build only, they do not get deployed.

License

The GNU General Public License v3.0. Please see License File for more information.


All versions of laravel-bitbucket-deploy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0
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 erdmenchen/laravel-bitbucket-deploy contains the following files

Loading the files please wait ....