Created
April 15, 2014 18:38
-
-
Save mnshankar/10757370 to your computer and use it in GitHub Desktop.
Laravel Envoy script for easy VPS deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@servers(['web' => '[email protected]']) | |
@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