Coder Social home page Coder Social logo

laravel4-vagrant's Introduction

Laravel 4 w/ Vagrant

A basic Ubuntu 12.04 Vagrant setup with Laravel4 and PHP 5.5. PHP 5.4 w/ Apache 2.2 is available on the php54 branch.

Requirements

Setup

  • Clone this repository git clone http://github.com/bryannielsen/Laravel4-Vagrant.git
  • run vagrant up inside the newly created directory
  • (the first time you run vagrant it will need to fetch the virtual box image which is ~300mb so depending on your download speed this could take some time)
  • Vagrant will then use puppet to provision the base virtual box with our LAMP stack (this could take a few minutes) also note that composer will need to fetch all of the packages defined in the app's composer.json which will add some more time to the first provisioning run
  • You can verify that everything was successful by opening http://localhost:8888 in a browser

Note: You may have to change permissions on the www/app/storage folder to 777 under the host OS

For example: chmod -R 777 www/app/storage/

Usage

Some basic information on interacting with the vagrant box

Port Forwards

  • 8888 - Apache
  • 8889 - MySQL
  • 5433 - PostgreSQL

Default MySQL/PostgreSQL Database

  • User: root
  • Password: (blank)
  • DB Name: database

PHPmyAdmin

Accessible at http://localhost:8888/phpmyadmin using MySQL access credentials above.

PHP XDebug

XDebug is included in the build but disabled by default because of the effect it can have on performance.

To enable XDebug:

  1. Set the variable $use_xdebug = "1" at the beginning of puppet/manifests/phpbase.pp
  2. Then you will need to provision the box either with vagrant up or by running the command vagrant provision if the box is already up
  3. Now you can connect to XDebug on port 9001

XDebug Tools

Note: All XDebug settings can be configured in the php.ini template at puppet/modules/php/templates/php.ini.erb

Vagrant

Vagrant is very well documented but here are a few common commands:

  • vagrant up starts the virtual machine and provisions it
  • vagrant suspend will essentially put the machine to 'sleep' with vagrant resume waking it back up
  • vagrant halt attempts a graceful shutdown of the machine and will need to be brought back with vagrant up
  • vagrant ssh gives you shell access to the virtual machine

Virtual Machine Specifications
  • OS - Ubuntu 12.04
  • Apache - 2.4.6
  • PHP - 5.5.4
  • MySQL - 5.5.32
  • PostgreSQL - 9.1
  • Beanstalkd - 1.4.6
  • Redis - 2.2.12
  • Memcached - 1.4.13

laravel4-vagrant's People

Contributors

bencorlett avatar bertiful avatar bpierre avatar briankiewel avatar bryannielsen avatar codler avatar crynobone avatar cviebrock avatar daylerees avatar ericlbarnes avatar franzliedke avatar hirokws avatar jakobud avatar jasonlewis avatar jesseobrien avatar kapv89 avatar kbanman avatar lancepioch avatar loic-sharma avatar mcintyre94 avatar mikelbring avatar neoascetic avatar pedroborges avatar segfaultx64 avatar sparksp avatar taylorotwell avatar tobsn avatar tommyc81 avatar vespakoen avatar vfragosop avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.