2014-07-16 23:51:48 +02:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
|
|
|
VAGRANTFILE_API_VERSION = "2"
|
|
|
|
|
|
|
|
$script = <<SCRIPT
|
|
|
|
sudo apt-get -y update
|
2014-07-27 01:25:29 +02:00
|
|
|
|
|
|
|
# RVM/Ruby
|
2014-07-16 23:51:48 +02:00
|
|
|
sudo apt-get -y install curl
|
2015-07-09 17:07:45 +02:00
|
|
|
# manually install GPG key in a proxy-friendly way
|
|
|
|
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
|
2014-07-16 23:51:48 +02:00
|
|
|
curl -sSL https://get.rvm.io | bash -s stable
|
|
|
|
. ~/.bashrc
|
|
|
|
. ~/.bash_profile
|
|
|
|
rvm install 2.0.0
|
|
|
|
rvm --default use 2.0.0
|
2014-07-27 01:25:29 +02:00
|
|
|
|
|
|
|
# Middleman deps
|
2014-07-16 23:51:48 +02:00
|
|
|
cd /vagrant
|
2015-07-09 17:07:45 +02:00
|
|
|
gem install bundle
|
|
|
|
sudo apt-get install -y git-core
|
2014-07-16 23:51:48 +02:00
|
|
|
bundle
|
2014-07-27 01:25:29 +02:00
|
|
|
|
2015-07-09 17:07:45 +02:00
|
|
|
# Run the middleman server
|
|
|
|
bundle exec middleman server &
|
2014-07-16 23:51:48 +02:00
|
|
|
SCRIPT
|
|
|
|
|
|
|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
2015-12-09 02:25:05 +01:00
|
|
|
config.vm.box = "bento/ubuntu-12.04"
|
2014-07-16 23:51:48 +02:00
|
|
|
config.vm.network "private_network", ip: "33.33.30.10"
|
|
|
|
config.vm.provision "shell", inline: $script, privileged: false
|
|
|
|
config.vm.synced_folder ".", "/vagrant", type: "rsync"
|
2015-07-09 17:07:45 +02:00
|
|
|
config.vm.network "forwarded_port", guest: 4567, host: 4567
|
2014-07-16 23:51:48 +02:00
|
|
|
end
|