rmh-media / laravel-deployment
Laravel deployment package
Installs: 3 335
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- laravel/framework: 7 - 10
README
With this package you can easily deploy your laravel projects
Latest Version on Packagist
Installation
Via Composer
composer require rmh-media/laravel-deployment
If you do not run Laravel 5.5 (or higher), then add the service provider in config/app.php
:
RmhMedia\LaravelDeployment\DeploymentServiceProvider::class,
Create the deployments table
php artisan vendor:publish --tag=migrations php artisan migrate
Add path to composer autoload config
"autoload": { "classmap": ["database/deployments"] }
Available commands
Command:
php artisan deploy:list --undone
Result:
The command outputs a list of executed deployments
--undone: Show only not executed deployments
Command:
php artisan make:deployment <version> --command=<list of commands> # e.g. php artisan make:deployment v1.2.1 --command="migrate --force" --command="routes:list"
Result: Create a new deployment file
Command:
php artisan deploy:exec --all --done --force
Result: The command executes maintenance tasks after successful code deployment
--all: Execute all available deployments
--done: Mark all available deployments as done
--force: Force execution of already ran deployment
Credits
License
Please see license.md for more information.