gurindersingh / avi
Deploy simple laravel app
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^8.0
- laravel-zero/framework: ^9.0|^10.0
- nunomaduro/termwind: ^1.3
- protonemedia/laravel-blade-on-demand: ^1.5
- react/child-process: ^0.6.4
- react/event-loop: ^1.3
- react/promise: ^2.9
- spatie/dns: ^2.5
- spatie/fork: ^1.1
- symfony/process: ^6.1
Requires (Dev)
- mockery/mockery: ^1.4.4
- pestphp/pest: ^1.21.1
README
A simple composer package to deploy Laravel web app to remote Ubuntu servers.
Install avi deployment tool
Install avi command line tool
composer global require gurindersingh/avi
You must have avi
command line tool available now.
Initialize the process
In your project directory run the following command
avi deploy:init
Deploy environment
To deploy on particular environment, run deploy command with that environment. For example, to deploy in staging environment run following command.
avi deploy:web environment # for environment avi deploy:web staging # for staging avi deploy:web production # for production
Make sure that you have config available for deployment environment in avi.json file.
Exclude from .git
Add .avi
& avi.json
in .gitignore file to exclude from github
Add scripts to run after composer install
In avi.json
{ ..., "staging": { ..., "composerPostInstallScripts" : [ "php artisan optimize:clear", "php artisan migrate --force", "php artisan fm:seed-production" ] } }
Add scripts to run after new release is active
In avi.json
{ ..., "production": { ..., "postReleaseScripts" : [ "php artisan optimize" ] } }