Skip to content

Instantly share code, notes, and snippets.

@MathRivest
Created July 25, 2014 17:21
Show Gist options
  • Save MathRivest/895c6a46a8c500111012 to your computer and use it in GitHub Desktop.
Save MathRivest/895c6a46a8c500111012 to your computer and use it in GitHub Desktop.
Basic vagrant file for middleman
echo "--- Update OS package list ---"
sudo apt-get update
echo "--- Update Timezone ---"
sudo cp /usr/share/zoneinfo/America/Montreal /etc/localtime
echo "--- Installing Git-core ---"
sudo apt-get install -y git-core
echo "--- Updating default ruby ---"
sudo apt-get -y install ruby1.9.3
echo "--- Installing build-essential ---"
sudo apt-get -y install build-essential
echo "--- Install & Execule Bundler ---"
sudo apt-get -y install ruby-bundler
sudo gem install bundler
cd /vagrant/_doc
bundle
echo "--- Install a JS runtime (NODE) ---"
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get -y update
sudo apt-get -y install nodejs
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network :forwarded_port, guest: 80, host: 8080
#middleman
config.vm.network :forwarded_port, guest: 4567, host: 4567
#livereload
config.vm.network :forwarded_port, guest: 35729, host: 35729
# script to install\
config.vm.provision :shell, :path => "middleman.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment