Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Laravel Envoy script for easy VPS deployment
@servers(['web' => 'mnshankar@'])
{{--"project" is the name of the project that is being deployed into /var/www/home--}}
rm -rf /var/www/home/project && mkdir /var/www/home/project
{{--Navigate to the project folder--}}
cd /var/www/home/project
{{--clone the git repo stored in /var/git/project.git. --}}
{{--Note that project folder must be empty for git clone.. hence the rm -rf and mkdir initially--}}
{{--/var/git/project.git on this VPS contains our code.. git pushed from dev box--}}
git clone /var/git/project.git .
{{--install composer dependencies--}}
composer install
{{--migrate databases if required--}}
php artisan migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.