Skip to content

mgustafsson1/devbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devbox

devbox is a Vagrant development machine provisioned and preconfigured for working with PHP and the Laravel framework out of the box. From nginx, php5.4 over beanstalkd to composer it has got everything you need for Laravel 4.

Features / Stack

Ubuntu 12.04 32bit, Nginx, PHP5.4, php-fpm, xdebug, composer, MySQL 5.5, Redis, Beanstalkd, supervisord, Sphinx, localtunnel, Node.js, MongoDB

Requirements

  • VirtualBox - Free virtualization software
  • Vagrant - Tool for working with VirtualBox images

Initial Setup

  • Clone this repository git clone https://github.com/Aboalarm/devbox.git.
  • Run vagrant up inside the newly created directory. (the first time you run Vagrant it will fetch the virtual box image which is ~300mb. So this could take some time)
  • Vagrant will now use Puppet to provision the devbox (this could take a few minutes)
  • Point "devbox" and any other vhosts to 192.168.3.3 in your hosts file of your OS. e.g. 192.168.3.3 devbox myproject.dev myotherproject.dev [ANY-OTHER-HOST]
  • Now just clone/copy your Laravel projects into www/[HOSTNAME] and open http://[HOSTNAME] in your browser. Done!

Shared Folders

The www folder is automatically synced to the VM (/var/www). This is why we clone our Laravel project into this folder. The sync works in both directions. So any files generated by Laravel (/storage folder for example) will be accessible from your host machine.

Credentials

  • SSH User: vagrant PW: vagrant
  • MySQL User: root PW: root (access MySQL through SSH)

Vagrant Commands

  • vagrant up starts the virtual machine and provisions it
  • vagrant ssh gives you shell access to the virtual machine
  • vagrant suspend will essentially put the machine to 'sleep' with vagrant resume waking it back up
  • vagrant reload will reload the VM. Do this when the VM config changed. For exmpale when you changed one of the configs (e.g. php.ini, sphinx.conf, etc. or after a git pull of this repo)
  • vagrant halt attempts a graceful shutdown of the machine and will need to be brought back with vagrant up
  • vagrant halt --force force shutdown if normal halt doesn't work
  • vagrant destroy you broke something? this will destroy the VM and reprovisions it again completely. Takes some time.

For more: Vagrant is very well documented

Please fork, improve, extend, make pull request, wrap it as a gift. Use the GitHub Issues!

About

Vagrant Development Box for PHP/Laravel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published