Skip to content

Instantly share code, notes, and snippets.

@nekwebdev
Created July 4, 2013 08:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save nekwebdev/5926025 to your computer and use it in GitHub Desktop.
Save nekwebdev/5926025 to your computer and use it in GitHub Desktop.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Configure your Laravel 4 project for this virtual machine
#
# 1- Add this environment in your project's start.php file:
#
# bootstrap/start.php:
# $env = $app->detectEnvironment(array(
# 'vagrant' => array('vagrant-laravel4')
# ));
#
# 2- Open a terminal and issue:
#
# vagrant ssh
# cp -R /home/vagrant/vagrant /vagrant/app/config/
#
# To use the built in dev smtp start a new ssh session with:
#
# vagrant ssh
#
# Start the smtp catchall server with the alias command:
#
# pysmtpd
#
# Sent emails will be displayed in the ssh terminal session.
#
# Configurable variables
$hostname = "vagrant-laravel4"
$http_port = 8080
Vagrant.configure("2") do |config|
# Basics.
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
# Networking.
config.vm.hostname = $hostname
config.vm.network :forwarded_port, guest: 80, host: $http_port,
auto_correct: true
# Provisioning.
config.vm.provision :shell, :path => "vagrantstrap.sh"
# Set the ownership for Laravel 4.
config.vm.synced_folder "app/storage", "/vagrant/app/storage", :owner => 'www-data', :group => 'www-data'
config.vm.synced_folder "public/assets/compiled", "/vagrant/public/assets/compiled", :owner => 'www-data', :group => 'www-data'
end
@nekwebdev
Copy link
Author

You also need the vagrantstrap.sh file in the project.
https://gist.github.com/nekwebdev/5926031

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment