Skip to content

Instantly share code, notes, and snippets.

@mnshankar
Created April 15, 2014 18:38
Show Gist options
  • Save mnshankar/10757370 to your computer and use it in GitHub Desktop.
Save mnshankar/10757370 to your computer and use it in GitHub Desktop.
Laravel Envoy script for easy VPS deployment
@servers(['web' => 'mnshankar@1.1.1.1'])
@task('deploy')
{{--"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
@endtask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment