Boilerplate Laravel Vagrant config with autosetup.
Makes an isolated local development featured environment and installs Laravel with dev-packages OR runs exisisting one.
Status: Release Candidate
Open terminal, go to desired directory and type in:
git clone https://github.com/terion-name/Lagrant && mv Lagrant/* ./ && rm -r -f Lagrant && vagrant up
Or just clone/download Lagrant, edit Vagrantfile's variables and/or provision.sh to your prefers and run
This will also work with existing project! If you run Lagrant from an existing project repo it will setup the VM and migrate&seed database to provide you an isolated local development environment.
If you're not happy with my defaults, fork the repo, edit variables in the beginning of Vagrantfile, edit provision.sh script by changing set of existing modules and/or write your own and use it :)
Using VM resources
To use shipped resources (such as composer, phpunit, etc) open terminal in project directory and type
vagrant ssh. Then
cd /vagrant and you are in project root in the VM. Files are seamlessly synced, so all your changes in VM will immediatly appear in host filesystem.
To connect to your databases (mysql, mongo, etc) in VM via clients use connection over SSH tunnel. SSH host will be 220.127.116.11, user and password — vagrant. Like this:
What's in the box
Lagrant will load Ubuntu 12 x64 VM with following components:
- php 5.5
- nginx as a default web-server
- chosen database (mysql, mariadb, postgresql; currently only mysql supported)
- nodejs and npm
- imagick or gmagick (imagick by default)
Also it will create a database with provided in Vagrantfile credentials (default root password is root, default db name is database). If it performs a clean install of Laravel, it will create an environment configs set (defaults to dev) and set up local database and app configs.
Development packages (will be added during fresh install) included at the moment:
- way/generators — awesome code generators for rapid development
- way/laravel-test-helpers — helpers for Unit Testing
- barryvdh/laravel-ide-helper — IDE helper generator
- fzaninotto/faker — perfect tool for faking data and seeding test/dev databases
- codeception/codeception — great BDD-testing tool
Other packages (added to require section of composer and to configs):
- barryvdh/laravel-debugbar — awesome debug panel
rtablada/package-installer — handy tool for quick and easy installation of supported Laravel 4 packages(is not compatible with Laravel 4.1, commented out till fix)
If establishing of private network during VM booting fails, run (for Mac users):
sudo /Library/StartupItems/VirtualBox/VirtualBox restart
(see this Vagrant/Virtual Box issue for details)
If you faced any error — feel free to open an issue
- apache, as an alternative web server
- basic bower config
- basic grunt config
- build scripts (artisan commands)
- and bunch of cool Laravel Packages (research in progress)
Thanx to Jeffrey Way for inspiring