Skip to content

Instantly share code, notes, and snippets.

@sahibalejandro
Last active August 29, 2015 14:04
Show Gist options
  • Save sahibalejandro/338afd1447bed32dd322 to your computer and use it in GitHub Desktop.
Save sahibalejandro/338afd1447bed32dd322 to your computer and use it in GitHub Desktop.
Create Laravel development environment
#!/bin/bash
# Create laravel project
composer create-project laravel/laravel .
# Download vagrant-provision.sh
curl https://gist.githubusercontent.com/sahibalejandro/80038293f363ec9c95c2/raw/b78a4682f70a3125b96a2dc508a9914472bff5c2/vagrant-provision.sh > vagrant-provision.sh
# Initialize and configure Vagrantfile
vagrant init -m
sed -i "" "s/config\.vm\.box = \"base\"/config\.vm\.box=\"hashicorp\/precise64\"\\
config\.vm\.network \"forwarded_port\", guest: 80, host: 8080\\
config\.vm\.provision \"shell\", path: \"vagrant-provision\.sh\"\\
config\.vm\.hostname = \"vagrant\"/" Vagrantfile
# Configure git
echo "/.vagrant" >> .gitignore # vagrant
git init
git add --all
git commit -m "Initial commit"
# Vagrant up!
vagrant up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment