Deploy your Laravel app via Bitbucket pipelines and envoyer
erdmenchen/laravel-bitbucket-deploy is a Laravel package for deploy your laravel app via bitbucket pipelines and envoyer.
It currently has 11 GitHub stars and 720 downloads on Packagist (latest version 0.4-beta.1).
Install it with composer require erdmenchen/laravel-bitbucket-deploy.
Discover more Laravel packages by erdmenchen
or browse all Laravel packages to compare alternatives.
Last updated
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!
You can easily install this package using Composer by running the following command:
composer require erdmenchen/laravel-bitbucket-deploy
After installation completed run the following command in order to install all required assets:
php artisan vendor:publish
In order to get the build and deployment pipeline going at Bitbucket, you need to make the following steps in your Bitbucket repository:
DEPLOY_HOST and DEPLOY_USERDEPLOY_PATH for each:
The deployment script requires the following folder structure on the web hosting in order to work:
cool_website_staging)
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.
This package has the following requirements:
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:
Build PHP)phpunit and gather results - stops on any failed test (Test PHP)Build Assets)Deploy)
.env and storagephp artisan --version)current symlinkThe 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.
The GNU General Public License v3.0. Please see License File for more information.